tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
21
Not sure exactly what you mean? The SmartApp clip that I posted could, indeed, be linked to a preference to trigger from a Virtual Switch.
The timing of the “flash” is likely to be somewhat more reliable if done inside a custom version of the light switch’s Device Handler, though, using the delayBetween() method, as per above example. Managing custom device handlers is a bit more complicated that attaching a SmartApp, of course.
I remember installing an ST smartapp called the flasher where you can define the # of flashes, time… Etc. Turn out it was by created by @jmdaly. Now called the flasher II. Does that app have the same coding as above? I tried comparing the codes but have absolutely no idea what I was looking at.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
23
Hmmm… I happen to have an old copy of that in my SmartApps working directory, and I notice it uses the optional “delay” option to SmartThings Device commands on() and off(). I had forgotten about this option; but I can’t find documentation on it either, so perhaps it is deprecated or I’m not looking hard enough. It is worth a try to see if it still is usable, and might be a streamlined solution to this Topic OP requirements.
log.trace(initialActionOn[i])
if (initialActionOn[i]) {
log.trace "1 Before s.on..."
sendPush( "1 Before s.on..." )
s.on(delay:delay)
sendPush( "1 ...After s.on" )
log.trace "1 ...After s.on."
}
else {
log.trace "1 Before s.off..."
sendPush( "1 Before s.off..." )
s.off(delay:delay)
sendPush( "1 ...After s.off" )
log.trace "1 ...After s.off."
}
}
With the usual mesh network caveat that when you send something doesn’t guarantee when it will be received. Just sayin…
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
27
Presuming (and I’m just too dang lazy to just test for myself), that the “delay” option is blocking / synchronous (i.e., the next statement doesn’t execute until the 500ms delay is completed by the current statement. Certainly this is preferable to the busy-wait example I posted earlier.
OK, one might have to do a little experiment. But for @JDRoberts’s perpetual point about the unreliability of the real world, which I entirely agree with by the way based on sad experience, It could be that you’d have to do this instead:
I still prefer the device type method of doing this, with timings like that and the @JDRoberts mesh network principle in mind. There is less distance between the device type and the real world than there is between a smartapp and the real world.
Also just to clarify: I like mesh networks. In fact, I really like mesh networks. They are an elegant and efficient way to solve a lot of problems. Great resilience, very low cost in both dollars and energy. I care a lot about stuff like that.
To me, the inability to force a sequence is just the price you pay for all the other good stuff. It doesn’t bug me–I just add a star network for anything that needs greater throughput or forced sequencing or very precise scheduling.
So I use zwave/zigbee for what it’s good for, and WiFi/point-to-point for when I need it.
I don’t favor one over the other, I just try to match the topology to the use case.
@Mike_Maxwell, The strobe function works like a charm and this is something I was looking for a while now to do my remote car starter project. I noticed you don’t have the energy reporting in the code. Is the code not for just the Aeon Micro? Thanks for posting! Is it possible to link the strobe function to a virtual switch?
@Navat604, the devices I wrote are for the aeon non energy dimmer and switch, I now have an energy switch, so I should be able to write energy reporting versions as well. I will post a link to them after I get these done, may be a few weeks…
Hi,
Newbie here! Would it be possible to share the code to trigger this via a virtual momentary switch vs the play button on the smartapp? Preferably to have the app ask which is the trigger switch? I got your app to work perfectly but now I need to trigger it from a routine and need to change the code. I’m obviously not a codder! Thanks in advance!
@Mike_Maxwell - checking in on this thread. I have a VISION SINGLE RELAY MODULE SWITCH ZL7431 that I am hoping to create different DHs for to change colors (one for each light color) on my multi-led pool light. Ambitious adventure. The relay/switch is on and working, but I am trying to access your Groovy code above and only get 404 errors in Github. Could you provide me with your code and maybe some guidance? Getting this to work the way I am thinking branches off of the ideas on this thread - Use a relay to control Pentair LED Pool Light?. All help appreciated!
You are responding to a post which is two years old and a lot has changed in that time.
Among other things, Mike is now on staff with a competitor to smartthings and has withdrawn all of his ST previous code as he is focused on the other platform.
Thanks for the background here. I have searched the forums for anything to point me in the right direction and this was the closest I have found and it is old. Any help on the ask you can lend?