Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Next step after using S-Soil MTEC-02B sensor in Milestone 2: Outdoor single sensor and saving telemetry data via Fledge software framework will be setting up an approach where developers can add new sensors or build a new software stack and provide private deployments to a subset of IoT devices in cloud infrastructure on on-premises.

The software build will be deployed with Open Horizon and uses use open-source applications to be deployed to the , for hardware reference RPi4 board will be used.

Goals

  1. Prepare examples for contributors for SmartAg SIG by providing onboarding instructions and development environment.
  2. Build BSP distribution from scratch for developers to start adding new sensors or building a software stack in 15 minutes after cloning SmartAg-foundation repo.
  3. Create a custom example stack from scratch, flash the connected board remotely with Telegraftelegraf service docker app with plugin to read data from S-Soil MTEC-02B, save in InfluxDB and display the data in Grafana dashboard
  4. Update and deploy by node name Edge Node services running on IoT RPi4 board in LAN by using custom Edge Server docker image from developer host.

...

MacOS/Linux based host with installed Docker Desktop (TBD: add alternatives OCI)

Containerised Architecture has been selected to build an isolated software components for Edge NodeEdge Server as well as for development and deployment tools.
It can be used without restriction, including without limitation to build isolated proprietary ecosystem for IIoT device management and zero-touch secure device onboard.

...

  1. Connect/solder S-Soil MTEC-02B with USB to RS485 as shown below
  2. Insert USB to RS485 into RPi4 board as shown below (do not connect power)
  3. Clone GitHub repository with SmartAg-foundation and change directory to SmartAg-foundation/tools
    git clone https://github.com/open-horizon-services/SmartAg-foundation SmartAg-foundation
    cd SmartAg-foundation/tools

  4. Download OS template BSP image, rename file to target_os.img and put it into SmartAg-foundation/tools

  5. Insert 16Gb+ SD card in drive and create/write initial BSP image by running the following command (example-edge-node should be unique Edge Node for your system):

    sudo ./write_bsp_image example-edge-node

    Enter SSID name, network password and confirm.

  6. After the BSP is written to disk, eject SD card, insert it into RPi4 and connect power.
    After the board is initialised it will be running Fledge container from Milestone 2: Outdoor single sensor 

  7. Now let's create a custom stack with one containerised application telegraf and exec plugin which runs python script which in turn will read S-Soil MTEC-02B sensor data similar to what we did in fledge plugin in previous milestone

    ./create_new_stack ../new_stack
    By default new stack will contain a workable solution with telegraf and exec plugin for S-Soil MTEC-02B.

  8. Before deploying a stack onto Edge NodeEdge Server needs to be started locally, to start Edge Server run:

    ./start_local_edgeserver
    This script will register new Edge Node capabilities and run Edge Server containers.

  9. To upload new_stack to the example-edge-node run the command, with Edge Node name (example-edge-node) and a new stack directory (new_stack):
    ./build_and_deploy example-edge-node ../new_stack
    First time it will take few minutes to start.

    <Add screenshots of Grafana>

...