Routine after SmartThings Hub V3 Reboot?

Hello,

My lights and outlets automatically go to ON state after every power outage or my SmartThings V3 reboot. I wonder if there is any way to create a routine to turn all outlets and lights to OFF staye after a reboot or power outage? What parameter can be used to trigger some actions?
Thank you

just curious
 what brand/model do you have for lights and switches?

They are Sengled.

I know for example at Philips Hue lights
 There’s a setting for every light “Behaviour at power loss/gain” You gotta set it per individual light.

Cant you set something like this for your Sengled lights? Is there a Sengled app you can maybe set this in?

Going from the idea that the hub loses power and is unable to send commands to the light
 this is a setting that is “baked” into the memory of the said light itself.

I was expecting the same. But unfortunately, there is no such setting. Sengled have theor own hub to talk to their app. I’ve connected them directly to my ST Hub so can’t use their app.
I jist need to find oit how tp trigger a routine after start up/reboot of the hub


Yeah; looking at my Hue lights
 If i would connect them straight to smartthings; the option would also not be there. It has to go through the Hue Hub.

1 Like

People have done this a number of different ways in the past. The easiest is probably just a “canary“ principle. choose a device that you don’t use for any other purpose. As long as it comes on after a power outage AND it tells the smartthings hub that it has come on, you can use that as your “canary.”

(a reference to “canary in a coal mine,“ meaning something that alerts you to an environmental condition). if you have a smart bulb which Will tell the hub when it turns on after a power outage (some do, some don’t) then you can use that bulb coming on to tell you that there has been a power outage at your house. And having done that you can then reset all your other bulbs however you want them to be.

There is a smart app that does this, but of course it’s groovy, and the whole idea would have to be rewritten once the transition to the new platform is complete. But if you look at that thread you can see a discussion of some of the devices that do it

AnD it’s the same general idea for any device. Find something which turns on after a power outage, and then write a routine based on that device coming on. This could actually be pretty simple, it could even be a smart plug. As long as it’s something that comes on to full power after a power outage and notifies the hub that it’s on and that you don’t use for any other purpose.

Another alternative is a device which can switch between battery and Mains power and notify the hub of the change. These are more often used to get an alert when power is lost, but you can also trigger on power being restored after an outage, it’s just that the logic gets a little trickier.

If you are in the US, here’s one example of this kind of device.

https://www.thesmartesthouse.com/products/diy-smart-power-outage-monitoring-kit

It’s true that if you have a hue bridge with hue bulbs, that’s by far the easiest since it’s handled in the bridge and the lights won’t even come on at all. With the other two methods I mentioned the lights will come on and then go off as soon as the routine runs. So it depends on exactly what you’re trying to accomplish.

3 Likes

Also, as always, the first rule of home automation applies: “the model number matters.“ Some smart plugs have a parameter that you can set in the plug itself for what behavior you want to see after a power outage. But others don’t.

Here’s an old FAQ on that, but it will give some examples.

1 Like

That’s a great idea. I have a smart plug that I don’t use :+1::+1:
I wish ST adds this feature in the future too. It’s a basic status bit to monitor for a hub.

2 Likes

IoTrust,
Were you successful in setting up a routine to turn off Sengled bulbs after a power outage?

I have recently installed these bulbs in two closets, and my home experiences regular power fluctuations which will turn the bulbs on. And if the bulbs are on for a while, and get hot (normally hot for any light bulb that stays on) then I am no longer able to control them with the ST app or routines and have to power them off, and let them cool down.

I am using the driver ‘ZigBee Light Multifunction Mc’, which has the option to set the default status to OFF after a power outage. But my bulbs do not use this setting.

I just set up a routine to turn off the bulbs based on the precondition status of the door sensor as closed. So if the bulb turns on, and the door sensor is closed, then the light will turn off within a second. This routine works in testing, so I’ll have to wait until the next power outage to confirm if it was a real success.

Mesh networks like Zigbee and zwave are not designed to handle commands on less than 30 second intervals. Commands can bounce around the network for a little while, taking different routes, and might even need to be sent two or three times before getting through. Neither Zigbee nor Z wave guarantee sequencing of messages for this reason as well.

(if you open a door and then close it again very quickly, on a mesh network it’s entirely possible that the “door is closed“ message might be received by the hub before the “door is open“ message arrives. )

It’s true that the individual device manufacturers and the UI designers may allow you to create a rule which uses a time period of less than 30 seconds, but doing so may introduce opportunities for unreliability.

Best practices is to never schedule anything that relies on mesh messaging with less than a 30 second interval, and preferably with a one minute interval as a minimum.

( devices like latching relays may have built-in firmware options that act within just a few seconds, and that’s fine. That’s something the device does for itself and doesn’t require sending out messages over the mesh.)

Since it doesn’t sound like your use case would really require a one second interval, I suggest changing the interval to one minute. It should still do what you want as far as turning itself off when the door is closed, but it will likely perform more reliably for you.

Just a thought. :sunglasses:

@nathancu @posborne

1 Like

Thanks for the advice. I am starting with a 30 second delay. Power spikes happen often enough by me so I can monitor for reliability and adjust the delay if necessary.

Regards,
AW

2 Likes