Debugging Zigbee

Hey,

I’m seeing some weird behavior from the ZigBee devices. Mainly - most of them aren’t really updating the state anymore.

I remember the Zigbee2MQTT log used to be busy, updating all the time. It doesn’t look as active anymore

I’ve tried rebooting (re-setting some of the temperature sensors) and also updating and re-setting the Zigbee2MQTT plugin. No help.

Most of the Temp. Sensors aren’t updating at all as seen below.

temp_update

Interesting enough one of the hue motion sensors is updating occupancy and not the battery. But mostly it looks pretty patch across the board.

Really though I remember these used to work pretty flawless before (the sonoff temperature sensors)

Any idea where to start debugging it?

Cheers

If the z2m log isn’t showing much activity, I would start there (for instance, set the z2m logging level to DEBUG in the advanced settings).

z2m has different logging levels in its UI. Try bumping that.

Hey,

bumped the Log Level to the DEBUG one.
And downloaded the Zigbee2MQTT logs for the time since the whole reboot.

Now. It’s not really obvious. So in summary:

  • 1x HUE motion sensor in lie pantry - works and reports [0x0017880108657039]
  • 1x Sonoff temperature sensor in Bedroom 1- works and reports [0x00124b00222e985b]
  • 1x Sonoff temperature sensor in Bedroom 2 (adjacent to Bed1) - doesn’t report [0x00124b002242d4a2]
  • 1x HUE motion sensor in Bed 2 - doesn’t report all that well [0x001788010862e19c]
  • 1x Sonoff Sensor that I’ve put next to the Conbee 2 USB dongle - doesn’t report [0x00124b00222e90e1]

I have more of them but these should give a good overview.

Again, I’m not really sure when this fell apart. But It all was working pretty well before.

Now when I look at the Temp. Sensor in Bedroom 1 that is working [0x00124b00222e985b] it reports sa below:

info  2022-05-13 06:42:48: MQTT publish: topic 'zigbee2mqtt/0x00124b00222e985b', payload '{"battery":80,"humidity":55.31,"linkquality":210,"temperature":24.25,"voltage":2900}'
debug 2022-05-13 06:43:08: Received Zigbee message from '0x00124b00222e985b', type 'attributeReport', cluster 'msTemperatureMeasurement', data '{"measuredValue":2369}' from endpoint 1 with groupID null
info  2022-05-13 06:43:08: MQTT publish: topic 'zigbee2mqtt/0x00124b00222e985b', payload '{"battery":80,"humidity":55.31,"linkquality":210,"temperature":23.69,"voltage":2900}'
debug 2022-05-13 06:47:46: Received Zigbee message from '0x00124b00222e985b', type 'attributeReport', cluster 'genPowerCfg', data '{"batteryPercentageRemaining":149}' from endpoint 1 with groupID null
info  2022-05-13 06:47:46: MQTT publish: topic 'zigbee2mqtt/0x00124b00222e985b', payload '{"battery":74.5,"humidity":55.31,"linkquality":210,"temperature":23.69,"voltage":2900}'
debug 2022-05-13 06:53:40: Received Zigbee message from '0x00124b00222e985b', type 'attributeReport', cluster 'msRelativeHumidity', data '{"measuredValue":5675}' from endpoint 1 with groupID null
info  2022-05-13 06:53:40: MQTT publish: topic 'zigbee2mqtt/0x00124b00222e985b', payload '{"battery":74.5,"humidity":56.75,"linkquality":211,"temperature":23.69,"voltage":2900}'

The mqqt config for the temperature looks as below:

debug 2022-05-12 16:11:21: Received MQTT message on 'homeassistant/sensor/0x00124b00222e985b/humidity/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x00124b00222e985b"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"0x00124b00222e985b","sw_version":"Zigbee2MQTT 1.18.1"},"device_class":"humidity","json_attributes_topic":"zigbee2mqtt/0x00124b00222e985b","name":"0x00124b00222e985b humidity","state_topic":"zigbee2mqtt/0x00124b00222e985b","unique_id":"0x00124b00222e985b_humidity_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.humidity }}"}'

If I look at the one that doesn’t report the one in Bedroom 2 [0x00124b002242d4a2]

info  2022-05-12 16:13:07: MQTT publish: topic 'zigbee2mqtt/0x00124b002242d4a2', payload '{"battery":66.5,"humidity":68.08,"temperature":20.34,"voltage":2900}'

t’s only one message right after the Z2M was restarted nothing more after

The config message is as below:

debug 2022-05-12 16:11:21: Received MQTT message on 'homeassistant/sensor/0x00124b002242d4a2/temperature/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x00124b002242d4a2"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"0x00124b002242d4a2","sw_version":"Zigbee2MQTT 1.18.1"},"device_class":"temperature","json_attributes_topic":"zigbee2mqtt/0x00124b002242d4a2","name":"0x00124b002242d4a2 temperature","state_topic":"zigbee2mqtt/0x00124b002242d4a2","unique_id":"0x00124b002242d4a2_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.temperature }}"}'

Is there anything obvious - I cannot really spot a difference there.

With one of the motion sensors - the one in the pantry that’s working it reports all good.

debug 2022-05-13 06:08:02: Received Zigbee message from '0x0017880108657039', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":1107315168,"imageType":269,"manufacturerCode":4107}' from endpoint 2 with groupID null
debug 2022-05-13 06:12:20: Received Zigbee message from '0x0017880108657039', type 'attributeReport', cluster 'msTemperatureMeasurement', data '{"measuredValue":1928}' from endpoint 2 with groupID null
info  2022-05-13 06:12:20: MQTT publish: topic 'zigbee2mqtt/0x0017880108657039', payload '{"battery":100,"illuminance":0,"illuminance_lux":0,"linkquality":209,"motion_sensitivity":"high","occupancy":false,"occupancy_timeout":0,"temperature":19.28,"update":{"state":"available"},"update_available":true,"voltage":2800}'
debug 2022-05-13 06:16:20: Received Zigbee message from '0x0017880108657039', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 2 with groupID null
info  2022-05-13 06:16:20: MQTT publish: topic 'zigbee2mqtt/0x0017880108657039', payload '{"battery":100,"illuminance":0,"illuminance_lux":0,"linkquality":210,"motion_sensitivity":"high","occupancy":false,"occupancy_timeout":0,"temperature":19.28,"update":{"state":"available"},"update_available":true,"voltage":2800}'
debug 2022-05-13 06:21:19: Received Zigbee message from '0x0017880108657039', type 'attributeReport', cluster 'msIlluminanceMeasurement', data '{"measuredValue":0}' from endpoint 2 with groupID null
info  2022-05-13 06:21:19: MQTT publish: topic 'zigbee2mqtt/0x0017880108657039', payload '{"battery":100,"illuminance":0,"illuminance_lux":0,"linkquality":210,"motion_sensitivity":"high","occupancy":false,"occupancy_timeout":0,"temperature":19.28,"update":{"state":"available"},"update_available":true,"voltage":2800}'
debug 2022-05-13 06:27:18: Received Zigbee message from '0x0017880108657039', type 'attributeReport', cluster 'msTemperatureMeasurement', data '{"measuredValue":1942}' from endpoint 2 with groupID null
info  2022-05-13 06:27:18: MQTT publish: topic 'zigbee2mqtt/0x0017880108657039', payload '{"battery":100,"illuminance":0,"illuminance_lux":0,"linkquality":210,"motion_sensitivity":"high","occupancy":false,"occupancy_timeout":0,"temperature":19.42,"update":{"state":"available"},"update_available":true,"voltage":2800}'
debug 2022-05-13 06:31:19: Received Zigbee message from '0x0017880108657039', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 2 with groupID null

While the other one in the Bedroom 2 [0x001788010862e19c] just some noise:

debug 2022-05-13 06:35:10: Received Zigbee message from '0x001788010862e19c', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":1107323831,"imageType":269,"manufacturerCode":4107}' from endpoint 2 with groupID null
debug 2022-05-13 06:35:10: Check if update available for '0x001788010862e19c' (SML001)
debug 2022-05-13 06:35:10: Is new image available for '0x001788010862e19c', current '{"fieldControl":0,"manufacturerCode":4107,"imageType":269,"fileVersion":1107323831}', latest meta '{"fileVersion":1107323831,"fileSize":240760,"url":"http://fds.dc1.philips.com/firmware/ZGB_100B_010D/1107323831/Sensor-ATmega_6.1.1.27575_0012.sbl-ota","sha512":"10e549c55d262b2f227b75817f6620be407f537e04ac08db4dbebdf53e8d460299a2cda248b3be13476757d61a1c79b632963c4f126cd26b7c18ea6a2ab4ac59"}'
debug 2022-05-13 06:35:10: Update available for '0x001788010862e19c': NO
info  2022-05-13 06:35:10: MQTT publish: topic 'zigbee2mqtt/0x001788010862e19c', payload '{"battery":100,"illuminance":0,"illuminance_lux":0,"led_indication":false,"linkquality":210,"motion_sensitivity":"high","occupancy":false,"occupancy_timeout":60,"temperature":19.53,"update":{"state":"idle"},"update_available":false}'
debug 2022-05-13 06:35:20: Received Zigbee message from '0x001788010862e19c', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":1107323831,"imageType":269,"manufacturerCode":4107}' from endpoint 2 with groupID null
debug 2022-05-13 06:35:30: Received Zigbee message from '0x001788010862e19c', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":1107323831,"imageType":269,"manufacturerCode":4107}' from endpoint 2 with groupID null
debug 2022-05-13 06:35:40: Received Zigbee message from '0x001788010862e19c', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":1107323831,"imageType":269,"manufacturerCode":4107}' from endpoint 2 with groupID null
debug 2022-05-13 06:35:50: Received Zigbee message from '0x001788010862e19c', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":1107323831,"imageType":269,"manufacturerCode":4107}' from endpoint 2 with groupID null

So here I am. Not really sure what is happening .

  • is this a network issue - as in add more zigbee lights to have more repeaters (however these all were working on previously)
  • is this the sensor issue and these are just broken. But it’s suspicious as we have different suppliers not working
  • any of the HA setup or updates potentially breaking the whole system
  • I obviously tried to remove the devices and re-pair them again
  • restarting Z2M or HA multiple times

Any ideas

What does your z2m map look like? Also, it’s usually a good idea to have your Zigbee dongle connected to your hardware with an extension lead instead of directly plugging it in to minimize interference.

BTW, the sensor in Bedroom 2 isn’t just publishing noise, the info message is showing a status update.

The map doesn’t load. Throws some errors.
Just then after another restart I’ve noticed some errors during Z2M startup:

Zigbee2MQTT:info  2022-05-13 18:16:34: Starting network scan (includeRoutes 'false')
Zigbee2MQTT:debug 2022-05-13 18:16:35: LQI succeeded for 'Coordinator'
Zigbee2MQTT:error 2022-05-13 18:16:42: Failed to execute LQI for '0x588e81fffe8d32ba'
Zigbee2MQTT:error 2022-05-13 18:17:25: Failed to execute LQI for '0x588e81fffe8d32ba'
Zigbee2MQTT:error 2022-05-13 18:17:37: Failed to execute LQI for '0x588e81fffe8d32ba'
Zigbee2MQTT:error 2022-05-13 18:17:43: Failed to execute LQI for '0x680ae2fffe8e1c32'
Zigbee2MQTT:error 2022-05-13 18:18:26: Failed to execute LQI for '0x680ae2fffe8e1c32'
Zigbee2MQTT:error 2022-05-13 18:18:38: Failed to execute LQI for '0x680ae2fffe8e1c32'
Zigbee2MQTT:error 2022-05-13 18:18:44: Failed to execute LQI for '0x588e81fffe6f0a67'
Zigbee2MQTT:debug 2022-05-13 18:18:46: LQI succeeded for '0x0017880106bf02be'
Zigbee2MQTT:debug 2022-05-13 18:18:47: LQI succeeded for '0x842e14fffe603d6d'
Zigbee2MQTT:error 2022-05-13 18:19:27: Failed to execute LQI for '0x588e81fffe6f0a67'
Zigbee2MQTT:debug 2022-05-13 18:19:37: LQI succeeded for '0x0017880106bf02be'
Zigbee2MQTT:debug 2022-05-13 18:19:38: LQI succeeded for '0x842e14fffe603d6d'
Zigbee2MQTT:error 2022-05-13 18:19:39: Failed to execute LQI for '0x588e81fffe6f0a67'
Zigbee2MQTT:debug 2022-05-13 18:19:40: LQI succeeded for '0x0017880106bf02be'
Zigbee2MQTT:debug 2022-05-13 18:19:41: LQI succeeded for '0x842e14fffe603d6d'
Zigbee2MQTT:error 2022-05-13 18:19:49: Failed to execute LQI for '0x588e81fffe610c2e'
Zigbee2MQTT:error 2022-05-13 18:20:40: Failed to execute LQI for '0x588e81fffe610c2e'
Zigbee2MQTT:error 2022-05-13 18:20:43: Failed to execute LQI for '0x588e81fffe610c2e'
Zigbee2MQTT:error 2022-05-13 18:20:51: Failed to execute LQI for '0xb4e3f9fffe833a98'
Zigbee2MQTT:info  2022-05-13 18:20:51: Network scan finished

Maybe it is a poor network…
I ordered some Zigbee downlights maybe these will act as repeaters.

That, and the aforementioned extension lead.

Yep,
It’s already on the extension. Sticking out from the shelf.

Again not sure why this would stop working (it used to) but I will get the lights installed when they arrive and see if this help

Will also play with the WIFI channels (the wifi adapter is pretty close there)

Cheers

Maybe your neighbour added wifi and on a channel which interferes.

Maybe your wifi changed channels.

Maybe aliens are interfering with the 2.4G band in your area.

Maybe this is interesting:

Funnily enough I just rread the page that post refers to on metageek. My zigbee is on ch 11 and two of my APs were on ch1, which interferes.

Rather than move the zigbee channel and re pair all my zigbee, I moved the APs to 6 and 11. I’ll see how it goes.

Well, I can’t find how to change Zigbee2MQTT Logs to Debug mode.
I read several articles and nothing coincides with the settings.

I replaced the 2xAAA rechargeables with 2XAAA non-rechargeables → stuck a SIM card pin into the sensor → reset sensor → red LED blinked and turned off → HA has not changed and strangely the battery data still shows 2%

1 Like

Thank you, this solved must consternation. Here’s the path for noobs in the future searching:
HA → Settings → Add-ons → Zigbee2MQTT → Log (not this log in tabs: Info Documentation Configuration Log) → OPEN WEB UI → [email protected] → Logs → Log level → select debug.