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 open-source applications to be deployed to the RPi4 board.

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 Telegraf 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.

Prerequisites

Hardware

  1. Raspberry Pi4 model B 4GB+ RAM 
  2. Industrial Soil Moisture & Temperature & EC Sensor MODBUS-RTU RS485 (S-Soil MTEC-02B)
  3. 16+ GB micro SD Card
  4. Power supply for Raspberry Pi 4
  5. SD card reader
  6. x64 PC (laptop or dedicated server)
  7. USB to RS485 converter (or similar like USB-RS485-WE-1800-BT)

Software

MacOS/Linux based host with installed Docker Desktop
Image Added

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.

In this milestone container images are based on open source components to display, debug and analyse data from Edge Node with connected S-Soil MTEC-02B sensor.

From the structure view of the IoT device there are static BSP image and dynamic services or stack which are added/updated after device was onboarded.
Edge Node BSP image should be configured, so the device could update itself after the boot and later when new services are available for it.

The stack consist of one or more preconfigured and tested software components which are running in isolated containers on the board and managed by Deployment Agent.

To provide more secure board management there are no IP ports exposed from the board outside in production (this is configured when initial BSP image for the board is created).

A single Edge Server may manage/update more than 100k of clusters or stand alone Edge Node IoT devices.
Each Edge Node may control a hundreds of wired or wireless and very limited IoT devices (Arduino, STM32, ESP32, etc.) or/and sensors.
Also with added AI services, Edge Node may act as distributed AI node with federated learning capabilities.

Here is how the software components are deployed on Edge Node and on Edge Server

Image Modified

A software stack which is deployed to Edge Node, can be any set of proprietary or :

  • Proprietary/open-source containerised applications (

...

...

...

  •  Particle, etc.)
  • More complex software frameworks (EdgeX, ORRAFledge, etc.) with own software updates and management tools.


Stack can be single or more complex set of any containerised applications  software frameworksDistribution and Stack diagram

Prerequisites

Hardware

...

Steps to configure

...

  1. Connect/solder 
  1. S-Soil MTEC-02B

...

  1. with USB to RS485 as shown below
    Image Added
  2. Insert USB to RS485 into RPi4 board as shown below (do not connect power)
    Image Added
  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.

Software

...

In this milestone, we cover:

...