Automatically turn off Zigbee Bulb? It shouldn't be this hard

Hi all.
I am been working on something that should be so simple, but I am making it much harder that it needs to be....most likely. So I looked on this Community and I just didn't find a clear answer or else I am using wrong search parameters.

My kids cannot remember to tun off their closet lights. I am using Singled Bulbs and they show up in Hubitat using the Generic Zigbee Bulb. I can control the bulbs through Hubitat, so that part is working.

All I want to do is turn the closet light off 2 minutes after it is turned on. I am not doing something correctly. I have tried using Simple Lighting and with the Rule Machine and getting stuffed.

I am hoping you will show me my silly mistake and I will do a face palm.... :slight_smile:

Here is what I have in Rule Machine:

Or this.
It uses a trigger

image

1 Like

You want to use a trigger, not just a standard rule.

Make sure the switch you're testing ACTUALLY sends a message when it's turned on or off.

Open the device info page. On the right is a column of Current States. For a switch, it's very short :smiley:

Current States
switch : off

Now go physically turn the switch on (or off) and verify it changes on the screen.

The switch is NOT sending a message when it it turned on or off.

I have a traditional light switch controlling the bulb. When I turn the physical switch on, the bulb comes on, but the switch state remains off.

I use sharptools. I can send commands to the bulb to turn it on and off as long as the physical switch is on. When I do this, the switch state moves to the corresponding on/off state.

So is there a way to turn on the physical switch, the bulb come on, and the switch state switches from off to on?

Smart bulbs need continuous power to maintain their state. I'd recommend getting a smart switch instead of trying to deal with physical switches. As far as I know, Sengled bulbs don't send a message when their power has been disconnected. There ARE some bulbs that will do this, but in general it's hit or miss.

You're right, my mistake. I read that you were using Sengled and then it vanished from my head.

There has been some very recent work on this exact issue... that a smart bulb CAN send a last gasp message to say it's off. That's not to say that Every Bulb manufacturer does it...

Let me see if I can find that thread.. and thus tell if the fix is out or due to be out next release...

I thought Sengleds were one of the ones that didn't send a LWT.

It looks like Sengled Classic whites are the only ones that DO send a LWT, but it's been reported that it's hit and miss.

Well, I would have rather it been something as easy as using a switch when I should have been using a rule.... So, will this issue be fixed with these Sengled bulbs? Or would i need to purchase another brand in the future?

That's the problem. Smart bulbs are NOT designed for this type of operation. They are meant to be continually powered so that they can communicate with the controller and other devices near them. Zigbee, in particular, relies on a mesh network. If you are cutting power to a device, that breaks the mesh and it takes time to heal and it's not something that just happens in a few minutes. On larger mesh networks, it can take up to 48+ hours for the mesh to fully heal.

Gotcha!

Thanks!

@terrylowe
I would suggest leaving the power on to the bulb and get a contact sensor for the door.
That way you can easily program the light to go on when the door is opened and off when it is closed (or after a minute or two)

Andy

3 Likes

Honestly to keep things simple, I would grab a standard motion sensor light switch (non-zwave or any smarts). These have different settings so that when they no longer detect movement they turn off. You can replace the smart bulb with an off the shelf replacement and be on your way.

3 Likes

Ew! Old tech?! :wink:

I kid... sometimes the old stuff still works best.

I am still relatively new to this but couldn't the OP poll the light say every 5 or 10 minutes or so and if it is on then turn the switch off in 2 minutes.

Mike

The problem is if the light suddenly disappears from the network, as would happen when you kill power to a smart bulb with a conventional switch, it's state in HE will not change and it's no longer there to poll.