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.
...
- Raspberry Pi4 model B 4GB+ RAM
- Industrial Soil Moisture & Temperature & EC Sensor MODBUS-RTU RS485 (S-Soil MTEC-02B)
- 16+ GB micro SD Card
- Power supply for Raspberry Pi 4
- SD card reader
- x64 PC (laptop or dedicated server)
- USB to RS485 converter (or similar like USB-RS485-WE-1800-BT)
...
Stack can be single or more complex set of any containerised applications
Steps to configure
- Connect/solder S-Soil MTEC-02B with USB to RS485 as shown below
- Insert USB to RS485 into RPi4 board as shown below (do not connect power)
- 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 - Download OS template BSP image, rename file to target_os.img and put it into SmartAg-foundation/tools
- 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.
- 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 - 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
...
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
...
Goals
- Start system from scratch with ability to extend it with new services.
System Diagram
...
-
./create_new_stack ../new_stack
By default new stack will contain a workable solution with telegraf and exec plugin for S-Soil MTEC-02B. - Before deploying a stack onto Edge Node, Edge 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. - 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>