Power outage and lights

We had our first power outage since I installed smartthings. When the power came back on, all the connected lights (three GE Links and a LIFX) came on. I understand why, as they basically operate like normal bulbs when you operate it with a (dumb) switch, and this probably looked like a switch off / switch on to the lights.

The hub, router, etc is on a UPS, so they stay on during shorter power outages.

Has anyone done anything to keep the lights off, or switch them off, after power is restored? It will be disturbing to the household if a power outage happens during the night.

Check out Power Failure at http://soletc.com/SmartThings

1 Like

This is just a fact of life with zigbee devices. Zigbee as a protocol was originally designed for “always on” sensor nets, it moved into home automation gradually but still has the “always on” assumption.

Some community members have other devices set up to trigger activity if power goes off, then on, and then can use this to turn off all the lights again.

The only problem with this is the obvious one–did you really want all the lights to go off again right after the power just came back on?

It’s a personal choice as to which situation you’ll find more annoying–having to turn off all the lights you want off again, or finding yourself standing in the dark.

Speaking just for myself, I’d just hit my Goodnight mode again, it turns off everything I’d want turned off when I was going back to sleep.

1 Like

An original motion sensor should be delivered on Monday and I’ve already installed the smart app. Thanks for sharing!

However, I wonder how this works with start up delays when power gets restored. My hub and router is on a UPS, so we should have internet for a while after power goes out. When power gets back up, I have no idea how long the devices take to get back online. I’m guessing I would need some sort of delay before switching lights off, to handle devices booting up? And how about if the UPS powered down? Do you know if the event from the motion sensor will reliably be delivered to the hub, even if the hub had to boot up after power was restored?

I’m thinking of the case where we’re out of the country for a couple of weeks and I get a power failure on day 1. I need to reliably make sure my lights aren’t on for weeks.

All my stuff is on UPS as well, but if they run out before power is restored, my recollection is that you will still get the restore notification when power comes back. Of course that most likely depends on a number of things working as they should (and we all know that SmartThings doesn’t always).

You “should” also get a notification that your hub is offline after the UPS fails. This will let you know to pay attention for the “hub online” notification. If you get that, but not the “power restore” notification, you can pretty well assume your lights are on. So whip out the SmartThings app, pour yourself a cocktail while it loads, and turn things off.

You may ask… “Can’t this be automated any further?”, and I would answer yes, but you still couldn’t count on it in the event of a sustained power failure (at least I don’t think so). It is simply a matter of timing, which is one thing SmartThings definitely does not excel at.

And if it is a major outage, you have to worry about the generator at your ISP’s head end running out of fuel as well… even a big ol’ Kohler auto start/cutover generator in your back yard can’t prevent that from happening. (c;

I got the motion sensor today. So far, with “simulated” power outages, it looks to work pretty cool. I really like the fact that I will get a notification of the power failure.

Are you aware of any other devices that will publish a power restored event? I saw someone wrote a device type for Neurio, which seems pretty intriguing…

Thanks again for sharing!

@scottinpollock Is your code for Power Failure still available? The link in the thread no longer works. I happen to come across a Gen 1 Motion Sensor and would like to try it out.

Is this what you’re looking for?

`    /**
 *  Power Is Out
 *
 *  Copyright 2014 Jesse Ziegler
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 */
definition(
    name: "Power Is Out",
    namespace: "smartthings",
    author: "Jesse Ziegler",
    description: "Alert me of power loss",
    category: "Safety & Security",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png"
)


preferences {
	section("When there is wired-power loss on...") {
			input "motion1", "capability.motionSensor", title: "Where?"
	}
	section("Via a push notification and a text message(optional)"){
    	input "pushAndPhone", "enum", title: "Send Text?", required: false, metadata: [values: ["Yes","No"]]
		input "phone1", "phone", title: "Phone Number (for Text, optional)", required: false
	}
    section("Make changes to the following when powered is restored..."){
    	input "offSwitches", "capability.switch", title: "Turn these off", required: false, multiple: true
    	input "onSwitches", "capability.switch", title: "Turn these on if after sunset", required: false, multiple: true
    }
}

def installed() {
	init()
}

def updated() {
	unsubscribe()
	init()
}

def init() {
	subscribe(motion1, "powerSource.battery", powerOff)
    subscribe(motion1, "powerSource.powered", powerOn)
}

def powerOff(evt) {
	def msg = "A Power Failure has Just Occurred!"
    
	log.debug "sending push for power is out"
	sendPush(msg)
    
    if ( phone1 && pushAndPhone ) {
    	log.debug "sending SMS to ${phone1}"
   		sendSms(phone1, msg)
	}
}

def powerOn(evt) {
	def msg = "The Power has Been Restored!"
    
	log.debug "sending push for power is back on"
	sendPush(msg)
    
    if ( phone1 && pushAndPhone ) {
    	log.debug "sending SMS to ${phone1}"
    	sendSms(phone1, msg)
	}
    
    if ( offSwitches ) {
    	log.debug "killing Hues"
    	offSwitches.off()
	}
    
    if ( onSwitches ) {
    	log.debug "restoring Hues"
        def ss = getSunriseAndSunset()
        def now = new Date()
		def dark = ss.sunset
        if ( dark.before(now) ) {
    		onSwitches.on()
        }    
	}
}`
1 Like

FYI - I wrote a SmartApp (based on idea by @JDRoberts) to keep track of which bulbs are off and turn then off after a power outage.

Thread is here:

SmartApp is here:

Hope this helps!

3 Likes

@Jimxenus Thank you this is what I was looking for, worked exactly as how I expected for my needs.

1 Like

Has anyone thought of including battery powered ZigBee bulbs for emergency lighting? Could trigger those on power outage, then create some rules for when the power comes back on as to which areas shut off the mains lighting.

I’m not aware of any battery powered zigbee home automation lights except the Hue Go, which turns itself off all together (stops listening to the network) after about three hours.

https://www.amazon.com/Philips-798835-Personal-Wireless-Lighting/dp/B00UVHAC1O

The problem is that a networked device needs to be always on Power so that it can hear the next “on” command from the network. Lights take a lot of energy. So a battery-powered networked light just doesn’t have enough battery life to be acceptable to most consumers except as a party light like the go.

There are quite a few nonnetworked emergency lights which can work very well if all you’re concerned about is the power off situation. You plug them into an outlet and when the power goes off they turn themselves on. But they are not controllable wirelessly. And they’re very dim, pretty much nightlight level when they are plugged in, although several have a flashlight feature which is very bright. Helpful if you live in an area where power goes out a lot.

https://www.amazon.com/American-emergency-flashlight-nightlight-ARCBB200W-DBL/dp/B0045W0MD4/

Not sure if this thread reached a solution yet. However the steps mentioned below helped me with a work-around.
Issue Description : Wipro Smart light bulb turns on in full brightness after a power outage and there is no default setting in app like in the phillips hue apps.
Given: Wipro WiFi Enabled Smart LED Bulb B22 9-Watt (16 Million Colors + Warm White/Neutral White/White) (Compatible with Amazon Alexa and Google Assistant)
Solution: “After applying solution, you may need to command Google or Alexa to set room brightness to a value less than 100% to let the device remain powered ON and evade the Automation applied below”

  1. Connect your device to home Wifi
  2. Install the Wipro Next Smart Home app on your phone
  3. Connect to the same network SSID as your IOT device
  4. Open Wipro Next Smart Home app on your mobile device
  5. Choose the affected device
  6. Click TAP to Run Automation
  7. Choose the default automation named “power sequence Day/Night” if it exists or create a new automation template
  8. Set the following conditions and set criteria to " Any Condition Met":
    1. Schedule: :00:00, for all days
    2. Schedule 23:59, for all days
    3. Add condition “When Device Status Change” “Stich” “ON”
    4. Add condition “When Device Status Changes” “Bright” = 100
  9. Add TASK and choose Function to Turn OFF the device
  10. Set “Effective Period” to ALL DAY

You’re replying to a post which is four years old. A lot has happened in that time. :sunglasses:

I’m glad you found a solution that works for you, but in the future, please either start a new thread if you have a new topic to contribute or reply to threads which have had activity in the previous 12 months. Otherwise old and out of date information keeps bubbling up to the top and people have to reread through stuff which just doesn’t apply anymore.

In addition, this forum is for people who are using the Samsung SmartThings ™ home automation platform. So all the questions and answers are assumed to be in that context. The solution you listed will work with the Wipro Next Smart Home app, but doesn’t work with SmartThings, so could be pretty confusing for this community.

If you are looking for a general home automation forum, there’s one at reddit which covers all brands:

https://www.reddit.com/r/homeautomation/

1 Like