I am planning a switch from Indigo Domotics to Hubitat. I will be buying a Z-Combo (combination smoke/carbon monoxide detector) to replace the Z-Smoke that I currently use.
I plan to use something like the following for the Action of the rule. I am assuming the trigger will be something like: when the Z-Combo turns onā¦
Set color: Sylvania 1 -> Red->Level: 100
Repeat 300 times every 0:00:08 (stopable)
On: Sylvania 1
Wait for event: --> elapsed time: 0:00:05
Off: Sylvania 1
In my playing around, I can't figure out how to force stop this rule after a few seconds?
I think I would like to have it break out of the Repeat section if the Z-Combo turns off (exits self-test after a few seconds, or responds to my button press after complaining about my cooking).
I think I'm looking for "While ON Repeat...", but I can't see a way to do this. It may be because I don't don't have a Z-Combo connected yet, or I'm just not thinking about it correctly.
There is a RM idiom that does exactly what you are wanting. It is the āSimple Condition Actionā where the Action is a Repeat.
I discussed this recently, with an example, here.
So, what you want is:
Stop Repeating Actions
IF (Z-Combo = ON) REPEAT 300 times every 0:00:06 (stopable)
Toggle: Sylvania 1
END-REP
Off: Sylvania 1
Thatās it. The final Off is because the Sylvania 1 could be left on or off. You could set it however you want.
Edit: I left out the Stop Repeating Actions. Need that if the rule is re-triggerable.
That Simple Condition Idiom is brilliant. It allows you to form a "While" loop.
@steve.maddigan, I see vs.Bed.shaker. Which hardware do you use? I have cobbled together a controllable bed shaker using a smart outlet, 9 V power supply, and Sonic Boom vibrator/shaker. It works, but it's not the prettiest solution. Have you found a better choice?
Super Loud Alarm Clock for Bedroom Digital Clock for Heavy Sleeper Vibraning Alarm Clock Strong Bed Shaker,Battery Backup,Large LED Display,5 Dimmer, Snooze,USB Amazon.ca
And am using a sonoff s31 lite and a 3v dc power supply. After the repeat loop it gets set to on until I get up and double tap the closet light twice
I learned I have to be careful and not repeat too fast or the plug locks up for a minute or so.
That said, itās be 100% in getting me out of bed for almost three months now.
Thanks. It looks like about the same thing I do. I bought used stuff from eBay ā an Aeotec outlet, wallwort-type DC power supply, and individual Sonic Boom bed shaker. I also found that if I toggle it too fast, it acts a little funny.