How to ... - mitra42/frugal-iot GitHub Wiki
Frugal IoT - How To ...
This is a top-level document on how to do various things - a bit like a FAQ.
Absence of a link typically means the necessary document has not been written yet.
Index (including pointers to other documents)
Build a ...
- Air Quality Sensor
- Temperature and Humidity Sensor
- Weight sensor / Scales
- WiFi relay - programming a Sonoff
- Flashing any project to a device
Configuring almost anything
Develop on devices
- Selecting hardware: list of supported hardware
- Developing a new project or example using exiting sensors, actuators, and controls
- Get setup for development - anything more than flashing a device
- Adding a new sensor - any kind of input
- Add a new actuator - any kind of output e.g. a display, or a relay
- Control - something that: Reads from other components (on its own, or other devices); makes decisions; and writes back.
- System components - talk to Mitra, or open a Github issue as this gets complicated
- Developing on the core library
Develop on the cloud**
- Developing on the UX
- Developing on the Server or Logger
More esoteric for developers
Administer the system**
Longer answers - linked from above
How to add an organization
** Note this may be out of date, and almost certainly requires admin priviliges you don't have ! **
Each group using Frugal IoT should have an organization
organizationswill be used for controlling permissions etc- The organization's abbreviation is the first part of
topics
To add an Organization: Select
-
A short abbreviation - one word, all lower case e.g. "abc"
-
A password - typical password rules, no spaces e/.g. "mysecret!1234"
- (at the moment this isn't very secret, we'll fix this as part of issue#89
-
On
frugaliot.naturalinnovation.org(currently only mitra can do this - create an issue):mosquitto_passwd -b /etc/mosquitto/mosquitto_passwordsabcmysecret!1234- its unclear if permissions on this file should be
-rwx------ mosquitto mosquitto, or be owned by root as message says
- its unclear if permissions on this file should be
service mosquitto restart# This might not be necessary, its unclear
-
Create a configuration file in frugal-iot-server/config.d/organizations
- use the existing dev.yaml as a template
- In future: The config.d file will be removed from the git because it may contain private passwords for the mqtt broker so for now if using
frugaliot.naturalinnovation.orgthis means contacting Mitra to get it posted to the server.
-
Edit the code for the nodes.
- Make sure your
main.cppsets the correct organization. e.g.- As first thing under the
includesSystem_Frugal frugal_iot("abc", "developers", "SHT30", "SHT30 Temperature and Humidity Sensor");- Note the project name in the code is usually
developersand then later configured on devices on deployment
- Note the project name in the code is usually
- and in main.cpp:setup
- `frugal_iot.configure_mqtt("frugaliot.naturalinnovation.org", "abc", "notverysecret");
- (in future this information will come from the
datadirectory so that it is not made public in git)
- (in future this information will come from the
- `frugal_iot.configure_mqtt("frugaliot.naturalinnovation.org", "abc", "notverysecret");
- As first thing under the
- Make sure your
Note: A longer name, and a description are likely to be required for organizations in future.
Adding a project
** Last updated Feb 2026.** ** Almost certainly requires admin priviliges you don't have! **
This needs adding to the config file for the organization in config.d, this controls what gets logged about the project and also makes sure that the
project shows up in the dropdown on index.html
The config.d file doesn't appear in the git because it may contain private passwords for the mqtt broker so
- for now if using
frugaliot.naturalinnovation.orgthis means contacting Mitra to get it posted to the server.
Moving a device to a new project
If you have physical access follow the following steps - in order!
- Access the device's captive portal - connect to it its WiFi
- Change the project, make sure to get the new name EXACTLY right, it will be lower case and is the id, NOT the name of the project (e.g. "lotus" not "Lotus Ponds"
- Restart the device - which you can do from the captive portal.
- Check anything that might be wired to this device - controls etc, they will need updating in the UX.
Note this is currently (Feb2026) being worked on to make it possible to do without physical access to the device, see issue#205