Flashing light

I thought there was a straightforward way of doing this with Rules Machine but am not finding it. Am I missing it?

Easy. Make a virtual switch that turns off after 1 second, use a virtual button, or trigger it with a real switch or button, then create two trigger rules.


[Edit] Just noticed I forgot to include the 2 minute on and then off after flashing 5 times as you had in your piston. If you want to do that, then change the second rule like this...



Oh, thanks.
I might use something similar to flash a small Zwave strobe light to indicate that HSM was tripped. Just in case the notification messages I’ve setup don’t get out or get received.

I am surprised that RM doesn’t have a flash option. @bravenel But this said in RM there is the ability to create custom commands and use those in an action. I just tested it and flash does show up in the list of available commands after you select a switch.

I am pretty sure that the particular device that you want to use must support the FLASH command for RM's Flash Action to work. Not all Drivers/Devices support FLASH. I believe my GE Z-Wave switches support the Flash Command, but my Zigbee smart bulbs do not.

Others may know better.

WebCore labels that flash command Emmulated Flash which seems to work fine with hardware or drivers that don't support the flash command.

1 Like

I've tried to implement this and cant get it to work. I even created the exact same triggers as the first two. The first "Doorbell flash" activates fine when I push the virtual button, and the light starts flashing. But the second "Stop doorbell flash" trigger never seems to activate, and so my lights keep flashing.

Any ideas what I could be doing wrong?

You used Stop Actions in the Stop doorbell flash? Can you take a screen shot of your two rules and post so I can try to help.

Yes I triple checked it, and I'm sure I have it all like your triggers. It seems like the Stop doorbell flash "Rule truth" trigger event isn't activating as I cant see anything in the logs. I did just notice an odd extra space in my "Select Trigger Events" though. Mine has "Rule truth becomes Doorbell flash true", with an extra space between the flash and true. My UI seems to add spaces at the end to any rules I add in there. A bug perhaps that is causing this? Here's the screenshots.

Doh! I didn't test after the amendment I told you to make. The first example I wrote for stop doorbell flash, I was just turning off after 22 seconds. Then I wrote to change that becuase I forgot the delay off like you have in your piston (I'm not good at reading pistons as you can tell :crazy_face:).

So I forgot to add turn the light on after the 22 seconds of toggling. So if I do this, it works. If I just flash for 20 seconds and then tell the light to turn off like you have, that works too.

This is the same thing as I posted before (just using a different light to test this time), but this rule has the Turn light ON after the 22 second delay, which is what I accidentally omitted last time.

Thanks. I'm not the original poster though :slight_smile:

I just want the light to flash for x seconds, like your first example. So I dont understand why the trigger I have doesnt work to stop it flashing. I note your latest example has the extra space too, so it's not that.

The extra space is just GUI doesn't effect anything. What is it you're flashing, a Zigbee bulb directly or a Z-Wave switch?

A Philips Hue bulb, via the Hue hub.

Weird. The first two times I created these example rules, i used lights that were directly paired to the hub. Now I just tried with a single Hue bulb and it worked, so I tried with a Hue group and it also worked. I cannot make it fail.

I think my problem is unrelated to the fact that its a light. I think its to do with the "Rule truth becomes true" not triggering. I just tried another example, with just speaking a message to an Echo, and it also fails to trigger.

For a test, replace Rule Truth with a virtual button or switch to see if when activated it stops the doorbell flash rule.

Yes that seems to work fine. And in fact if I have it on the same virtual button as the Door bell flash rule, then after 20 seconds it stops it. So that does what I need. But I'm puzzled over why the Rule Truth doesn't work.

Yeah I was playing around with setting private boolean for you instead and I was able to duplicate the issue you were having. Used a virtual switch in place of the rule truth or private boolean, and it works for me too.

Must be some issue with the Hue Integration and the timing of the lights turning on and off. I could go on experimenting, but this works. I'm done.

Happy Thanksgiving!

I don't think its the Hue Integration, because for me it happens also if I replace the bulb switch with speaking a message to Alexa.

Happy Thanksgiving! And thanks for all your help.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.