Power outage and lights

poweroutage

(Dan) #1

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.


Power outage – Big problem
Use of outlet plug to monitor mains supply
(Convinced ST will never be unbroken…) #2

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


#3

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.


(Dan) #4

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.


(Convinced ST will never be unbroken…) #5

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;


(Dan) #6

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!


(C Schwartz) #7

@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.


#8

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()
        }    
	}
}`

(Nick) #9

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!


(C Schwartz) #10

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


(Steven) #11

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.


#12

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.

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.