How to detect if a device is online

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
User avatar
Wolly76
Posts: 24
Joined: Sunday 21 March 2021 8:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands / Utrecht region
Contact:

How to detect if a device is online

Post by Wolly76 »

Hi all,

I would like to test if a device is online. More specifically a WiFi light bulb. I could retrieve the last-updated-time as well as the state, but both parameter give normal values when the device is on or offline (power is off).
A method might be to ping on the IP address but I couldn't find a way to retrieve the IP address of a certain device as it is handled using MQTT.

Domoticz itself adds a red bar on the device when it is offline, but how to get this information in dzVentz?

Does anybody know how to achieve this?

Thanks in advance.
Regards, Wolly
User avatar
waltervl
Posts: 5852
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to detect if a device is online

Post by waltervl »

It should be the .timedOut device attribute that indicates that.

https://www.domoticz.com/wiki/DzVents:_ ... ll_devices
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
Wolly76
Posts: 24
Joined: Sunday 21 March 2021 8:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands / Utrecht region
Contact:

Re: How to detect if a device is online

Post by Wolly76 »

Great! thanks. Life can be so easy, sometimes.
ssk17051980
Posts: 112
Joined: Thursday 08 December 2022 22:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: ROMANIA
Contact:

Re: How to detect if a device is online

Post by ssk17051980 »

did you find a solution to find if a device it's offline ?
thx
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest