All mqtt devices unavailable if one zigbee2mqtt instance is down

I have home assistant running on a computer inside my house with zigbee2mqtt and a CC3251 for controlling zigbee devices in the house. I also have a shed on my property, it is far from the house and out of zigbee range, so I have a raspberry pi zero with its own CC3251 and zigbee2mqtt instance running. It is subscribed to the same topic using Mosquitto, and this setup works quite well usually.

However, the shed internet is unstable and when it goes down I expect its devices to become “unavailable”. But I find that ALL mqtt devices become “unavailable”, even the ones in the house, although they are working fine.

I know this must be because they are published to the same topic, but I’m not sure how to set up home assistant or zigbee2mqtt so that when one instance is down, the other stays up… does anyone have any experience with this?

Thanks for any hints!

Put something like this in your second instance configuration.yaml (the configuration.yaml from zigbee2mqtt, not the one from HA) :

Just choose another base_topic and another channel/panid


homeassistant: true
permit_join: true
mqtt:
  base_topic: z2mqtt
  server: 'mqtt://10.0.0.63'
  user: xxx
  password: xxx
serial:
  port: /dev/ttyAMA0
advanced:
  rtscts: false
  baudrate: 115200
  pan_id: 675
  channel: 11
...
1 Like

Thanks so much Francis! I think it was the pan_id that did it, since I had changed the topic but it didn’t seem to do the trick on its own. I kept the channel the same so I didn’t have to re-pair and the network is over ethernet. Thanks again!

Seems to issue with zigbee2mqtt/bridge/state

Manually publishing “online” to zigbee2mqtt/bridge/state brings all devices back on