300 substation monitors: do I really need a separate MQTT topic per device?
Long-time reader, first post. We’re replacing a home-grown broker setup with Hermetry for about 300 substation monitors (ESP32-based, our own firmware). In the old setup every unit published to grid/<site_id>/<unit_id>/telemetry and we kept a big ACL file so each unit could only write its own branch. That ACL file was a constant source of grief, every new site meant a change and a broker reload.
Reading the Hermetry docs I see v1/telemetry everywhere and nothing about per-device topics, which either means it’s simpler than I think or I’m missing a page. Before we write the new firmware: do we need to configure 300 topics somewhere, or does each device just publish to the same topic? And if they all use the same topic, what stops unit 17 from writing data as unit 18?
Would also like to keep the site id somewhere since our reports group by it.
I think you set custom topics in the device profile for that? I saw a “Custom topics” option somewhere when I was setting up mine.
Following this, we have 40 thermostats coming next quarter and I had the same question.
No per-device topics needed. All 300 publish to the same v1/telemetry. Hermetry knows who’s talking from the credential the device logged in with, so the token is effectively the address. Unit 17 can’t write as unit 18 because it doesn’t have 18’s credential, and a device can only subscribe to its own downlink topics (v1/attributes/set, v1/rpc/req/+ and so on), so it never sees another device’s messages either. No ACL file to keep.
Kevin’s not wrong that Custom topics exist, but they’re for firmware you can’t change: the profile then takes any topic outside v1/ as telemetry of that device. Limits there are topic depth 8, length 128 and 50 distinct topics per device, and with “Prefix keys with the topic” grid/s12/temp becomes a key like grid.s12.temp. Since you’re writing new firmware, skip all of that.
For the site id I’d make it an attribute of the device instead of part of the topic. It doesn’t change every minute so it doesn’t belong in telemetry.
Reference with the full topic table: MQTT topics and payload reference. One practical thing from when I moved my own stuff: give every unit its own credential. Two devices sharing one token keep kicking each other off.
That’s a lot less work than I’d budgeted. Prototype unit is publishing to v1/telemetry with its own token, site id is now an attribute and our report script reads it from there. Killing the ACL file is the best thing to happen to this project.
ah ok, so custom topics are the legacy-firmware escape hatch. I’d mixed those up, thanks.
- You must be logged in to reply to this topic.
Join the conversation
Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

