offline device
Moderator: leecollings
-
- Posts: 112
- Joined: Thursday 08 December 2022 22:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: ROMANIA
- Contact:
offline device
Hello,
i use domoticz whit zigbee2mqtt with Sonoff dongle.
I want to know when a device it's offline .
what solution i have ?
thx
i use domoticz whit zigbee2mqtt with Sonoff dongle.
I want to know when a device it's offline .
what solution i have ?
thx
- waltervl
- Posts: 5855
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: offline device
A sensor widget will become red (offline) if it did not send an update for X hours.
A switch you can check perhaps with a script.
Do you see an online/offline status in Zigbee2MQTT?
Do you use the MQTT AD gateway or the old python plugin to connect with Zigbee2mqtt?
A switch you can check perhaps with a script.
Do you see an online/offline status in Zigbee2MQTT?
Do you use the MQTT AD gateway or the old python plugin to connect with Zigbee2mqtt?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 112
- Joined: Thursday 08 December 2022 22:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: ROMANIA
- Contact:
Re: offline device
good idea, but i do not know how to doit =))
i'm using Zigbee2MQTT Plugin (v. 3.2.0-beta)
i'm using Zigbee2MQTT Plugin (v. 3.2.0-beta)
- waltervl
- Posts: 5855
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: offline device
So what is status offline? You have to check the plugin manual if it supports detecting the status and push that status to Domoticz.
In Domoticz you normally see a last seen date and time on each device. In Domoticz you can set a notification on sensors (not switches!) when a certain time has been passed without update.
You could also think why a zigbee device gets offline. My devices won't go offline. I do not use zigbee2MQTT so cannot help you in detail.
In Domoticz you normally see a last seen date and time on each device. In Domoticz you can set a notification on sensors (not switches!) when a certain time has been passed without update.
You could also think why a zigbee device gets offline. My devices won't go offline. I do not use zigbee2MQTT so cannot help you in detail.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 154
- Joined: Tuesday 01 October 2013 8:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Sweden
- Contact:
Re: offline device
Hi Walter, regarding the device specific notifications which allows one to receive quite quickly alerts when a critical sensor goes offline by ignoring the main interval settings in Domoticz and after defined value when it last was seen. Why this solves one issue another one occurs which is that Domoticz now keeps sending an email once per minute where it would be great if it just sent one (1) inital email based on the rules defined in the device notification and after that it could utilise for example the system defined interval. Is there any workaround or tweak to avoid getting the inbox flooded?
- waltervl
- Posts: 5855
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: offline device
I don't have that issue when using this function. I only get one notification when the last update is above a certain level.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 154
- Joined: Tuesday 01 October 2013 8:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Sweden
- Contact:
Re: offline device
Ok, interesting, so either a bug or error 40 on my side; here is the settings for the device notification, either I overlooked something very obvisious or it's something else in the main Domoticz settings:
-
- Posts: 112
- Joined: Thursday 08 December 2022 22:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: ROMANIA
- Contact:
Re: offline device
there was a case where I saw that a temperature sensor had not been updated for 4 days.
it's a Sonoff SNZB-02. I had to re-pair it. I want to know when I have such situations, with sensors blocked or no longer transmitting.
thx for the solution
it's a Sonoff SNZB-02. I had to re-pair it. I want to know when I have such situations, with sensors blocked or no longer transmitting.
thx for the solution
- Attachments
-
- Untitled.jpg (98.85 KiB) Viewed 985 times
- waltervl
- Posts: 5855
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: offline device
I see I have the "Ignore Interval" set to No. So perhaps that is the issue.kimhav wrote: ↑Monday 28 August 2023 9:08Ok, interesting, so either a bug or error 40 on my side; here is the settings for the device notification, either I overlooked something very obvisious or it's something else in the main Domoticz settings:
Domoticz_DeviceNotification_NotificationFlooding.png
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 575
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: offline device
When you use zigbee2mqtt you could easily parse the file 'state.json' in the data dir below the zigbee2mqtt install dir.
In that file there is an field 'last_seen' which you could compare with the current time.
I found that when a device in that file has a last_seen of more then 1 day the device is not responding good anymore.
The 1 day is from my smoke sensor which only shows presence once a day to preserve battery.
The downside is that only has the ieeeAddr in it so you have to search for the right name of the device.
You could also parse the 'configuration.yaml' or 'devices.yaml' with the ieeeAddr for the right name.
Or just parse ALL the domoticz devices for a deviceId which starts with the ieeeAddr
Edit:
I meant parsing the file '/home/pi/zigbee2mqtt/data/database.db' and the field there is: lastSeen
In that file there is an field 'last_seen' which you could compare with the current time.
I found that when a device in that file has a last_seen of more then 1 day the device is not responding good anymore.
The 1 day is from my smoke sensor which only shows presence once a day to preserve battery.
The downside is that only has the ieeeAddr in it so you have to search for the right name of the device.
You could also parse the 'configuration.yaml' or 'devices.yaml' with the ieeeAddr for the right name.
Or just parse ALL the domoticz devices for a deviceId which starts with the ieeeAddr
Edit:
I meant parsing the file '/home/pi/zigbee2mqtt/data/database.db' and the field there is: lastSeen
Last edited by Kedi on Friday 01 September 2023 16:08, edited 1 time in total.
Logic will get you from A to B. Imagination will take you everywhere.
-
- Posts: 154
- Joined: Tuesday 01 October 2013 8:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Sweden
- Contact:
Re: offline device
Ok, I'll try chainging the "Ignore Interval" to No and let's see how it works out.

- waltervl
- Posts: 5855
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: offline device
I did not these this for such a short offline tracking so I don't know. I use 2800 minutes. You can check the global setting in menu setup - settings, tab notifications
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest