Flashing light

Hi,

Was wondering if they is anyway to flash/blink light (without IFTTT) when a intruder is detected (for exemple when my siren is turned ON) and I’m away

I know of no way to do this directly with SmartThings as the whole action-hub-cloud-hub-device routing make short on-off-on-off scheduling impractical.

I use a shell script to flash my Hue and GE Link lamps using the Hue API.

I saw code in a sample app similar to the code below. I use it as part of a SmartApp that flashes the lights when my daughter is in the shower too long. She said it’s works. :smile: It sends all of the on/off commands to the server which then dispatches them with a delay between. This reduces half of the latency that @scottinpollock mentions so it should work reasonable well under normal network conditions.

def onFor = 4000
def offFor = 4000
def numFlashes = 3    
switches.each { switch ->
    def delay = 0L
    numFlashes.times {
        switch.off(delay: delay)
        delay += offFor
        switch.on(delay: delay)
        delay += onFor
    }
}

It shouldn’t be too hard to create a SmartApp to do what you want with this concept. I’m not sure how many commands you can send with a delay, so you would possibly have to resend the commands using a timer.

1 Like

Found it! Check out “The Flasher” under the main section of example SmartApps. You can likely do what you want with it.

Great thank you !
Will have a try tonight

I actually find an officiel pre-insateld smartapps.

click “+” “Motion Sensors” “Aeon Labs Multi-Sensor” “Top Alerts and Actions” “Flash a set of lights in response to motion, an open/close event, or a switch”

Just don’t know why is not on the main menu but its work great.

2 Likes

I was looking for something like that to happen with the SMART ALARM smart app. I just linked a bunch of lights on the house, and in the house to flash when one of the Sirens is activated by Smart Alarm.

1 Like

Hi guys,

I’m looking for a way to cycle some lights at a particular time (to remind myself to go to bed). I found the Flash Some Lights smart app that was mentioned above, but there doesn’t seem to be a way to trigger flashing based on time. Does anyone know if there’s a straightforward way to do this?

I’ve never written a smart app, but I have a background in writing software, so if there isn’t already a built-in way, I might try modifying what’s already available.

If you’re using AEON micros (dimmers or switches) they have a built in configurable hardware blink function.
I implemented this in a device and smart app I wrote for them:

1 Like

If they’re GE Links, you can just send the identify command and they’ll blink like whenn the bulb joins the hub. Send the command again and they’ll stop.

Should be easy to incorporate that into a SmartApp.

1 Like

How do you send those commands?

In the device type, the command would be:

“st cmd 0x${device.deviceNetworkId} 1 3 0 {0001}”

That would start the blinking. To stop the blinking use 0000 in the payload portion (ending brackets). The payload is supposed to be the time in seconds for it to blink and it should decrement that until it gets to zero, but in my testing it didn’t work and I had to manually send the command with 0000 to stop the bulb.

If you’re triggering this command from outside the device, you might have to change how you pull in the deviceNetworkId. That’s the 4 digit Id given to the bulb by the hub and is used to address the command to the right bulb.

Thanks for the suggestions! I ended up modifying The Flasher to also flash lights at particular times. It was really straightforward, and seems to be working. For anyone who’s interested, the code is here:

2 Likes

Im a bit late to the party on this one, and fairly new to smartthings, but was wondering if anyone could advise me on how (if possible) to direct my hue bulbs in my foyer to flash “RED” like an alarm when motion is detected when my system is in Night or Away mode. Has anyone done something like this with Hue?

Kevin, this app is “The Flasher” also modded by John (which works great by the way). I use it as a round about way to flash my outdoor lights when smart alarm is triggered. I have it set to flash when one of my smart outlets is turned on. Additionally I increased the time on and time off to 1.5 seconds (1500 ms) and still adjusting the # flashes 60 = 1 minute. If I really do have an alarmed event I just assume they keep flashing until I manually turn them off … still thinking about this. Thanks! Dan T

@jmdaly Got a bit of a chuckle from this. I love automating things but I’ve never considered automating something to tell me when to go to bed. So far clocks (usually the one on my phone) and/or my brain/body are the most useful way to figure this out. :wink:

1 Like

Wanting to have lights flash as long as the garage door is open. I’ve got them to flash for a set number of times ehen it opens, but it’s not related to when or if it closes. Any ideas?

I modified your modifications to add support for moisture sensors.

I know this is a not the Halloween thread, but in preparation for the Big day, is there a way to mod this Flasher app to get triggered by motion sensor and at specific time/Mode change? Can some one mode this? Greatly appreciate.

2 Likes

Pretty new to developing for this. I have been able to make a couple tiny changes to some other apps.

For the Flasher, I would like to add a “Days of the Week” option, so that it only runs on certain days.

I cant seem to wrap my head around scheduling for that specific scenario, can anyone offer some clues on how to add such an option?

Thanks!