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

Getting Zigbee temperature sensors into Hermetry through a Pi as separate devices

Getting Zigbee temperature sensors into Hermetry through a Pi as separate devices

1 2

Backend dev, hardware hobbyist at best. I put eight little Xiaomi Zigbee temp/humidity sensors around our office server room and the battery room. They pair to a Sonoff Zigbee 3.0 USB dongle (CC2652P) on a Raspberry Pi 4 running zigbee2mqtt, which publishes to a local mosquitto. That part works, I can see zigbee2mqtt/rack_a_top etc.

Then I tried to get them into Hermetry with a mosquitto bridge, forwarding zigbee2mqtt/# out to the broker with one device token. Two problems. Out of the box nothing arrived and the device log had a pile of rejected topics until the session was closed. Then I switched the profile to Custom topics and it worked, but all eight sensors land on ONE device as keys like zigbee2mqtt.rack_a_top.temperature, which makes alarms and the dashboard a mess.

I want eight devices. Do I need eight tokens and eight bridges? That feels wrong.

♥ 2

No, you don't need eight tokens and eight bridges. Hermetry's model for this setup is Behind a gateway. The sources list "sensors behind your own edge computer" as a typical case, and your Pi with zigbee2mqtt is exactly that.

How it works

  • The Pi logs in to Hermetry as one gateway device, with its own single credential (an access token is fine).
  • It reports data for its child devices on the **v1/gw/* topics**. Custom topics on a normal device won't do this.
  • Hermetry creates each child device the first time the gateway reports for it. You get rack_a_top and the others as eight separate devices, without adding each by hand.
  • Each child is an ordinary device: its own profile, telemetry, attributes, alarms and dashboards. You can also place each one on its room (server room or battery room), so status and alarm counts roll up per room.
  • Child devices have no credential of their own. The gateway brings their data.

What to change

  1. Make the device the Pi connects as a gateway. A device record has a "whether it is a gateway" property, and the Devices list shows a Gateway badge and filter. The sources here don't say where to set it.
  2. Make what you publish from the Pi follow the v1/gw/* topics and payload format. A plain zigbee2mqtt/# forward keeps zigbee2mqtt's own topic names. You may need a small translation step on the Pi rather than a pure bridge rename. Whether a bridge alone is enough depends on the payload format, which isn't shown in the material I have.
  3. Switch the profile back from Custom topics, so the gateway topics are used instead of flattening everything into keys like zigbee2mqtt.rack_a_top.temperature.

Keep in mind

  • Device limit: both the gateway and each child count toward your plan's device limit, so 9 in total here.
  • Online status: for gateway children it comes from the gateway's connect and disconnect messages.

The exact v1/gw/* topic names, the payload format and how children get their profiles are on the Devices behind a gateway docs page. The sources I have only name it and don't give those details, so check that page before writing the translation.

Sources

Written by AI from the documentation and solved topics. If it solved your problem, mark it as the solution; if not, the team will follow up.

♥ 0
Viewing 2 posts – 1 through 2 (of 2 total)
  • 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.

Share