Numerous Z2M devices now showing as unavailable

I’ve divided my Zigbee network into two smaller subnetworks. Initially, everything worked fine, but most battery-operated devices on the new subnetwork suddenly became unavailable in HA. The autodiscovery and state messages both look fine (samples included below) and the Z2M dashboard shows the devices and all state attributes with updates.

This persists across reboots of HA, Z2M, and the broker. I’ve also tried reloading the MQTT integration multiple times. If I subscribe to the state topic in the MQTT integration page, I see the state messages appear.

I’m running HA 2024.12.5 and Z2M 1.42.0. I’ve been struggling with various attributes and sensors dropping out for a while, which I thought was related to my original network size (about 70 Zigbee devices, which I didn’t think was that huge).

Sample state message

zigbee2mqtt-upper/Cat's office temperature {"battery":90,"humidity":40.1,"last_seen":"2024-12-29T13:01:44-05:00","linkquality":105,"power_outage_count":76,"pressure":998.7,"temperature":17.42,"voltage":2985}

Sample discovery message

homeassistant/sensor/0x00158d000804b856/temperature/config {"availability":[{"topic":"zigbee2mqtt-upper/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt-upper/Cat's office temperature/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"configuration_url":"https://cherry.woohouse.world/zigbee-upper/#/device/0x00158d000804b856/info","identifiers":["zigbee2mqtt_0x00158d000804b856"],"manufacturer":"Aqara","model":"Temperature and humidity sensor (WSDCGQ11LM)","name":"Cat's office temperature","via_device":"zigbee2mqtt_bridge_0x00124b002e0e16a7"},"device_class":"temperature","enabled_by_default":true,"object_id":"cat's_office_temperature_temperature","origin":{"name":"Zigbee2MQTT","sw":"1.42.0","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt-upper/Cat's office temperature","unique_id":"0x00158d000804b856_temperature_zigbee2mqtt-upper","unit_of_measurement":"°C","value_template":"{{ value_json.temperature }}"}

Note that while the sample messages I’ve posted do include an apostrophe, most of my devices don’t have any such punctuation and still have this problem.

Appreciate any help on debugging this!

Ok why? How?

Many questions.

I assume you’re running ZHA for one and Z2M for the other?

In short youe now troubleshooting two networks’ problems and both may interfere with each other. Both networks are also inherently weaker because fewer repeating nodes. That means replanting the entire layout for both networks.

Id go back to the cookbook make sure you run through the zigbee troubleshooting sections starting from the beginning ensuing you have chosen two network channels that don’t interfere with each other AND any nearby wifi.

I’m running two separate Z2M instances, roughly along the lines of the upper and lower floors of my home. I’m using two different Zigbee channels - 22 and 23. Those are next to each other, but have no overlapping bandwidth. I do have 2.4 GHz WiFi on channel 6, which has a bit of overlap but would be a major hassle to change. All of my LQI numbers are very good at the moment.

Segmentation was done to reduce broadcast traffic across all the nodes. I have a number of chatty devices (power monitoring, etc) and the traffic volume is a bit largish. All of the battery devices are very near mains powered routers, which I’ve taken care to use as the joining device for end nodes.

Independent of any possible radio issues, the MQTT messages at the other end of the radio look fine. I don’t understand why the HA MQTT integration isn’t picking these up when both discovery and state messages look valid.