Offline devices are not reported (from Zigbee2mqtt)

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
pfloryann
Posts: 178
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.1
Contact:

Offline devices are not reported (from Zigbee2mqtt)

Post 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!
Domoticz on Raspberry Pi 4 with Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy
User avatar
waltervl
Posts: 5781
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post 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?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
gizmocuz
Posts: 2496
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post by gizmocuz »

If it's a non-switch, it should also turn up red in Domoticz in one hour by default
Quality outlives Quantity!
User avatar
waltervl
Posts: 5781
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post 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 ?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pfloryann
Posts: 178
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.1
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post 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
Attachments
settings.jpg
settings.jpg (142.65 KiB) Viewed 611 times
Domoticz on Raspberry Pi 4 with Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy
User avatar
waltervl
Posts: 5781
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pfloryann
Posts: 178
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.1
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post 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)))
Domoticz on Raspberry Pi 4 with Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy
User avatar
waltervl
Posts: 5781
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post 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".
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pfloryann
Posts: 178
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.1
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post by pfloryann »

Exactly, if the device is enable...we have availability={"state" : "online"}
Domoticz on Raspberry Pi 4 with Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy
User avatar
waltervl
Posts: 5781
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Offline devices are not reported (from Zigbee2mqtt)

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest