You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

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

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


Stack can be single or more complex set of any containerised applications 

Steps to configure

  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.

In this milestone, we cover:

  • How to start and run the system from scratch
  • How to start your own customised solution 
  • How to update RPi4 board running all needed tools locally


Clone GitHub repository with SmartAg-foundation:
git clone https://github.com/open-horizon-services/SmartAg-foundation SmartAg-foundation
cd SmartAg-foundation/tools

To create an initial BSP image in SD card for the RPi4 board, where you can deploy your own services to support sensors.
Download OS image from here, copy file to SmartAg-foundation/tools/os.img
Insert SD card and run:
./write_bsp_image node_name
(node_name can be any suitable name for Edge node and will be used later to deploy the services)



Links

Distributed artificial intelligence
Open Retail Reference Architecture
The AgStack Foundation - https://agstack.org/



Goals

  1. Start system from scratch with ability to extend it with new services.


System Diagram

<>


  • No labels