emily30
@emily-campbell · Joined August 2025
Backend developer · energy
- Topics
- 6
- Replies
- 36
- Points
- 0
Forum Replies Created
Not an answer to the whole thing, but Modbus RTU devices can’t talk to any cloud by themselves, something on site has to poll them. So you need a box on site either way. You’re really choosing which box.
esptool read_flash at 0x8000?
RaspAP doesn’t lock anything, it writes its config under /etc/raspap and the hostapd/dnsmasq files. With the overlay on, any change you make in its web UI is gone after reboot. That’s the “it doesn’t like overlays” story.
From what the docs say, the mobile app is for notifications and approvals. For the switch, the web console in the phone browser works fine, that’s how I run my allotment pump.
What to set up:
- On the Pi’s device profile, Commands tab, add a command, e.g. method
heater.set, one Yes/no parameteron, tier Basic. Boards only send Basic tier commands. - Make a dashboard, add a Switch control, action Run a command, pick the Pi and
heater.set, and bind the current state to a key the Pi reports (sayheater_onas 0/1). - On the Pi:
def on_connect(c, u, f, rc):
c.subscribe("v1/rpc/req/+", qos=1)
def on_message(c, u, msg):
req_id = msg.topic.rsplit("/", 1)[1]
body = json.loads(msg.payload)
if body.get("method") == "heater.set":
on = bool(body["params"]["on"])
GPIO.output(17, on)
c.publish("v1/telemetry", json.dumps({"heater_on": int(on)}), qos=1)
c.publish(f"v1/rpc/res/{req_id}", json.dumps({"ok": True}), qos=1)
No ports opened. Bookmark the board on your phone’s home screen and it’s basically an app. For alerts (room too cold etc.) the app gives you push on the phone, or use e-mail or a linked chat app.
Fair point on battery devices not routing, I had mains plugs in mind.
Switched on camera events for the two yard cameras that support them as a start, motion alarm after 20:00 works. Jetson is on order for proper counts. Leaving the request open, cloud detection would still save us a box per site.
Zigbee’s mesh is more reliable in an office with lots of walls, I’d go Zigbee.
+1 to logging the error counters, we have an alarm on ours when crc errors go above 1 % for an hour.
If only one runs at a time I’d skip the check valve, less to maintain.
I always read NM as nanometre on RF drawings, is that wrong?
Good choice. Keep a spare diaphragm kit on the shelf, straw wears them faster than you’d think.
What’s the solids content, roughly? That decides most of it.
Kevin, no: the broker needs SNI, so you have to connect by host name, and the certificate check is against that name too. IP is a dead end.
The clue is that the tech’s static config included 8.8.8.8. rc=-2 in PubSubClient is “connect failed”, which on an 8266 is very often a failed name lookup. I’ve seen this on plant networks a few times: the DHCP server hands out the plant’s internal DNS server, and that one only answers for internal names, or blocks outside lookups. With static config the board used 8.8.8.8 instead and everything worked. Add this after connecting and you’ll see it:
Serial.println(WiFi.dnsIP());
IPAddress ip;
Serial.println(WiFi.hostByName(MQTT_HOST, ip) ? ip.toString() : "lookup failed");
Then ask IT for one of two things: let their DNS resolve your organisation’s broker host name (it’s on the device’s Connection details card), or allow outbound DNS from that VLAN. And while you’re talking to them, outbound TCP 8883 has to be open as well, plus 443 if you ever use HTTPS. Wilson’s guess is worth guarding against anyway: wait for WiFi.localIP() to be non-zero before the first connect.
If the laptop forwards for the robot, make the laptop a gateway device and report the robot as its child, then the robot has its own device page and alarms.
LoRa won’t carry video at all, the data rates are tiny.

