New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Michael Wilson

wilsonmaker

@wilson-m · Joined July 2025

Newcomer

Maker · home automation · Nottingham · new to IoT

Topics
14
Replies
70
Points
0
Newcomer10 points to Member

Forum Replies Created

Viewing 15 posts – 1 through 15 (of 70 total)

I tried exactly the uMQTTBroker thing at home last year and gave up on it, then did this, which has been solid for 8 months. Not an expert, so take it as “what worked for me”.

A Pi Zero 2 W running Mosquitto is the local broker. The ESP8266 nodes publish to it on the LAN, plain 1883 is fine there because it never leaves the house. The buzzer logic is a tiny Python script on the Pi that subscribes locally, so it works with no internet at all.

For Hermetry, the Pi is one device marked as a gateway (the “This device is a gateway” switch when you add it). A second script subscribes to everything on the local broker, stamps each reading with the Pi’s time (NTP-synced, check timedatectl), keeps them in a SQLite file, and sends them up with paho-mqtt over TLS:

topic: v1/gw/telemetry
{
  "freezer-1": [{"ts": 1762941600000, "values": {"temp": -18.6, "amps": 1.92}}],
  "gate":      [{"ts": 1762941605000, "values": {"open": 0}}]
}

Each node becomes a child device by its name. It only deletes a row from SQLite after the PUBACK. When the internet comes back it sends the backlog oldest first, in batches, and the readings land at their real times in history.

Two things I learned the hard way. Hermetry ignores the retain flag and doesn’t bridge to your broker, so don’t build on either. And a big backlog drains at the profile’s Replay messages per second rate, so after a long outage it takes a while to catch up, that’s normal.

The page I followed was Devices behind a gateway.

Ask me about 4–20 mA.
Accepted solution♥ 9

Thanks James. -hupcl alone wasn’t enough, the first open after a reboot still reset it, like you said. Put the 10 µF cap on (with a label on the board saying “remove to upload”, learned that the hard way already) and the resets are gone. Also moved the script to systemd like twilson said. Total is stable now.

Ask me about 4–20 mA.
♥ 1

Working! Got two WiZ bulbs. The command list filled up as soon as I added light.set to the catalog. First version the Switch only ever showed its Unknown text, because I hadn’t bound Current state yet. Bound it to hallway_on and it stays put now, even when my wife uses the bulb’s own button.

Ask me about 4–20 mA.
♥ 0

Two buses on GPIO4 and GPIO17, 2.2k each, and I re-did the run as a line along the racks. 20 of 20 for two days now, not a single 85. Renamed the keys too, deleted the device and started fresh since there was only a week of data. Dashboard reads like a cellar now instead of a serial number list. Thanks all, Kevin maybe next build 😉

Ask me about 4–20 mA.
♥ 0

Works first time, which never happens to me. Readings are clean and the valve opens when the Mega sends 1. I’d been sending text because I thought I2C was “like Serial”. Also fixed my Hermetry payload while I was at it: temperature now goes out as a number with one decimal.

Ask me about 4–20 mA.
♥ 2

IT WORKS. Built the opto circuit on perfboard, first version without the capacitor gave me like 40 rings per press haha, added the 10 µF and it’s clean. Admin connected our chat platform, I linked my account, and now “Someone is at the street door” pops up on my phone about 2 seconds after the button. Thanks Lee!

Ask me about 4–20 mA.
♥ 1

It works!! The strip dims with the slider now and the board says Done. I had also been answering on v1/rpc/req/17 instead of res, so even when I got the number right nothing came back. Thank you Emily.

Ask me about 4–20 mA.
♥ 1
Viewing 15 posts – 1 through 15 (of 70 total)