33 · DIYADVANCED
Your own board: DIY with an ESP32
If you build your own hardware, your brand does not have to be on the list in Connecting your first device. The app gives you a username, a password and an MQTT topic, and your board sends its readings straight to the server, without going through anyone's cloud. It is a read-only path: a DIY sensor reports, it does not switch anything on or off.
- 01☰ menu → Add device → Brain ESP32 (your own board).
- 02Before you create anything, open View contract and reference firmware. That is the protocol in writing, plus an Arduino sketch that already speaks all of it, so you adapt it to your sensor instead of starting from scratch.
- 03Tap ADD MQTT SENSOR. The app shows you the
secrets.hwith the credentials already in it, lets you download theconfig.json, and writes you a prompt ready to paste into an AI so it builds the firmware. - 04Flash the board and leave it publishing. With the first message that arrives, the screen picks it up on its own and lets you assign it to a zone.
How it connects
| What | Value |
|---|---|
| Server | newschoolgrowers.supercycler.app |
| Port | 8883, with TLS required. There is no plaintext MQTT, and you must verify the certificate against the CA shipped in the contract. |
| Username and Client ID | the board_id the setup gave you — it starts with diy_ |
| Password | the token from the setup |
| Topic | sc/diy/<board_id>/telemetry/<channel> |
| Channel | the one the setup gave you. Today the app creates a single one, called env0. |
| Delivery | QoS 1, and no retained |
What the message looks like
- It is a flat JSON object: one key per reading, all at the root. Nothing nested.
- Values go as a number, never as text:
{"t":23.5}gets in and{"t":"23.5"}is dropped. - Up to 1024 bytes per message. Anything bigger is thrown away whole.
- You can send several readings in the same message.
- The ones you leave out keep their last known value: a board that only sends temperature does not wipe your humidity.
- Keys the server does not know are ignored. If the message carries no valid reading at all, it is dropped whole.
- An out-of-range value voids only that reading, not the whole message.
- A key's long name is only used when the short key is absent. If you send
{"t":null,"temperature":21}the server keeps thenullfromtand the temperature is lost with no warning: pick one form and do not mix them. - You may include
ts(epoch seconds) and it is accepted, but the timestamp that counts is the one from arrival at the server. - One message every 30 to 60 seconds. The reference firmware sends one every 45.
What a board can measure
| Key | Also valid | What it is | Range |
|---|---|---|---|
t | temperature | Air temperature, in °C | −40 to 80 |
h | humidity | Relative humidity, in % | 0 to 100 |
sm | soil_moisture | Substrate moisture, in % | 0 to 100 |
vpd | — short key only | VPD, in kPa | 0 to 20 |
co2 | — short key only | CO₂, in ppm | 0 to 10000 |
ph | — short key only | pH of the solution | 0 to 14 |
ec | — short key only | EC of the solution, in mS/cm | 0 to 20 |
sec | soil_ec | EC of the substrate, in mS/cm | 0 to 20 |
stemp | soil_temperature | Substrate temperature, in °C | −40 to 80 |
wtemp | water_temperature | Water temperature, in °C | −40 to 80 |
Do this
Start from the reference firmware and swap the sensor. It already solves the parts that are hardest from scratch: verifying the certificate and the cadence.
Avoid this
Do not push the
secrets.h or the config.json to a repository. That password is the key to your board and there is no way to know who used it.How urgent it is
EssentialNothing: this is for people who build their own hardware.
ImportantCredentials saved before you close, and the topic copied exactly.
OptionalAdding substrate and solution readings to the same board.