Homey Community Forum

How to check a device still online in the ZigBee network


#1

I hope someone can help me with the following situation.
I have a few Ikea lighbulbs that I can control with Homey, and working to satisfaction. However, I also believe that the normal lightswitch should be working as everyone in the house is used to, and I am not planning to replace my switches around the house with Zwave or other intelligent switches. So, when the power is turned off by the switch the light goes off and when turned on the light goes on. So far so good. However that status change of the power is not registered in Homey (understandable).
With WIFI connected (xiaomi) light bulbs I use the Smart Presence app to test a device is offline or online, so I can sync the status with the power status and enable scenes when power is turned off/on.
Is there is similar possiblity with Zigbee devices, to be developed perhaps, to test if a light is offline/online in the zigbee network (ie. being powered on or not)?


#2

Hi Oscar,
I also have Tradfri bulbs, but not controlled by Homey yet. My experience with only the Ikea dimmer is that the bulbs DO remember the last state if they are switched off and on by a physical switch.
Isn’t there a setting in the Homey Tradfri app or with the devices itself that you can or need to adjust?


#3

Peter,
There are no separate settings in Homey for this as far as I could find out.
I am also not looking to the lights to be restored to the state they were in; turning on the power should just turn on the light by default.
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 or control “lights out” via Homey or Alexa. Currently the device remains “on” in homey when power goes off, so no flows are triggered. If I can test the online vs offline status I would have a way of detecting the power is off, so in Homey it should be off as well.


#4

Ah, ok, mis-interpreted that. Alas, i wouldn’t know if that is possible or how to do that.


#5

I just checked with the Tradfri gateway, and it looks like that device doesn’t really notice that the power has been removed from a bulb either (I waited for about 5 minutes). Only when you make it send a command to a bulb it will notice and mark the device as offline.

So I don’t think that there is a sort of “ping” signal that can be used to check if devices are still online or not.


#7

It seems the gateway is more aware than Homey.
With Homey I can send any command to the light bulb and it will not change status.
Perhaps with the gateway, if it regularly sends a command (which one?), it will see the status being offline or online. Could you test this?

While it might at least be a work-around for my Ikea bulbs, I would still hope that basic capability could be provided native from Homey or through some of the apps.


#8

If I try to change either the on/off status or the dim value (from Homey using the gateway app), the gateway will notice that the device is offline in about 10 seconds. The Homey gateway app marks the device as “unavailable” at that point.

And the other way around works too: if I switch on the bulb, it takes about 5 seconds for the gateway and Homey to notice it’s back online again.

In theory, you could periodically send a “dim” command containing the same dim value that it’s already set to, or an on/off command with the same state as when the bulb was last seen, to force a status update. However, I don’t know if Homey, or the gateway app or the gateway is smart and see that you’re setting the dim value to exactly the same value, and just ignore it. Don’t have time to test that now

That seems to work as expected: I’m running a flow that sets the brightness of the lamp to the value it had last (using a tag), and when the bulb is turned off, it’s marked offline in about 10 seconds.


#9

Robert, Thank you.
It looks that the Tradfri gateway indeed is doing the trick. Very nice.

I am keen to see if there may be other solutions working with Homey natively - which I would still prefer.