All projects

Hardware + software · ongoing

Smart home IoT

Homemade CO₂, temperature and humidity sensors report through AWS IoT Core to a room-by-room dashboard of the house. A Bluetooth bridge sets an electric radiator, and a change only shows as applied once the radiator confirms it.

Notes updated

Drag to explore · scroll after clicking to zoom · dimensions reconstructed from photos

See the design and 3D printing page

In short

What it is, and where it stands

ESP32-C3 boards read CO₂, temperature and humidity and publish them over MQTT with mutual TLS to AWS IoT Core. A Lambda validates each message, DynamoDB keeps it, and a React dashboard puts it back on the two floors of the house. Settings travel the same path in reverse, and a change only counts as applied once the device reports it back.

13 devices
counted on 21 November
2 gateways
relaying 5 devices between them
495 automated tests
all passing on 21 Nov
3 readings per air sensor
CO₂, temperature and humidity
5 builds of the air sensor
from jumper leads to a white case
1 min between meter readings
counted from 1,000 flashes per kWh
  1. How a reading travels
  2. The air-sensor node
  3. The radiator bridge
  4. The electricity meter
  5. 18 to 21 November
  6. Autumn 2026
  7. Where it stands

MTS-3 · the air-sensor build

Five builds, from jumper leads to a white case

Early ESP32-C3 wired to a temperature and humidity sensor

01 / Loose wires

A sensor on the end of a cable

The first version was an ESP32-C3 and a temperature / humidity sensor joined by jumper leads. Small enough to get a reading, with everything still out in the open.

1 / 5

Still experimenting: the small blower and airflow tests are another branch of the build.

14 – 29 November 2026 · latest

Reading the electricity meter

The electricity meter flashes an amber light 1,000 times per kilowatt-hour. A light sensor and an ESP32-C3 in a black 3D-printed box now count those flashes, and the house’s energy and power reach my dashboard every minute. Getting there took a resistor swap, a new way of counting, and a test strip printed to find the size of one raised nub.

1,000 flashes per kWh
so one flash is 1 Wh
10 → 470 kΩ one resistor
about 50 times the signal
2.85 V drop per flash
for about 190 ms, measured at the meter
0.20 mm the fit that worked
of four pocket sizes on one test strip
22 × 63 × 20 mm box
two boards and one USB-C cable
60 s between readings
since the evening of 29 November
  1. No API, so count the blinks
  2. A sensor that couldn’t see the meter
  3. Counting flashes in software
  4. From a taped disc to a keyed box
  5. On the meter

The idea

No API, so count the blinks

Started 14 November 2026 (PR 36). The first part is in Autumn 2026

My electricity supplier has no API for my own usage, and the network operator’s download page sits behind a CAPTCHA. The meter itself, a Kamstrup OMNIPOWER, has a slit marked 1000 imp/kWh that flashes once for every watt-hour.

1 Wh
per flash
7.2 × 1.2
millimetres, the kWh slit
7.8 mm
below it, a second slit for reactive energy that has to stay out of view
The upper slit under the display, flashing once. Filmed on 29 November.

energy = start reading + flashes ÷ 1,000 kWh
power = 3,600 ÷ seconds between flashes W

A flash every 3.6 seconds is 1 kW. With the kettle on, the slit flashes more than once a second.

Each flash is the meter’s own measurement, so the total tracks the meter exactly, as long as no flash is missed or counted twice.

On the bench · 27–28 November

A sensor that couldn’t see the meter

Probe sketch and the module change merged 29 November (PR 47)

The LM393 light module switched cleanly for a torch and not at all for the meter. Its analog output sat flat at 2,944 mV, the top of the ESP32-C3’s range. The photodiode hung off a 10 kΩ resistor, so a light as dim as the meter’s moved the output by a few millivolts.

  1. Bench test · 28 November

    The digital pin chattered

    At the meter the comparator output didn’t switch, and the firmware threw away 546 edges as bounce. A probe sketch that served the analog reading to a live web page showed why: a flat line at the ceiling.

  2. Schematic · 28 November

    Find the right resistor

    The module came without a schematic. Waveshare’s flame-sensor board matched it: the second “103” from the left is the photodiode’s load. The other one is the comparator’s pull-up, so it stayed.

  3. At the meter · 28 November, 19:18

    470 kΩ, kettle on

    Shielded, the output rested at 2.94 V and fell to about 0.05 V for 190 ms on every flash: 0.7 flashes a second, roughly 2.5 kW. The module’s own LEDs lit its photodiode at this gain, so they were covered, then removed.

The small blue LM393 light-sensor module lying beside a red set square: four header pins at one end, a clear 5 mm photodiode at the other.
The module as bought: four pins, a clear 5 mm photodiode and a trimmer.
A wiring sheet: photos of both sides of the module with the parts to remove marked, the SuperMini’s three pins (3.3 V, ground and GPIO4) with coloured wires, and the two boards laid end to end with the 470 kilohm resistor across the module’s VCC and AO pins.
The wiring sheet I soldered from: three 45 mm wires, with the 470 kΩ resistor lying flat across VCC and AO on the module.

The digital output never switched after the change, because its trimmer was set for the old resistor. Counting moved to the analog pin, and into software.

Firmware · 29 November

Counting flashes in software

Merged 29 November (PR 47), with compile-time tests of the detector

A task reads the analog pin about once a millisecond. It runs above the main loop, so it keeps counting while the board is busy with TLS, MQTT or a dropped Wi-Fi connection. It follows the resting level itself, so there is no trimmer to set. Try it below: the detector is the firmware’s own, ported line for line.

300 mV
below the resting level starts a flash. It ends when the signal comes back within 150 mV.
20 ms
Shorter than this, it’s a glitch.
1.5 s
Longer than this, it’s a light coming on. The detector takes it as the new resting level.
40 ms
Two flashes that start closer together than this count once.

The count lives in RTC memory, so a crash or a reboot for an update keeps it. It is saved to flash every 15 minutes and before every firmware download, so a power cut loses at most 15 minutes of flashes. Energy is the start reading plus the count, so re-aligning with the meter means changing one number.

On the 3D printer · 14–29 November

From a taped disc to a box that keys onto the meter

Final box merged 29 November (PRs 50 and 52)

The first holder was a disc to tape over the slit, and taping it on was awkward. Bending the photodiode 90° let both boards lie flat against the meter instead of sticking out from it. That became one box, 22 × 63 × 20 mm, located by a raised nub that sits under the meter’s slits.

0.1 mm
from the diode’s lens to the meter, which rests on a 4.2 mm ring
4.0 mm
deep pocket for a nub that stands 2.5 to 3 mm proud
0
drops of glue on the meter: it belongs to the network operator
Render of the black box on a grey meter face with its lid off: the blue light-sensor module at the top, the SuperMini below it and a USB-C opening in the bottom wall.

The box with its lid off: the module at the top, its photodiode in a tube over the kWh slit, and the SuperMini below with its USB-C at the bottom wall. Render.

The printed parts, drawn from the same STL files I printed. Drag to turn them. The meter face is a simplified sketch.

  1. Holder v1 · 14 November

    An 18 mm disc

    Sized from photos, with the display about 11 mm above the LED. Taping a disc over a slit 1.2 mm high turned out to be awkward.

  2. Holder v2 · 27 November

    A bigger foot

    30 × 24 mm with ribs, side wedges and a wire-tie tail, lined up by sighting down the empty bore. Never printed: the area around the LED hadn’t been measured, and the foot might have covered a button.

  3. Concepts · 28 November

    Lie it flat

    With the diode bent, the boards can lie against the meter. Two layouts: Stack, both boards in one box, and Split, a sensor box with the SuperMini beside it. Stack was cleaner.

  4. Fit coupon · 29 November

    The nub was taller

    Sized from ruler photos, ±0.5 mm. The diode fitted, but the nub stood more than twice as proud as the coupon’s 1.2 mm pocket allowed.

  5. Key test · 29 November

    Eight pockets on one strip

    Four nub pockets, 0.10 to 0.40 mm oversize, each with its own window, and four depth gauges. Printed in about 15 minutes. The 0.20 mm pocket fitted with the slit centred in its window.

  6. Box · 29 November

    Clicks shut, keys on

    The first box, at 0.20 mm, was a touch tight and its lid had nothing to hold it. The pocket went to 0.25 mm, the lid got click-in ridges, and the back a recess for a Command strip.

Six renders of the two flat layouts on a grey meter face: Stack closed, Stack with its lid off, Stack with the SuperMini lifted out, Stack from the side, and Split with its lids off and closed.
Stack and Split, the two flat layouts. Renders.
A blue printed fit coupon held against the side of the meter, with the bent photodiode seated in its tube and the module’s board standing beside it.
The fit coupon on the meter, diode in its tube.
The blue key-test strip pressed onto the meter below its display, one of its windows over the kWh slit. The meter’s label is blurred.
The key test on the nub, from the 0.20 mm pocket. Label blurred.
On a wooden desk, the breadboard used for the bench tests beside the printed black box with both boards inside.
The breadboard it came from, beside the printed box.
The light module and the black ESP32-C3 SuperMini joined by three short wires, lying in an open hand, the photodiode bent over the top of the module.
Soldered: the diode bent over, three wires to the SuperMini.
Both boards lying in the open black box, the SuperMini’s USB-C socket at one end.
Both boards in the base. A wall between them keeps the SuperMini’s LEDs off the diode.
A finger pressing the SuperMini down into its cradle in the black box, the blue module already in place beyond it.
The SuperMini drops into its cradle; plugging a cable in can’t move it.
The closed black box held in a hand, a USB-C cable coming out of its bottom end.
Closed, cable out of the bottom.
The back of the box in a hand: a small window near the top and a shallow textured recess below it.
The back: the window at the top and the recess for the Command strip.

Live · 29 November

On the meter, and on the dashboard

Fitted on the evening of 29 November 2026; dashboard view merged the same evening (PR 51)

The box went on the meter on a Command strip, with black tape over it for now. It reports as EM-1 over the same UDMI and AWS IoT path as the room sensors. The dashboard has an Electricity card on its home screen and a page for the meter.

The electricity meter in its cupboard reading 40912 kilowatt-hours, with the black box taped on below the display and a USB cable running down from it.
Fitted, reading 40,912 kWh.
~0.9 kW
with the house idling
4–6 kW
with the kettle on
2 of 2
remote firmware updates succeeded, the first on this board
PointUnitsValue
energy_accumulatorkWhThe meter’s import register (1.8.0), to 1 Wh
power_sensorWFrom the gap between the last two flashes. When the next flash is overdue, the wait itself caps the figure, so it falls towards zero when the house goes quiet.

To line the count up with the meter, I timed the display ticking over to 40,914 kWh and pushed one new start figure, 40,912.36 kWh, to the board as a remote update. The count carried on, so no flash was lost. kWh per day is each day’s highest reading minus the day before’s.

18 – 21 November 2026

Four days in November

The dashboard now opens on the house and fits a phone. Two gateways brought in sensors that have no connection of their own, a light bulb and a second radiator. And one case stopped being a box and became a small white object called Louvre.

Dashboard pictures come from the dashboard’s demo mode. The readings in them are made up, not the house’s.

15 pull requests merged
all on 21 November
13 devices
8 more than on 17 November
2 gateways
relaying 5 devices between them
495 automated tests
all passing on 21 Nov
3 Louvre prints
two failures, then a clean one
0 cloud alarms
14 removed; the app reports what is offline
  1. A dashboard that opens on the house
  2. Sensors with no socket
  3. A light and a second radiator
  4. Louvre, a case worth looking at
  5. Off the branches

Dashboard

A dashboard that opens on the house

Merged to main on 21 November 2026 (PRs 28, 30, 38)

The first screen used to be a list of room cards. Now it is one sentence about the house, the house itself in 3D, then the controls you reach for most. It was designed at phone width first, and you go from house to room to device.

3
levels: house, room, device
To scale
rooms, walls, doors and stairs redrawn from the house type’s plan
33
browser flows tested, one of which turns the 3D house and fails if two labels overlap
The house in 3D with its two floors lifted apart. Each device is a pin where it sits, and each room has one label docked above or below the model, joined to its room by a line: Master Bedroom 19.3 degrees, Spare Bedroom 18.2, Bathroom 22.1, Kitchen 20.3, Sitting Room light on.
The house, floors lifted apart so each is seen whole. One label per room, kept clear of the model at any angle. Demo data.
The home screen on a phone: the headline ‘Bathroom is warm’, tiles for temperature, humidity and CO₂ ranges, then the 3D house with a label for each room and a bar of tabs along the bottom.
The same screen on a phone. The headline says what needs attention before anything else. Demo data.
Both floors as flat plans on a phone, with each device marked and rooms labelled with their readings.
Plan view, drawn to scale. Demo data.
The Master Bedroom page on a phone: temperature 19.3 degrees, humidity 53 percent, CO₂ 871 ppm, and a heating dial holding the room at 20 degrees.
A room page: its readings, then its radiator. Demo data.
The Sitting Room light’s page on a phone: on, brightness 70 percent, warm white at 2700 K, with a power switch and brightness slider.
A device page: the Sitting Room light. Demo data.
The Spare Bedroom gateway’s page on a phone, listing the two devices it relays, the room’s sensor and its radiator, and where it sits on the plan.
A gateway’s page lists what it relays. Demo data.

Moving a device is now a drag on the plan and a press of Save; it used to mean editing a file and redeploying. The bedroom sensor with the screen keeps only its CO₂ reading, since its screen warms its own thermometer, and the room takes temperature and humidity from the sensor beside it.

New hardware

Sensors with no socket

Merged to main (PRs 24, 29, 31); both gateways running since 21 November 2026

The bathroom has no socket, so its sensor runs on a coin cell and speaks Zigbee. A small board nearby listens for it and passes each reading on over Wi-Fi. The sensor still appears in the cloud as a device of its own, under its own name.

Channel 25
for Zigbee, clear of Wi-Fi channels 1 to 11 on the same board
−100 dBm
from the bathroom to upstairs: too weak, so the gateway lives downstairs
2,048
characters is the cloud’s limit on one access policy; relayed devices now get a second one
TWO GATEWAYS Five devices that cannot reach the cloud themselves NO CONNECTION OF ITS OWN GATEWAY CLOUD Bathroom sensor Zigbee · coin cell · no socket in the room Kitchen sensor Zigbee · coin cell Sitting Room bulb Shop-bought colour bulb · local network only Spare Bedroom sensor Four wires to the gateway board Spare Bedroom radiator Bluetooth Gateway 1 · Sitting Room ESP32-C6: Zigbee and Wi-Fi in one board Reads the bulb every 10 seconds No readings of its own Gateway 2 · Spare Bedroom ESP32-C3: Bluetooth and Wi-Fi Was that room’s plain sensor until 21 Nov AWS IoT Core Each relayed device keeps its own name, topics and history. A reading for a relayed device is accepted only when it arrives through that device’s own registered gateway.
What sits behind each gateway, and how it gets there.

Control

A light and a second radiator

Merged to main (PRs 27, 31); the bulb has taken commands since 21 November 2026

A shop-bought colour bulb in the Sitting Room and the Spare Bedroom’s radiator are now on the home screen, next to the first radiator. The bulb only speaks its maker’s protocol on the local network, so a gateway drives it and reports for it.

< 1 s
from a command leaving the cloud to the bulb confirming it
10 s
between checks of the bulb, so a change made in its own app shows up too
5
things to set: power, brightness, white temperature, hue and saturation
Quick controls on a phone: the Sitting Room light on at 70 percent with a brightness slider, the Master Bedroom radiator heating to a 20 degree target, and the Spare Bedroom radiator off with a 15 degree target, each with plus and minus buttons.
Quick controls on the home screen. A radiator step sends itself a moment after the last press; the full dial still asks first. Demo data.

Still only applied when the device says so

The gateway applies each new setting once and reports back, point by point, what the bulb accepted. The dashboard shows a change as applied only after that report, the same rule the first radiator follows.

The board holds a hash of the bulb account’s login, never the password.

On the 3D printer

Louvre, a case worth looking at

Third print fits, 20 November 2026; sensor seat redrawn since and not yet reprinted

The brief for the smallest sensor case changed from ‘make it fit’ to ‘make it a small piece of art’. Three concepts came back. The one picked, Louvre, wraps seventeen slats around its front and sides and leaves the sensor in an open cage where you can see it.

22.1 × 49.2 × 7.6
millimetres
17
slats, 2.8 mm apart
5.0 g
of filament, no supports
Render of the Louvre case lying flat with a USB cable attached: a small white block whose front and sides are wrapped in thin slats.
Louvre. Render.
Render of the Louvre case with its back plate lifted off, showing the small blue controller board and the green sensor board in separate chambers.
Back plate off. Two slots through the body keep the controller’s heat away from the sensor. Render.
Four small white cases side by side at the same scale: the earlier Pebble with a pattern of dots, then the three concepts: Louvre with horizontal slats, Garden with raked lines and rings, and Tittle shaped like an exclamation mark.
The Pebble it started from, then the three concepts at the same scale: Louvre, Garden and Tittle. Renders.
  1. Print 1 · 19 November

    No slats at all

    The design was fine. The slicer had loaded front and back as one object, so a copy of the back plate sat inside the front and filled it in. Fixed with a ready-made print file.

  2. Print 2 · 19 November

    The cage turned to spaghetti

    The slats over the sensor were cut through the side walls too, so each stood alone as it printed. The cage now opens through the face only, and a new check looks for anything standing by itself.

  3. Print 3 · 20 November

    Clean, and the boards fit

    The sensor sat tilted by about 10°, because its leads landed on the ribs under it. The seat now has a trench for the leads and keeps the board visible through the slats. Not yet reprinted.

The printed white Louvre shell on a desk beside a ruler, with the controller board and the green sensor board resting inside it.
Third print, boards resting in place.
Looking down into the printed case: the controller board and sensor board joined by four short coloured wires.
Wired: four short wires join the two boards.
The open case with both boards fitted, held in the palm of a hand, about the length of two finger joints.
In the hand, back plate off.
The closed white case lying on an open hand, back plate up, with a short row of vent slots near one end.
Closed, back plate up.

Housekeeping

Off the branches

Everything below is on main as of 21 November 2026

A review found firmware running on boards, and every hardware design, saved only as working copies on one PC. All of it is now merged, and there is one rule to stop it happening again: nothing is put on a board or in the cloud from code that has not been pushed.

The notebook screen
Merged (PR 37). On the bedroom sensor since 25 October.
Kitchen self-recovery
Merged (PR 35). The kitchen board still needs its first update over USB.
Electricity meter reader
Merged (PR 36). Built, not yet fitted to the meter.
Sensor cases
Merged (PR 32), with the Louvre, Garden and Tittle concepts, the carrier board and the September enclosure studies (PR 33).
Cloud alarms
All 14 removed (PR 26). They mostly fired when the dashboard opened; the app already says which device is offline.
Request limits
The dashboard’s data function was refusing requests daily, 114 on 20 November. Its limit went from 10 at a time to 100 (PR 38).

What comes next

  • Reprint Louvre with the new sensor seat.
  • Try the new dashboard on a real phone, and tape-measure the rooms.
  • Take the self-recovery firmware to the kitchen sensor over USB.
  • Fit the meter reader and add an energy tile.
  • Finish the self-heating test: cover off, then a small fan.
  • A sensor for the Sitting Room and the Hall.

24 October – 17 November 2026

Autumn 2026

The dashboard was rebuilt around rooms, the boards learned to take signed updates from anywhere, the cloud started keeping hourly and daily summaries, and the desk filled up with small white cases.

Dashboard pictures come from the real dashboard code running on test data. The readings in them are generated, not the house’s.

25 days
24 Oct to 17 Nov 2026
12 pull requests merged
2 more open
+21,265 lines
3,566 removed, across 156 files
5 boards
three sensors, a radiator bridge and a spare
326 automated tests
all passing on 17 Nov
10 update scenarios
run against a real board
8 case prints
in three days
24 OCT – 17 NOV 2026 Twenty-five days, four lanes 12 pull requests merged, 2 open. Dots are single days; bars are work that ran over several. 24 Oct 31 Oct 7 Nov 14 Nov 17 Nov Dashboard Firmware Cloud Hardware what you see what the boards run AWS side things on the desk Rebuilt around rooms and trends Each device compared with its own history Commissioning Studio and 3D house Radiator dial, room gauges Updates over Wi-Fi Signed updates from anywhere Radiator bridge survives a weak link Meter pulse reader written Self-recovery tested on a real board Hourly and daily rollups Firmware bucket and update jobs Fifth board joins One file describes the house Notebook screen goes onto the bedroom sensor Carrier PCB v0.1 laid out Screen self-heating test 8 case prints in 3 days shaded columns are weekends
  1. The house, on one screen
  2. Heating you set with a dial
  3. Add a board in four steps
  4. Update a board from another country
  5. Why the bedroom read 27 °C
  6. A CO₂ reading with a sense of humour
  7. The kitchen sensor that stopped talking
  8. Eight cases in three days
  9. Reading the electricity meter by its blink
  10. Tested, not just built

Dashboard

The house, on one screen

Merged to main (PRs 10, 11, 18, 19, 21)

The overview now leads with the floor plan. Every device sits where it really is, rooms tint by temperature, humidity or CO₂, and a slider under the plan replays the last day across the whole house.

3
ways to tint the plan: temperature, humidity, CO₂
24 h
replayed by dragging one slider
2
floors stacked in a 3D view you can turn
Dashboard overview: two floor plans side by side with device markers, room cards for the kitchen and master bedroom with gauges for temperature, humidity and CO₂, and the start of the trends charts.
The overview. Floor plan on the left, a card per room on the right. Demo data.
Master Bedroom room card with temperature, humidity and CO₂ gauges and three devices listed: the air sensor marked 'screen warms it', the sitting room sensor giving room temperature and humidity, and the radiator.
A room card. Each gauge shows where the reading sits in its reference range and how far it moved. Demo data.

Dashboard

Heating you set with a dial

Merged to main (PR 21)

The radiator has a dial. The filled arc is the measured temperature and the handle is the target. Drag it, and nothing is sent until you confirm. Then the dashboard waits for the radiator itself to say the change is real.

Radiator dial holding the room at 20.0 °C, room now 18.2 °C.
1. Resting: holding the room at 20 °C. Demo data.
Radiator dial with the handle moved to 22.0 °C and a bar reading 'Room target 20.0 to 22.0 °C' with Cancel and Set buttons.
2. Handle moved to 22 °C. Nothing sent yet. Demo data.
Radiator dial at 22.0 °C with the message 'The radiator confirmed this change.'
3. Confirmed by the radiator, not assumed. Demo data.

Dashboard

Add a board in four steps

Merged to main (PR 18): 6,733 lines added across 66 files

Adding a device used to mean editing several files by hand and keeping them in step. Now there is a Commissioning Studio: pick the hardware, click the floor plan where it sits, run the commands it writes for you, and watch for the first reading.

Commissioning Studio step 1: three kinds of hardware to choose from, a climate sensor, an air quality sensor and a radiator bridge.
1. Choose the hardware. Demo data.
ONE SOURCE OF TRUTH One file describes the house Floors, rooms, devices and what each can measure are written once. Everything else is generated from it. site/site.json { "floors": [ … 7 rooms … ], "areas": [ "Spares" ], "profiles": { "climate_sensor": …, "air_quality_sensor": …, "radiator_bridge": … }, "devices": [ { "name": "Kitchen Live Sensor", "profile": "climate_sensor", "room": "Kitchen", "position": { "x": 91.2, "y": 70 } }, … 4 more … ] } Floor plan and 3D house walls raised from the rooms, a pin for every device READ DIRECTLY Room cards and gauges which points exist, their units and safe ranges READ DIRECTLY Cloud allow-lists only listed devices may send readings or take commands SYNC SCRIPT Backend registries the same profiles, for both server stacks SYNC SCRIPT Device metadata one standard description file per board SYNC SCRIPT Commissioning commands the exact lines to run for a new board STUDIO A test fails if any generated copy drifts.
Why it works: the house is described once, and everything else is generated.

Firmware

Update a board from another country

Merged to main (PR 15) and running on three of the five boards

The boards could already be updated over the home Wi-Fi. That stops working the moment you are not at home. So updates now travel through the cloud, and a board installs nothing it cannot prove was signed for it.

UPDATE FROM ANYWHERE One update, and every gate it has to pass Measured on the sitting-room sensor, 26 October 2026: a 1.23 MB image downloads in about 10 seconds. 1 LAPTOP Build and sign Image hashed (SHA-256) and the job signed with a key that never leaves the laptop. 2 CLOUD Upload One image in a private bucket. It is deleted when the job ends. 3 CLOUD Create the job Names the board and the build it must be on. The download link is made fresh and lasts 10 min. 4 BOARD Check before trusting Signature, right device, right starting build, not expired. Any miss: refused, no download. 5 BOARD Download and compare Fetched over HTTPS into the spare half of the flash. Size and hash must match what was signed. 6 BOARD Restart into it The old build stays untouched in the other slot until the new one has earned its place. 7 BOARD Probation Hold the cloud link for 60 s and fetch the start of its own image again: proof the next update works. Kept about 80 s after the push Rolled back not kept within 10 minutes 1.23 MB image size ≈ 10 s to download 60 s holding the link, then kept 10 min limit before rollback 3 crashes in a row also roll back
One update, and every gate it passes.
TESTS ON REAL HARDWARE Ten ways we tried to break it Run on the sitting-room sensor on 26 October 2026, with its serial log as the witness. WHAT WE DID WHAT THE BOARD DID OUTCOME 1 A normal update, through the cloud only Installed and kept. Done four times. INSTALLED 2 A job created while the board was offline Waited in the queue, ran as soon as it reconnected. INSTALLED 3 An old job sent again Refused: the board is not on the build the job expects. REFUSED 4 A job edited after it was signed Refused: the signature does not verify. REFUSED 5 A job past its expiry time Refused: the job has expired. REFUSED 6 An image that does not match its signed hash Downloaded, hash mismatch, stayed on its build. STAYED PUT 7 An image deleted before the download Download failed (HTTP 403), stayed on its build. STAYED PUT 8 A build that cannot reach the cloud Installed it, then went back exactly 10 minutes later. ROLLED BACK 9 A build that passes, then crashes Crashed three times, returned to the previous build. ROLLED BACK 10 Dashboard settings after all of the above Still received and confirmed on every reconnect. STILL WORKS The same run found three real faults, all fixed the same day: a script variable that silently turned a remote push into a local one · a board that stopped listening for jobs after its self-test · a stale status message that could overwrite the news of a rollback.
Ten ways we tried to break it, on a real board, on 26 October 2026.

An experiment

Why the bedroom read 27 °C

Dashboard change merged (PRs 12, 13, 19); the cover-off and fan stages are still to analyse

The bedroom sensor has a small round display. It also reported a bedroom nine degrees warmer than it felt. So a second sensor, with no screen, sat beside it for three days.

AN EXPERIMENT IN ONE BEDROOM The screen warms its own thermometer Two sensors side by side for three days (25–28 October 2026, case closed). Same air, very different readings. 10° 15° 20° 25° 30° °C No screen plain sensor about 18 °C With a screen same shelf, same air 27 – 28 °C +9.4 °C warmer with the screen on (median +9.5, spread ±0.6) −25 % RH drier, because warm air holds more water How we know the sensor is not broken Work out the dew point from each sensor and the two agree to about 1.2 °C. The moisture in the air is the same. Only the temperature around the chip differs, so it is heat from the board and display. The gap moves with the day widest overnight, narrowest late morning +9.7 °C overnight +8.8 °C 10:00 – 13:00
Three days side by side, 25 to 28 October 2026, case closed.

The dashboard now reads the room's temperature and humidity from the sensor without a screen, keeps the screened one for CO₂, and labels it 'screen warms it' on the room card.

The little round screen

A CO₂ reading with a sense of humour

Running on the bedroom sensor since 25 October 2026; merged to main on 21 November (PR 37)

The bedroom sensor's screen is drawn like a page from a notebook. A stick figure lives on the CO₂ number. As the air gets worse the number itself starts to lose the plot: a digit flips, digits swap, the number reads backwards, then drifts off. Cold brings ice. Heat brings flames.

240 × 240
pixels, 1.28-inch round display
6.3
frames a second, measured on the board
28.8 KB
drawing buffer, in four bands, where a whole frame would need 115 KB
The round screen at a real CO₂ of 1350 ppm and 21.4 °C: it shows 3150 ppm.

Real CO₂1350 ppm

The screen says3150

Rendered by the firmware’s own drawing code on a PC, not mocked up.

Ten frames in a row at 1350 ppm: the number 1350 flickers and settles as 3150.
Ten frames at 1350 ppm: the digits swap places.
All 25 faces at once
A five by five grid of round screen faces. Across: 10, 14, 21.4, 26 and 32 °C, from frozen to on fire. Down: real CO₂ of 650, 1000, 1350, 1800 and 2600 ppm, shown as 650, a 1000 with a flipped digit, 3150, 0081 and a drifting 2e00, with the caption going from 'CO₂, definitely' to 'CO₂, no idea'.
Every face it can make. Across: 10 to 32 °C. Down: real CO₂ of 650, 1000, 1350, 1800 and 2600 ppm. The number on screen gets less trustworthy as the air does.

A sensor that went quiet

The kitchen sensor that stopped talking

Tested on a real board on 15 November 2026; merged to main on 21 November (PR 35). The kitchen sensor still needs a USB visit

The kitchen sensor stopped reporting twice while still plugged in, once for 3.7 days and once for 9.4. No other sensor had a gap. Nothing noticed, and nothing restarted it. The firmware now looks after itself in three layers.

A SENSOR THAT WENT QUIET Powered, connected, and saying nothing The kitchen sensor stopped reporting twice while still plugged in. Nothing noticed, and nothing restarted it. ITS READINGS, SEPTEMBER TO NOVEMBER 3.7 days silent 2 – 5 Sep 9.4 days silent 5 – 14 Nov Sep Oct Nov one missed sample in three months outside the two gaps; other sensors had no gap at all WHAT THE NEW FIRMWARE DOES ABOUT IT 120 s The main loop stops A watchdog restarts the board. Drill: a deliberate hang. Restarted itself after 120 s. 5 min Off the network The Wi-Fi radio is reset, and again every 5 minutes. Drill: the link held down. Radio resets, then a restart. 30 min Still offline, or no readings The board restarts itself and says why when it is back. Drill: a new build pushed remotely, start reason reported. Where it stands All three drills passed on the sitting-room sensor on 15 November 2026. The kitchen sensor itself still needs one visit with a USB cable.
Two silences, and the three layers that should stop a third.

On the 3D printer

Eight cases in three days

Printed 15 to 17 November 2026; merged to main on 21 November (PR 32). The story continues with Louvre

Eight sensor cases in three days. The first five kept the board's header pins and ended up the size of a matchbox. Then the pins and the sensor's carrier board came off, and the case shrank to something closer to a stick of gum.

EIGHT PRINTS IN THREE DAYS From matchbox to stick of gum Each case drawn to the same scale: footprint on top, thickness underneath. What was said about each one is quoted. FROM ABOVE FROM THE SIDE Tile v1 15 Nov 40 × 45.5 × 19 “the fit is pretty good” but the lid lifts over the sensor Tile v2 15 Nov 38.8 × 44.5 × 18.6 closes flush; the sensor cap sits 1 – 2.4 mm proud Tile v3 15 Nov 39.5 × 44.2 × 18.6 “too tight”: the lid would not close Tile v4 16 Nov 39.5 × 44.2 × 18.6 “pretty good, maybe 2 – 5% tighter” Flip 16 Nov 39 × 43.6 × 18.6 sensor moved away from the USB cable 12.6 g · 35 min Nano 17 Nov 21.8 × 48.6 × 7.3 no header pins 4.4 g · 20 min “lid is a bit flimsy” Nano v2 17 Nov 21.7 × 48.3 × 7.3 lid seat now spans the whole case fit not yet reported Pebble 17 Nov 21.7 × 48.3 × 7.3 rounded, dot vents, firmer snap fit not yet reported header pins kept pins and carrier board removed 34.6 cm³ 7.7 cm³ outer volume, Tile v1 to Pebble: 78% smaller Printed in PLA on a Bambu Lab A1 mini, three wall loops. Sizes are in millimetres. Part sizes were scaled from phone photos against known pin spacing, about ±0.3 mm, not calipered.
Every print, to the same scale, with what was said about it.
A white 3D-printed square case on a wooden desk with a white vented sensor cap showing through a window in the lid.
Tile v2. The sensor's cap pokes through the lid so it sits in room air.
The end of the white case held in a hand, showing the USB-C opening and two vent slots.
The USB-C end, with vent slots.
A white case held in a hand with a visible gap between lid and base.
Tile v3: 'too tight'. The lid would not close.
A small green sensor board with its white cap removed, beside the cap and a ruler.
Measuring the sensor with its cap off, to design the slimmer cases.
Render of the Pebble case: a slim rounded bar with two fields of dot vents, a pill-shaped slot and a USB-C opening at one end.
Pebble: rounded corners, dot vents, a firmer snap.

Next sensor

Reading the electricity meter by its blink

Firmware and printed holder made on 14 November 2026; merged to main on 21 November (PR 36). Fitted on 29 November: how it went

My electricity supplier offers no way to fetch my own usage automatically. But the meter has a small light that flashes once for every watt-hour. Count the flashes and you have the energy. Time the gap between two and you have the power.

READING THE ELECTRICITY METER Count the blinks The meter's light flashes 1,000 times per kWh. There is no API to ask, so a light sensor watches it instead. Meter light 1 flash = 1 Wh Light sensor photodiode, 3 wires Small board counts every flash Dashboard kWh and watts THE GAP BETWEEN TWO FLASHES IS THE POWER watts = 3,600 ÷ seconds between flashes 36 s apart 100 W roughly a house idling 3.6 s apart 1 kW roughly a toaster 1.2 s apart 3 kW roughly a kettle 0 s 40 seconds Where it stands Firmware and printed holder made on 14 November 2026. The sensor part is on order; nothing is fitted to the meter yet.
The gap between two flashes is the power.

Proof it works

Tested, not just built

Run on main at 52950d7

All four test suites were run again while putting this page together, on 17 November 2026. Every test passed.

PROOF IT WORKS 326 checks, every one green One dot per automated test. All four suites were run for this page on 17 November 2026 and passed. 326 passed 0 failed, 0 skipped 204 Dashboard logic 22 test files: readings, rooms, insights, the dial’s maths 65 Control backend commands, permissions, the device registry 40 Telemetry backend ingest, queries, hourly and daily rollups 17 Browser flows a real browser clicking through the dashboard AND BEYOND THE TEST SUITES 10 update scenarios run by hand on a real board: replayed, tampered, expired, corrupted, crashing 3 self-recovery drills on a real board: a hang, a dead link and a remote push, all recovered 17 compile-time checks sensor freshness rules the firmware cannot be built without passing 3 faults found and fixed by the update tests themselves, before anything depended on it
One dot per test. Run on main at 52950d7 on 17 November 2026: 326 passed, 0 failed.

Message flow

From the sensor to the dashboard, and back

Readings go up through AWS to my dashboard. Settings come back down the same path to the device.

On the device◎

MTS-3

Read the sensors

ESP32-C3 · SHTC3 · SCD40
AWS / connect↔

IoT Core

Receive pointset

MQTT · mutual TLS
AWS / processλ

Telemetry Lambda

Validate the message

Identity · points · values
AWS / retain▤

DynamoDB

Store the reading

Timestamped records
AWS / serve⌁

HTTP API

Query latest + history

API Gateway · Lambda · Cognito
In the browser▥

My dashboard

Put it in the room view

React · hosted on Amplify
DEVICE → CLOUD → DASHBOARD

Each pointset message is checked and stored. The signed-in dashboard requests the latest values and history through the HTTP API.

Illustrative messages and timing. This graphic does not connect to the private dashboard or send commands to devices.

DBO / what a point means

Point names from the Digital Buildings Ontology

DBO names describe the measurement, not the pin it arrived on. The device registry pairs each point with its units and allowed values, so the firmware, cloud and dashboard share the same meaning.

zone_air_temperature_sensor
Temperature · degrees_celsius
zone_air_relative_humidity_sensor
Humidity · percent_relative_humidity
zone_air_co2_concentration_sensor
CO₂ · parts_per_million

UDMI / how it is carried

UDMI messages: pointset, config and state

The implemented UDMI 1.5.2 message shapes separate measured pointset values, desired config, and reported state. It is a focused UDMI-style implementation, not the full UDMI toolchain.

Inside the pointset message Example JSON{site}/MTS-3/events/pointset

The dashboard

Applied only when the device says so

The private sensor view brings together temperature, humidity and CO₂, selectable history ranges, reporting intervals and a message inspector. The wider room view puts those readings back into the house.

A setting is only shown as applied after a matching device-state acknowledgement. Publishing a configuration to AWS is one step; the device confirming it is another.

Hardware and software at a glance
Devices
ESP32-C3 nodes, one per room
Sensors
SHTC3 (T, RH) · SCD40 (CO₂)
Cloud
AWS IoT + serverless services
Interface
React view of both floors
Control
Terma radiator over BLE

PlatformA small building system

This started as a way of seeing temperature and humidity around a house. It grew into a private building view where each room can show its sensor readings, history, device state, and, where it makes sense, controls.

ESP32-C3 devices publish structured messages through AWS IoT. Serverless services validate and store the readings, while a React dashboard puts them back onto the two floors of the house. The same path carries configuration in the other direction.

  • ESP32-C3
  • MQTT
  • AWS IoT Core
  • Lambda
  • React
  • Bluetooth LE
  • Each physical device has its own identity and certificate.
  • Readings keep their device, room, timestamp, and units attached.
  • The interface distinguishes a requested change from one the device has actually applied.

HardwareThe air-sensor node

The first version paired an ESP32-C3 with an SHTC3 for temperature and humidity. I later added an SCD40 CO₂ sensor on the same I²C bus and carried the new reading through the firmware, device metadata, cloud services, history charts, and room view.

The deployed device reports temperature, humidity, and CO₂ using the point names and units expected by the rest of the platform. The board is still deliberately homemade: protoboard, short wiring runs, and a printed enclosure that can be opened again.

Early ESP32-C3 temperature and humidity sensor connected with jumper wires
The wired prototype that came first.
Compact ESP32-C3 and SHTC3 sensor node on protoboard
The compact temperature and humidity node.

From the bench · September 2026

The white enclosure is the current setup. Blue prints record the earlier fit checks and blower experiments.

Inside the white enclosure: display, sensors and USB-C.
Inside the white enclosure: display, sensors and USB-C.
The assembled electronics before fitting the case.
The assembled electronics before fitting the case.
Side view of the display and board stack.
Side view of the display and board stack.
The soldered wiring underneath the perfboard.
The soldered wiring underneath the perfboard.
Printed enclosure iterations and the sensor board.
Printed enclosure iterations and the sensor board.
Side view of the blower fit trial.
Side view of the blower fit trial.
More build photosLids, soldering and blower trials
Blue enclosure: checking the side clearance.
Blue enclosure: checking the side clearance.
Blue lid and round display, before power-up.
Blue lid and round display, before power-up.
Blower depth beside a ruler.
Blower depth beside a ruler.
Blower bench wiring with a separate ESP32-C3.
Blower bench wiring with a separate ESP32-C3.
Blower and test connections.
Blower and test connections.
The white build during blower testing.
The white build during blower testing.
Blower fit trial in the blue enclosure.
Blower fit trial in the blue enclosure.
An earlier blue display lid.
An earlier blue display lid.
The GC9A01 display seated in the lid.
The GC9A01 display seated in the lid.
Soldering the perfboard connections.
Soldering the perfboard connections.
Display and sensors assembled on perfboard.
Display and sensors assembled on perfboard.
Blue base, sensor board and clip-on lid.
Blue base, sensor board and clip-on lid.
Blower footprint beside a ruler.
Blower footprint beside a ruler.
USB power and blower test wiring.
USB power and blower test wiring.
Earlier lid, retaining ring and enclosure prints.
Earlier lid, retaining ring and enclosure prints.

EnclosureBuilt around the real board

I measured the assembled board before drawing the enclosure, then printed and adjusted the shell until the sensor openings, lid, and USB-C access all worked with the hardware that was actually on the bench.

Two-part vented sensor enclosure being adjusted in slicer software
The two-part enclosure before printing.
The CO₂ board beside the printed two-part enclosure
The printed shell with the CO₂ board it was made for.

A case with a round display

The current build has a white printed enclosure and a 1.28-inch round display showing CO₂, temperature and humidity. The screen sits above the hand-soldered perfboard, with USB-C power entering on the right. The model at the top follows this setup from the September photos; its dimensions are approximate. The enclosure page keeps the earlier Slab, Gauge and Halo studies alongside the current build.

HeatingThe radiator bridge

A separate ESP32-C3 acts as a Bluetooth bridge for a Terma MOA Blue electric radiator. I used a small probe program to work out how the real controls behaved, then turned that into a bridge between cloud configuration and the radiator’s BLE characteristics.

Requested temperatures are range-checked, written to the radiator, read back, and then reported to the platform. The web interface waits for that device response before it calls a change applied. Two radiators now run through that complete path: the first, and the Spare Bedroom’s, added in November.

Current stateWhere it stands

The sensor, cloud, dashboard and first radiator-control paths all run on the real system. I’m still changing the hardware packaging and the day-to-day running of it.