Full source, under a licence we name
RBgrid's ESP32 firmware is published in full: measurement pipeline, statistics, tariff engine, storage, REST/WebSocket/MQTT. One build, every function. Source-available under PolyForm Noncommercial 1.0.0: free to use, modify and build for personal and non-commercial use; commercial use by licence.
- licence (PolyForm Noncommercial 1.0.0)
- platform ESP32-WROVER
- ESP-IDF 5.4.1
- 16 MB flash
- v1.1.0
Licence, in plain words
PolyForm Noncommercial 1.0.0. It is not an OSI-approved open-source licence, and we do not call it one. Here is what it means for you:
| Run it at home, in your workshop, at a school or a non-profit | Yes, free |
|---|---|
| Read, modify, rebuild, keep a private fork | Yes |
| Share your modified version with others, non-commercially | Yes, under the same licence |
| Use it inside a for-profit business, sell devices or kits running it, install it for paying customers | By licence — write to info@rbamp.com |
| Use the RBgrid name or logo on a fork | No — rename the fork |
| Use the rbAmp module libraries in any project, commercial or not | Yes — they are MIT, separate from this licence |
Third-party parts keep their own licences (ESP-IDF, patched I²C driver — Apache-2.0; littlefs — MIT/BSD): see NOTICE.
Why this licence: module sales fund the project; the licence keeps RBgrid free for people and lets companies that build on it contribute back.
What you get
Not in this repo: the web app (published alongside) and the rbAmp component (rb-amp/rbamp-esp-idf, MIT).
components/rbpower/(rbAmp I²C collection, statistics, tariff engine, storage, REST/WS, MQTT)main/(app, rbAmp bridge, event log)components/esp_driver_i2c/(patched ESP-IDF I²C driver, Apache-2.0, see NOTICE)docs/FLASHING.md,partitions.csv,sdkconfig.defaults.
How it is put together
ESP32-WROVER + PSRAM required; 16 MB flash, two OTA slots with rollback; history for up to 8 measurement points (runtime buffer table; the 4 MB stats partition has room for more, and raising the number of points kept in history is planned for a future release). History starts at v1.1.0: a clean cut; development continues in public from here. The firmware works API-only without the app package.

Build and flash
ESP-IDF v5.4.1 pinned. To build from a fresh clone, point main/idf_component.yml's rbamp entry at git: …/rbamp-esp-idf.git v1.7.2 (the next release does this for you). Or, once v1.1.1 is published, flash the release image without building — see Get started.
git clone https://github.com/robotdyn-dimmer/RBgrid.git
cd RBgrid
components/rbpower/certs/gen_dev_cert.sh # once, before the first build (generates the LAN HTTPS dev certificate)
idf.py set-target esp32
idf.py build
idf.py -p <PORT> flash # <PORT> e.g. /dev/ttyUSB0, COM3API: self-describing
GET /api/v1/schema lists every endpoint with methods and parameters — the reference on this site is generated from it (a custom descriptor, not OpenAPI)
REST
/api/v1summary, history, export.csv, economics, units, sensors, events
REST
/api/systemconfig, units, tariff plan, MQTT, Wi-Fi, time, security, token, OTA, backup/restore, UI upload
WebSocket frame v2 + MQTT
command channel, HA discovery
Writes need the admin token; reads are open on your LAN or gated by a read token; CORS allow-list for browser clients.
Issues, discussions, pull requests
Bugs and feature requests go to GitHub Issues; questions and show-and-tell to Discussions. Contributions are accepted under the Developer Certificate of Origin — you keep your copyright and certify that you have the right to submit the code. Your contribution is licensed under the project's terms: PolyForm Noncommercial 1.0.0. Anything beyond that we ask for in the pull request, not in advance.
The RBgrid name and logo stay with the project; forks are renamed.