Page 1 of 1

Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 8:55
by pfloryann
Hi,

I noticed that domoticz does not retrieve the status of offline devices from zigbee2mqtt via MQTT Client Gateway with LAN interface. Domoticz show the status as if it were online.
I don't know if it is an issue but i think is very important let's have this info.

Domoticz 2024.7 beta (build 16461).


Thank you!

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 13:31
by waltervl
How does it show when a zigbee device is offline in Zigbee2MQTT?
Is there a Zigbee2MQTT MQTT topic value that shows if the zigbee device is offline?

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 13:33
by gizmocuz
If it's a non-switch, it should also turn up red in Domoticz in one hour by default

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 13:44
by waltervl
I think zigbee2MQTT users are aiming at reporting if a switch device lost its connection from the zigbee mesh.
in Zigbee4Domoticz plugin there is functionality that polls the powered zigbee switch/light node every x hours and if no answer it turns the related Domoticz device widgets to timed out (red). Also when you switch the device but the coordinator does not get an acknowledgement back it turns the Domoticz device widgets to timed out (red). This will give you as a user feedback that somethings is wrong with that device. Also you can set Domoticz notifications on timed-out devices (with scripting).

So i think zigbee2MQTT users are looking for something similar. Perhaps already available with the zigbee2MQTT device availability option https://www.zigbee2mqtt.io/guide/config ... ility.html ?

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 19:03
by pfloryann
waltervl wrote: Monday 03 February 2025 13:44 I think zigbee2MQTT users are aiming at reporting if a switch device lost its connection from the zigbee mesh.
in Zigbee4Domoticz plugin there is functionality that polls the powered zigbee switch/light node every x hours and if no answer it turns the related Domoticz device widgets to timed out (red). Also when you switch the device but the coordinator does not get an acknowledgement back it turns the Domoticz device widgets to timed out (red). This will give you as a user feedback that somethings is wrong with that device. Also you can set Domoticz notifications on timed-out devices (with scripting).

So i think zigbee2MQTT users are looking for something similar. Perhaps already available with the zigbee2MQTT device availability option https://www.zigbee2mqtt.io/guide/config ... ility.html ?
Exactly, it would be wonderful to reporting if a switch device lost its connection from the zigbee mesh. At the moment I can only see this in zigbee2mqtt dashboard. Regarding the option https://www.zigbee2mqtt.io/guide/config ... ility.html it is already activated in zigbee2mqtt general settings but without success in domoticz

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 19:20
by waltervl
Do you see with MQTT explorer that an availability message is sent? You could easily test these if you have a zigbee bulb that you can switch off with the external power. Is should send an offline message after 10 minutes.

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 19:54
by pfloryann
I checked in Mqtt Explorer for offline device i have:
availability={"state" : "offline"}

but every 10 minutes in zigbee2mqtt logs i have this message:
warning z2m: Failed to ping 'Ac socket' (attempt 1/1, ZCL command 0x00158d0001f555ec/1 genBasic.read(["zclVersion"], {"timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Data request failed with error: 'MAC no ack' (233)))

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 20:14
by waltervl
So that is good. The warning also means the device is offline.

If you enable that device again that warning message should not appear anymore and the availability message should switch to "online".

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 20:39
by pfloryann
Exactly, if the device is enable...we have availability={"state" : "online"}

Re: Offline devices are not reported (from Zigbee2mqtt)

Posted: Monday 03 February 2025 22:13
by waltervl
Ok, lets hope @gizmocuz is reading along and can implement:

when device status availability topic zigbee2mqtt/[FRIENDLY_NAME]/availability shows {"state" : "offline"} the related Domoticz devices will be marked timeout (and will color red).
When availability topic shows {"state" : "online"} then the related Domoticz devices show not timeout.