# How to check a device still online in the ZigBee network

**URL:** <https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474>\
**Category:** Devices\
**Created:** [January 20, 2019, 10:59am UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474 "2019-01-20T10:59:51Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![Heronimus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/heronimus/32/3564_2.png) [@Heronimus](https://community.homey.app/u/Heronimus)\
**Post date:** [March 16, 2021, 1:48pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/23 "2021-03-16T13:48:37Z")

</div>

I don’t trust _any_ network. Offtopic in this thread, but how can I trust devices in my network running on closed source software? Some of them have an old OS which isn’t patched anymore. How can I trust my neighborhood; they can capture the wireless traffic between my Homey and Hue?

What’s against more security, no mather if it’s local or public data traffic.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [March 16, 2021, 1:59pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/24 "2021-03-16T13:59:36Z")

</div>

> [@Heronimus](#):
>
> What’s against more security, no mather if it’s local or public data traffic.

There’s nothing against more security, but local devices typically can’t support HTTPS when you have to access them through their IP-address.

If you want to access your Homey locally over HTTPS, you need to allow DNS rebinding in your local network, with which you open up your network for rebinding attacks. Otherwise, you can only access Homey through the cloud _or_ over plain HTTP (and since your neighbours have cracked your WiFi that isn’t ideal either).

---

<div class="post-metadata">

**Author:** ![Heronimus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/heronimus/32/3564_2.png) [@Heronimus](https://community.homey.app/u/Heronimus)\
**Post date:** [March 16, 2021, 3:17pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/25 "2021-03-16T15:17:57Z")

</div>

You’re right when it comes to DNS and signed certificates. I’m talking about selfsigned certificates and IP address usage to my Philips Hue. Except a man-in-the-middle attack, a selfsigned certificate encrypts the traffic between the two hosts. By capturing the WiFi traffic -and finding the WPA2 key- they still don’t have my Hue API key.

An extra security is to store the hue-host certificate as trusted to prevent M-i-t-M, but I think this is more related to Homey Core then this app.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [March 16, 2021, 3:27pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/26 "2021-03-16T15:27:49Z")

</div>

> [@Heronimus](#):
>
> Except a man-in-the-middle attack, a selfsigned certificate encrypts the traffic between the two hosts. By capturing the WiFi traffic -and finding the WPA2 key- they still don’t have my Hue API key.

Unless you allow DNS rebinding, local traffic to your Homey will also be unencrypted and capturing its WiFi traffic would probably pose a much bigger risk to your home.

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [March 16, 2021, 4:53pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/27 "2021-03-16T16:53:59Z")

</div>

To get back more on topic: I understand the usefulness of detecting offline nodes, but isn’t it bad if Zigbee bulbs go off power all the time? Won’t that mess up your mesh? Maybe most devices will find another route, but it sure won’t do response times any good when routers are disappearing and reappearing unexpectedly.

---

<div class="post-metadata">

**Author:** ![Heronimus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/heronimus/32/3564_2.png) [@Heronimus](https://community.homey.app/u/Heronimus)\
**Post date:** [March 16, 2021, 5:27pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/28 "2021-03-16T17:27:27Z")

</div>

I think you should avoid powering off the devices as much as possible. Found more info (Zigbee V3) here: [What Is Zigbee Wireless Mesh Networking? | Digi International](https://www.digi.com/solutions/by-technology/zigbee-wireless-standard)

---

<div class="post-metadata">

**Author:** ![BartOverdevest](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bartoverdevest/32/38783_2.png) [@BartOverdevest](https://community.homey.app/u/BartOverdevest)\
**Post date:** [April 4, 2021, 12:21pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/29 "2021-04-04T12:21:22Z")

</div>

> [@Edwin\_D](#):
>
> I understand the usefulness of detecting offline nodes, but isn’t it bad if Zigbee bulbs go off power all the time? Won’t that mess up your mesh?

Off course it is better for the mesh to switch off the lights via Homey/HUE or programmable buttons in the home. In my case i replaced (almost) all my bulbs (25+) with HUE bulbs/Tadfri bulbs/Osram plugs/Hue plugs/zwave plugs. (i prefer to include Hue hub to have a dedicated app / keep integration with Apple home.  
But we will keep using the physical switches as well, thus the need fro me to create a tool to sync HUE light state based on reachability.  
I minimize this ‘risk’ of people turning off the lights physically by using flow cards to auto turn of lights based on time of day/ light level / duration being on / movements / some ip address presence (work laptop for office, ps4 for game room). And i’m thinking to add mb’s downloaded via de router as well. (if that is zero, everybody must certainly be asleep?)

---

<div class="post-metadata">

**Author:** ![BartOverdevest](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bartoverdevest/32/38783_2.png) [@BartOverdevest](https://community.homey.app/u/BartOverdevest)\
**Post date:** [April 4, 2021, 12:25pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/30 "2021-04-04T12:25:48Z")

</div>

> [@James\_Wyatt](#):
>
> For hue, this will help you:
> 
> [http://yourhuebridgeip/debug/clip.html](http://yourhuebridgeip/debug/clip.html)

Big thank you for this. I used it as a base to create a Homeyscript to copy what I did earlier in dzVents on Domoticz. Both to get the status of the ligths and also to turn of the lights if they are contiuously unreachable for set time period.  
I posted and discussed the code here: [topic](https://community.homey.app/t/homeyscript-to-synch-hue-lights-with-physical-switches/45722)

---

<div class="post-metadata">

**Author:** ![Paxman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/paxman/32/128050_2.png) [@Paxman](https://community.homey.app/u/Paxman)\
**Post date:** [January 23, 2023, 4:53pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/31 "2023-01-23T16:53:58Z")

</div>

> [@Oskar\_Brink](#):
>
> I am looking for a solution that homey knows (by a ping?) that a device is offline (powered off), so that when it comes back online that I can have an action triggered

Bumping this thread since I have the exact same wish. Zigbee is a two way protocol…so I imagine that it would not be that hard to implement some kind of “ping” from Homey that checks if a mains powered device is “live” or disconnected from power and therefore from the zigbee network.

Just today I have replaced an old incandescent bulb in the shower outside our sauna to a IKEA Trådfri. The reason is that I want to be able to have the bulb dimmed when we are using the sauna (there is very dim light in the sauna and when you get out to take a cool shower a bright light is straining on the eyes and breaks the cosy feeling). I also want to have bright light in the shower for cleaning it and other situations when we are not using the sauna.

What complicates this is that the light in the shower and in the sauna is on the same wall switch, so turning off the shower light using Homey will keep the sauna light on. This means that I have to use the wall switch. Why not changing out the sauna light to a Trådfri to you ask? Well, Trådfri is only rated to +40° C…and that would not be much of a sauna would it? 😁

In general I feel that Homey lacks indicators for whether devices are “online” or if they have lost their connection to the network. Another example is sensors. I have a multitude of thermometers, light sensors etc using the 443 MHz protocol and there is no way to know if they are connected or not. The only indicator is to check when the last value was reported.

Since Homey only reports when values changes there is no way to know if the (say) temperature is 100% stable for an hour or if Homey have lost the communication with the sensor, maybe because the battery has gone flat. This annoys me immensely! I constantly wonder if the value in Homey is correct or if the sensor is sending in the blind to Homey. This about the sensor got a bit OT…so I think I will start a new thread about this. 😊

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [January 23, 2023, 5:19pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/32 "2023-01-23T17:19:27Z")

</div>

Maybe you can do something with HomeyScript:

> [@A script to check sensor last update](https://community.homey.app/t/a-script-to-check-sensor-last-update/63142/9):
>
> There isn’t a per-device “last updated” field so it has to check every capability of each device, that’s why you get multiple logs per device. Right now, it will mark a device as “invalid” if one of the capabilities is older than 1 day, but I guess it makes more sense if it only invalidates a device is all of the capabilities are too old: const INVALIDATE\_AFTER = 86400; const invalidatedDevices = []; for (const device of Object.values(await Homey.devices.getDevices())) { if (! device.capabi…

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 23, 2023, 6:23pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/33 "2023-01-23T18:23:46Z")

</div>

> [@Paxman](#):
>
> so I imagine that it would not be that hard to implement some kind of “ping” from Homey that checks if a mains powered device is “live” or disconnected from power and therefore from the zigbee network.

AFAIK there’s no such thing in the Zigbee protocol. Looking at how availability works in a ~~better~~ alternative Zigbee controller implementation (zigbee2mqtt), it will simply mark a device unavailable if it hasn’t reported anything within a certain time frame (10 minutes for active devices, 25 hours for passive devices).

> [@](#):
>
> I have a multitude of thermometers, light sensors etc using the 443 MHz protocol and there is no way to know if they are connected or not. The only indicator is to check when the last value was reported.

433Mhz devices _aren’t_ connected. They just periodically send some data that Homey tries to pick up. That’s how those devices work.

---

<div class="post-metadata">

**Author:** ![Heronimus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/heronimus/32/3564_2.png) [@Heronimus](https://community.homey.app/u/Heronimus)\
**Post date:** [December 21, 2023, 2:10pm UTC](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474/34 "2023-12-21T14:10:37Z")

</div>

Instead of a ‘THEN’ card, I’m trying to use this in an ‘AND’ card. But here is an extra parameter to be filled in: JSON formatted query parameter. Does anyone have experience what the content should be?

[Previous page](https://community.homey.app/t/how-to-check-a-device-still-online-in-the-zigbee-network/7474.md?page=1)
