Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 4.49 KB

README.md

File metadata and controls

50 lines (36 loc) · 4.49 KB

BubblesNet Edge Device

codecov edge-device-ci

All Contributors PRs Welcome

GitHub stars GitHub pull-requests Github all releases

Your Repository's Stats

balena deploy button

This repo is one of 6 repos that make up the BubblesNet project. If you've arrived at this repo through the side door (direct search), then you probably want to start with the documentation repository for this project. You can not understand this repo without seeing how it interacts with the other repos.

What is the Edge Device?

A collection of containers that communicate via gRPC to get edge device data to the controller where it can be viewed, analyzed and acted upon. These containers listen for commands from the controller to manage attached environmental control devices like heaters, fans and liquid dispensers. The sense-go container also implements automated control of attached devices via crop-stage environmental targets and schedules.

Container Description
wifi-connect This is a packaged block maintained by Balena that manages a typical IoT connect-to-wifi interaction
sense-go A Go language container that collects sensor data and forwards it to store-and-forward via GRPC and also controls the dispensers and AC devices and runs the automatic control code. The vast majority of the sensor and all the control functionality lives here.
sense-python A Python language container that collects temp/pressure/humidity data and forwards it to storea-and-forward via GRPC.
store-and-forward A custom block written in Go that uses a GRPC server to collect data from the sensor containers, uses BoltDB to store messages to be forwarded to the controller and forwards to the controller via the controller REST API.

Shared Data

Balena applications have the concept of data that is shared across containers. In docker-compose.yml this is the volumes item at both the top level and the individual service level. For example, code within sense-go that refers to the filesystem path "/config/config.json" is referring to the exact same physical file as code in sense-python which refers to "/config/config.json".

Configuration

All containers take their configuration data from /config/config.json which the sense-go container is responsible for creating and keeping updated via the API. A change to configuration often requires a restart of all containers.