I have a few LIFX bulbs connected to a GE zwave switch. LIFX introduced a new feature called “Light Restore” that will allow you to preset a lights color/brightness by toggling the bulbs power On/Off/On quickly.
Unfortunately the 750ms flash is too slow to trigger this and was curious if there was a driver or method to allow me to fine tune the flashing to properly trigger the bulbs Light Restore feature?
If you only need to turn it off and on once, why not just use an "Off" and then "On" command? I suppose it depends on what app you're using, but Rule Machine is one of few I know of that supposes the existence of "Flash" (which, until recently, was not part of any standard Hubitat capability), and you could easily do the same with whatever timing you wanted with just these actions there, too.
That being said, this also seems like a bit of an odd way to achieve this goal, but if you really want to "prestage" and there's no other way, I won't ask about that.
I tried a few things in RM:
toggle 3x - did nothing
On, off, on - too fast
Flash 750ms, on - too slow
In my home i use my LIFX bulbs primarily for circadian lighting, due to my schedule when my lights come on in the morning they come on at daytime brightness for a few seconds before they have a chance to connected to WIFI and get set properly for the time of day. Getting the on/off/on timing right means i can set the bulbs properly w/o the few seconds of WAY to bright for first thing in the morning w/o having to buy new hardware.
Have you tried adding a delay (or a "Wait for events: elapsed time", though the difference shouldn't matter if you don't think the rule will re-trigger in the meantime) between the actions?
If i have to wait for a full second on any action it will be way too slow and it’s sadly a very old non plus switch so waiting on a event wont be reliable. The sweet spot seams to be 100ms - 250ms between on/off/on. If my fingers can do it i should be able to automate it
Well I just learned something new, RM can do millisecond delays, all you have to do is put a decimal in the seconds field. IDK why I didn’t think of that earlier. For anyone else this is what worked to trigger LIFX light restore. @bertabcd1234 thx for the back and forth it helped w/ the inspiration.
Now I would have never suspected that the second delay is cumulative. that's very interesting. I would have expected a second 500 milliseconds delay:wait is the second delay calculated from the initial on, or from the off?
I think I've been doing this wrong for about a year?
The second delay is calculated from the time when the second On is processed.
The first On action is run, then the Off is run which is scheduling the light to go off 0.5 seconds from its running, then the second On is run which is scheduling the light to go On 1 second from its running. I suspect the On-Off-On actions are run milliseconds from each other.
I would recommend making a test rule similar to this so you can see how fast the commands are executed. I believe it'll help your understanding of a delay on an action.
Edit: I just made a test rule and my logs show 100 ms to run through the On then schedule the Off then schedule the On actions.
In the section circled in red the master light will turn on 10 min after the above conditions are true. if it’s Late night mode (If dimmer level of mode is 99) then it will also turn the master light of and back on again 500ms apart. This is my wake up automation for a very gentle wake up.
I know I'm splitting hairs here and it probably doesn't make a difference but let's be accurate. The delay is scheduled when that particular action is run. The On and Off have no idea when the condition evaluated as true.