I am trying to make a sound with my aeon doorbell, and flash my lights when a contact opens. (for testing im using a motion sensor so i dont have to keep opening the fridge, the contact type is irreverent. (i think)
If the lightts are off when it starts, it will turn them off when its done.
howevevr if i had them set to another color and brightness, i want them to restore to that after the contact resets.
Any help appreciated. I tried this years ago with core. Gave up. Now i just installed webcore and love it. But still having issues.
If the lights are white when it starts they do not return to White. They stay red. basically if the lights were on none of the restore features works. When they are off when it starts they seem turn off again when it’s over but I’m not sure that’s because of the restore states part… Or default behavior.
As part of your webCoRE Pistons, you could define the Scenes in your Native LIFX app for different color schemes for a specific group of lights and then when lights are turned on/off you can set the actual LIFX Scene within your Piston so that the next time they are turned on, they are the correct color.
This would give you the same equivalent restore/return to type of capability.
Thank you for this information. THough I dont think it sovles my issue, I am going to try and make use of this.
The reason it does not solve the issue is because, what if the lights were on when the alert triggered? what if they were off? Thats why i wanted to save the current states. Ill try the webcore community as suggestion above.
If the lights are already on and motion is triggered, I’m assuming you want nothing to happen with your lights set the way they are, correct? If that’s the case, then I would make your Piston NOT fire unless Motion is Active and the Lights are currently off (If they are on do nothing).
if 1 above is correct, then your Piston fires only when Motion changes to Active and the Lights are off. Included in this Piston, you always want your lights to come on in a specific color and brightness, correct? If so, by replacing Turn on Lights with your DO function, use Set LIFX scene you have predefined in LIFX instead, and then with a wait x minutes and then turn off.
If you want them to be another predefined color when they are manually switched on, you could add a different LIFX scene just before the lights turn off in that Piston, so that if someone turns the lights on from a switch (manually) then they will be that color/brightness when turning them on. Otherwise if #2 fires again, it will set to the default Motion scene with color and brightness stored in that scene.
With Motion detected, I’m assuming there is a set standard color and brightness of all the lights, like pulsing ALL red for 30 seconds or bright white for 2 minutes.
I might be missing something in your use case and I apologize if I am, but this should get you pretty close to doing exactly what you want without the lights actually going back to a previous saved state.
As for previous state, you might be able to store values of the current color and brightness in variables within webCoRE and then recall that as a restorable set of values. I haven’t done that, so not sure if it’s possible to do.
My kids love to use the lights to set their current mood for the day and whatever weird color they’re into that day. The trigger is the refrigerator door. It has a bad closer so I put a sensor on it to monitor when it’s not fully closed. If it was open more than 20 seconds I wanted to flash red lights and then restore to whatever the current state was say pink or white during the else statement.
So yes the lights may already be on and a set color. Often white but not always. These lights are my kitchen island pendant lights.
Perfect! Thanks for the explanation. Ya, so I would put out the question as to whether you are able to capture both the color (hex value) and the brightness level in stored variables whenever the lights turn on or when they change color, brightness. If that were possible, you could then use those values to restore to the previous defined color / brightness. Not sure if that is information that can be captured though. Post a follow up when you get the answer I hope you find