-
Notifications
You must be signed in to change notification settings - Fork 7
Concepts
Mitra Ardron edited this page May 23, 2026
·
17 revisions
This document is intended to give a high level overview of some of the concepts in Frugal IoT for developers, so its a good place to start and there should be links to more detailed versions.
Currently there is no particular order to these, I am just trying to bring documentation together on concepts that in many cases bridge nodes, logger/server and client.
To be covered below:
- System Architecture
- Messages - the core of Frugal IoT
- Naming - how messages are addressed
- LoRa - how we'll handle longer range communications outside of WiFi range
- Control - how parts are hooked together into control systems
- Back Data / Logging - how we keep track of, and serve, old data
- File System - the node's disk storage - and other memory retention (broker, logger, RTC)
- Interrupts
- Power
- Processors - including adding new ones
- Local Ops - own server on RPi etc
- UX (both its ugliness and composability)
- Loops, periodic and infrequent
- Data Structures on Client
- Graphing
(in progress, needs editing)
- Messages are the core of Frugal IoT.
- All communications between modules are via messages. There should not be anywhere that one module reaches into another one for information.
- To-do: check for any exceptions and document here.
- On the node, the messages are all run through the messages module.
- Outgoing messages are queued by the messaging model, which then decides whether it has a connection to Wi-Fi. In which case it's sent via Wi-Fi to the MQTT broker, or, if not, if it has a LoRa connection, it sends by LoRaMesher. In the future, this is where we'll add GSM service.
- Incoming messages are received either by the Wi-Fi MQTT interface or the LoRa interface and added to the queue in the messaging module.
- The messaging module then pulls each module to see if it can handle the message. Each module checks for module-specific things, for example, names and/or description, and then polls each of its inputs and outputs to see if they can inform the message.
set LoRa packing LoRa gateway
Most of the time the sensor is running in a loop but things can happen on three different levels of frequency:
In each main.cpp we call e.g. frugal_iot.configure_power(Power_Deep, 600000, 30000)
This sets our "period" as 600000ms (10 minutes)
In the definition of the
- loop() is run every time the loop goes round. This happens very frequently - around once every 10ms.
- periodic() is run once for each period we define in the power setup so here it would be every 10 minutes. If we are sleeping, this is always once every time after we wake up
- infrequent() is run every time the loop goes round but it should check a timer to see whether it should run. Generally avoid using the timers unless necessary. See System_Discovery::infrequently() for an example.