Looking up superstate … do you mean the :“beta v1.1”?
Correct. Follow the instructions on GitHub, and you’ll be set.
I would love to have a version of your app that does not use dimmers. My kitchen lighting is on zwave switches. I tried to modify your code but the IDE seems to be on the blink at the moment for creating new apps.
What is it that you want? The motion control? Obviously the dimmer levels per mode is irrelevant. If it’s just switches activated by motion, for on and off, that is totally doable with Smart Lights.
Smart lights has a bug. If you select turn off 2 minutes after motion stops and there is a motion off event it will turn the lights off after this initial motion off event. It does not reset the timer if another motion event occurs after motion stops during this 2 minute timer.
I’ve discussed this at length in some other threads.
Before Smart Lighting I had my kitchen lighting setup to turn off X minutes after the motion stops. It worked perfectly and never turned off while motion was present.
Got it. I’ve heard about that bug. I wrote a little app to handle “Turn off after motion stops” that does that function (reliably – ). Just use Smart Lights to turn things on the way you want, and use this app to turn them off after motion stops (instead of Smart Lights doing it). That should get you around the bug until they fix it.
Go to this thread:
Thanks Bruce! That fixed my undercabinet lighting.
Hi @bravenel – just starting using this code and it seems to be working great, one option that would be really helpful though would be to have the ability to set philips hue color when turning on a set of lights. The dimmer option works great, how easy would it be to implement the color option also?
James, I don’t have any Hue bulbs, so I haven’t messed with color AT ALL. It should be possible to extend the app to use color, but I haven’t looked at it. This is not on my list of things to do right now. Maybe someday…
I had a little play around with the code and actually managed to get it working.
For anyone who may want to do this you just need to do the following:
Find def switchesOn() and within that replace
master.setColor([hue: 23, saturation: 56, level: state.dimLevel]) slaves?.setColor([hue: 23, saturation: 56, level: state.dimLevel])
This is obviously a very basic change (with a hardcoded color) and will need additional tweaking to be able to select a color from the app.
I’m trying this app in place of RE because of delay issues. I can get it to work great with my GE Link bulbs but my Cree’s won’t dim after turning on the first time. The first time they do go to the correct value. Using Wackware GE Link Bulb as the device type (same as on the working GE bulbs) tried the generic Dimmer Switch as well as a Cree device type knowing it wouldn’t work, it didn’t. Any thoughts on what device type to use for the virtual switch?
I don’t know what RE is, or what delay issues you are referring to. I’m using Motion Lighting with Cree bulbs, using the first Device Type published by ST for the Cree bulbs, called “My Cree Bulb beta”. That works fine for me, and I’m able to control my Crees just like any other dimmer I have.
Which virtual switch are you asking about?
Ha, sorry was thinking rule machine while reading about an engine, brain short circuit. Rule machine takes between two and three seconds to bring a light on from a motion sensor. Takes half that time when processed local.
My setup is two cree or ge smart bulbs in a single fixture. Since ST doesn’t do groups that I’ve found, I have a dummy switch that controls both real bulbs, hence using RM, Dim with Me, or Motion Lighting. The ge bulbs work with motion lighting and the dummy switch when device type of the dummy is the wackware ge link bulb.
I’m guessing I need a virtual device type similar to that but with the correct Cree coding.
Obviously I could just tie one bulb to the other in motion lighting but that would break some of my rules that use each light brightness individually from one another.
Sorry I can’t really help you with this, this has nothing to do with the app.
No worries, just hoping someone else may have been in a similar situation and came across a solution. Thank you.
hey bruce, is there any way to get the slave to follow the master dimming level when you adjust the master dimming level?
i have my office lights turning on the den lights, but when i adjust the dim level, the den lights don’t follow the office [master] level.
Can you tell me if this has the ability to not affect lights that are all ready on? (So if lights are off, and motion detected, turn on. But if lights are already on, do nothing)
If so then it is my dream come true. I have been fighting with Core on this for weeks now. Core has the function, but it fails constantly.
Hi @bravenel, I have exactly the same question as @cael…is there a way for this app to NOT affect lights that are already on? If not, would it be possible to add that capability? (I saw that you had laid out the basic logic in a separate thread)
Hi @rogerg, this is quite an old discussion and the original author unfortunately hasn’t been around since June. You might want to consider other alternatives like CoRE (community members can help in the discussion specifically about peer assistance), or you can attempt to modify the original code.
Cant thank you enough!