Control Other Devices Based on Status of GE Bulb


(Kevin Tierney) #1

I live in an apartment, so I can’t change out any of the switches. I’d like to create a “easy mode” for when the pet sitter comes in.

The light in the entrance way has two GE Link Bulbs in them. My thought was that if I could tie the rest of my lights to the status of the GE bulbs, then I could in essence create a master switch that turns on/off all my lights using a single dumb switch. Once I get this working, I plan on using it only when I set my home to a new mode I have created for this

So, my first attempt was to take the latest Dim With Me code and modify it to just turn on and off. I did that and my initial tests from my phone worked fine. Of course, as soon as I get up and try to do it from the actual switch, it doesn’t work

What I need at this point is a way for all the lights to come on as close to instantly as possible when turning on the switch, and then turn all the lights off when the switch is turned off. For turning off, a I expect there will have to be a delay.That is ok, even if it ends up being 5 minutes

Any ideas are appreciated


(Brian) #2

interesting. Take a look at your hub events log in the IDE when you turn on your links from the dumb switch. Do you get an instant event that you could trigger upon? Thats the first step. If ST can see the event then working from there should be a relatively straightforward task.

Post your events, post your code :slight_smile:


#3

Try to search for “The Big Switch” in SmartSetup.


(Convinced ST will never be unbroken…) #4

If I read you right, this is not possible.

If your ‘dumb switch’ shuts down the load to the GE Link, it is dead to the world. Can’t be polled, and no event is sent. Likewise when you turn it on, but shortly thereafter it could be polled. However I doubt you want to wait around for that to happen for the rest of the lights turn on.


(Paul) #5

@scottinpollock is right, it seems… I was trying to get something similar to work earlier today, and Smartthings support confirmed there’s no way to get status updates from zigbee bulbs when their status changes with a physical power switch.

I don’t fully understand why that’s true, however… it seems like ST should be able to poll my bulbs periodically and request status updates. If ST gets no response from a bulb, assume it is “Off”. If ST gets some valid response, update the activity log with that status.

At the very least, a manual refresh should update the status, but that doesn’t work either. I’m new to this whole zigbee/z-wave scene, so sorry if this is obvious… I just don’t understand from a software perspective why it’s not possible.


GE Link Bulb: How to get the status updated to correctly reflect the state when manually turned ON?
(Kevin Tierney) #6

Thank’s guys.

I was hoping that the bulb would report to the hub that they were turned back on and that I could poll for status and if the lights didnt report back it would assumed to be off.Guess I’ll just turn on all the lights when the door opens and turn off after a certain amount of time of inactivity.


(Kevin Tierney) #7

Hmm, so I do get this almost immediately when I turn the switch on
in the log

7b87b74b-4382-494b-abba-f25c21d5d8a1 8:54:51 PM: debug fe
7b87b74b-4382-494b-abba-f25c21d5d8a1 8:54:51 PM: trace read attr - raw: CAEB01000808000020FE, dni: CAEB, endpoint: 01, cluster: 0008, size: 08, attrId: 0000, encoding: 20, value: fe
7b87b74b-4382-494b-abba-f25c21d5d8a1 8:54:47 PM: trace on/off: 1

As expected, nothing when turning it off

Here’s the code I was trying to use

preferences {
	section("When this...") { 
		input "masters", "capability.switch", 
			multiple: false, 
			title: "Master Switch...", 
			required: true
	}

	section("Then these will follow with on/off...") {
		input "slaves", "capability.switch", 
			multiple: true, 
			title: "Slave On/Off Switch(es)...", 
			required: true
	}
}

def installed()
{
	subscribe(masters, "switch.on", switchOnHandler)
	subscribe(masters, "switch.off", switchOffHandler)
	
}

def updated()
{
	unsubscribe()
	subscribe(masters, "switch.on", switchOnHandler)
	subscribe(masters, "switch.off", switchOffHandler)	
	log.info "subscribed to all of switches events"
}

def switchOffHandler(evt) {
	log.info "switchoffHandler Event: ${evt.value}"
	slaves?.off()

}

def switchOnHandler(evt) {
	log.info "switchOnHandler Event: ${evt.value}"
	slaves?.on()

}