Noobie here. I’m not adverse to coding to get what I want but Groovy is new to me, so a little daunting. I’d happily take somebody else’s code if it already exists…
Love Flasher and Flasher II, but they seem to flash only by turning on then off (duh!). What if the light is already on? Then it ends up off. Is there a version that checks the state beforehand and returns it to the pre-existing state at the end?
Did you actually try the smart app? From a brief perusal of the code, it looks like The Flasher code does indeed take the initial state of the switch into account. If you tried it and it did end up off when starting from on, let me know and I’ll take a closer look.
Mea culpa. I did try the code but my test case was a GE Link bulb, that because it dims slowly on “off”, confused me as to whether the flashes were working. With longer times, I could see that it does work and the state is preserved. Thank you.
@Sticks18
I have a virtual switch that I want to use as the trigger for the flashing.
I have RuleMachine with a few rules doing different things, and was going to do this in there, but I’m just not sure how to set it up.
I tried The Flasher, but your method sounds like it may be a better way to go.
Any chance you’d be willing to give an example of how to get this done?
Sure. Are they GE Links? What devicetype are you currently using for them? Do you want the lights to flash for a set time (like a notification) or until you trigger it to stop?
You will need to use a custom devicetype to use this method, but I’ve refined how this works. With Rule Machine and Expert features, you will have a lot of options for how you want it to work.
Yep…they are GE Links (soft white). I have a bunch of them…only three currently plugged in and operational. I want to dedicate one of them as a notification mechanism…triggered by whatever RM rule or SmartApp wants to send me a notification for this or that.
I WAS trying to get them to flash a certain number of times for one kind of notification and a different number of times for another kind of notification, but that doesn’t really seem doable (reliably) at this point. So, just using this technique to have them flash for a certain amount of time (if that’s the only option) will have to do.
I know my GE Link bulbs are using two different device types/handlers. I will check them to see precisely which ones I’m using.
Of course, if you have a device handler that you’d recommend, I could just change them over too.
It’s a very small amount of code. Just one custom command, so it’s probably easiest just to modify whatever device handler you prefer. Let me know which one that is, and I’ll write up full a quick How-To.
This should be doable. The flash cycle using this method is about 1 second and the time in seconds is a parameter, so simply using a different parameter could give you a different number of flashes. I believe it works out that the number of flashes is usually 1 less than the number of seconds used.
This will cause the bulb to flash to X seconds when you call alert(X). If you just call alert(), it will default to 5 seconds of flashing.
To use this with Rule Machine, the easiest way will be to use Expert features and create a new custom command called alert() with a parameter that is a number and is the number of seconds to flash. You will need to save a new custom command for each type of notification since the command is saved with the parameter. Then you can trigger this from any of your rules.
If you’re not comfortable using Expert Features in Rule Machine, it wouldn’t be too hard to have a small SmartApp that allowed you to input the seconds to flash and pick a virtual switch as the trigger.
@Sticks18
Done.
I now have a way of using flashing lights for notifications.
Awesome!
Thanks a lot for the help on this.
p.s. Since I’m doing this in RuleMachine, this also enables me to get rid of another SmartApp (the flasher) that doesn’t really work anyway with how ST operates. So, thanks again.
Thanks much for taking the time to do this!
One question though - if one has more than one Moisture Sensor, your app mod lets you choose only one of the existing sensors and not all, or some. Any quick way to modify that?
Thanks!!
Eli
it just stays on because of the current delay and delaybetween bugs. The current delay implementation for example of 500ms will at the moment do 500 seconds instead. So if you wait long enough it will blink. Should be fixed soon
I know I’m not exactly sure how others have flashing setup, but with the way that @Sticks18 helped me get it set up for my GE Link bulbs, it’s still working properly without such long delays.
I assume the delay problem mentioned above is for people using something other than these bulbs, right?
That’s correct. The general flasher app turns the light on/off in a cycle to create the blinking. The method I described only works for zigbee bulbs, but it’s a hardware feature to blink, so it only needs 1 command from the ST system and the bulb hardware takes over from there. It’s much less susceptible to platform issues (of course that one command needs to be sent properly) than the general method; but it’s also device specific.
OK, cool. That’s what I thought, but just wanted to check.
So, for anyone that just wants a small number of blinking bulbs for alerts or something like that (which is all I do with it), then getting a couple these GE Link bulbs when they’re on a cheap sale may be the way to go (I’d go buy a couple at normal price if I didn’t already have a few of them implemented around here).
[quote=“[deleted], post:38, topic:5394, full:true”]
Can anyone help with adding a cancel option for The Flasher?
I have my lights set-up to flash on an alarm situation (10 minutes worth of flashes) via a momentary button tile and rule machine.
When I disarm the Smart Home Monitor rule machine turns off my siren but it cant stop the flashing. The “set for specific mode” option in The Flasher can stop it starting in the first place but wont stop an ongoing sequence.
Would be great if the Flasher could be stopped through momentary button tile of switch. I have played around with the code for ages but cant figure it out.
For now I am using a clunky workaround using 2 instances of The Flasher. 1 to flash just once, triggered by the other to flash 100 times. I can then use modes to stop the individual flashes.
[/quote]
Not sure how much help we’ll get, and I assume this has already been discussed somewhere, but I couldn’t find it. So, I created a new thread for asking about this concept…
I need some help on this. I added the extra code into the Link Bulb device handler and tried to test the alert/flash but nothing happens. For testing, I have the following set up in Rule Machine.
Trigger: Porch Light On
Actions: Run Custom Command: alert(), on these devices:lamp. ( the lamp is the link bulb)