# Capability Flash (~Blink, ~Strobe)

**URL:** <https://community.smartthings.com/t/capability-flash-blink-strobe/39887>\
**Category:** Capability Type Suggestions\
**Tags:** strobe, blink, capability, flash\
**Created:** [February 20, 2016, 10:07pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887 "2016-02-20T22:07:42Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgauchat](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/tgauchat/32/49516_2.png) [@tgauchat](https://community.smartthings.com/u/tgauchat)\
**Post date:** [February 20, 2016, 10:07pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/1 "2016-02-20T22:07:42Z")

</div>

Continuing the discussion from [How to makes lights Flash](https://community.smartthings.com/t/how-to-makes-lights-flash/39873):

@bravenel just described rather easy way to add “`command "flash"`” to a Switch or Light DTH.

- This is one of the occasions I wish we could officially “extend” an existing Capability with new **_optional_** Commands and/or Attributes… but… _anywayyyyyy_…

- Not sure whether this should be called “Blink” or “Flash” (the latter implies a single bright moment of light).

- I propose: `command flash([frequency, duration] | number of flashes)`, and automatically canceled by the next `on()` or `off()` command.

- `attribute flashing [true,false]` (May be difficult to determine if not reported by the hardware. Is this needed?).

- `attribute flashFrequency [numeric]` (not sure this is necessary at all).

* * *

Discuss?

---

<div class="post-metadata">

**Author:** ![Mike\_Maxwell](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mike_maxwell/32/18673_2.png) [@Mike\_Maxwell](https://community.smartthings.com/u/Mike_Maxwell)\
**Post date:** [February 20, 2016, 10:33pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/2 "2016-02-20T22:33:31Z")

</div>

Blinking true / false can’t be implemented with Bruce’s delay command software implementation nor a hardware implementation such as I did with the aeon micros. Both would have be based on a local timer which I think would be onerous for this method.

---

<div class="post-metadata">

**Author:** ![tgauchat](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/tgauchat/32/49516_2.png) [@tgauchat](https://community.smartthings.com/u/tgauchat)\
**Post date:** [February 20, 2016, 10:57pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/3 "2016-02-20T22:57:20Z")

</div>

> [@Mike\_Maxwell](#):
>
> Blinking true / false can’t be implemented with Bruce’s delay command software implementation nor a hardware implementation such as I did with the aeon micros.

_Great feedback, Mike, thanks…_

Now that you’ve pointed it out, I guess there are two distinct Capabilities (I’ll split this Topic upon concurrence…):

###1. Blink

- See Post #1 above.
- Current SmartThings Platform issues limit implementation. Perhaps only “Flash” (below) is feasible?

###2. Flash (nb: as always, Capability _names_ are subject to open discussion and change)

- A single (small) set of blinks, not
- Command `flash()` or `flash( [number of cycles], option: leaveOn <boolean> )`
- Timing of the flashes (and perhaps the number of flashes) is determine by the DTH and/or hardware and usually not configurable except if the DTH developer offers a preference setting.

?

---

<div class="post-metadata">

**Author:** ![Mike\_Maxwell](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mike_maxwell/32/18673_2.png) [@Mike\_Maxwell](https://community.smartthings.com/u/Mike_Maxwell)\
**Post date:** [February 20, 2016, 11:00pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/4 "2016-02-20T23:00:25Z")

</div>

Blink as a command is ok, what I meant was that the attribute true false implies the state of the thing blinking, which is not returned by the aeon hardware.  
You can blink the aeon for like 10 minutes, but once you tell it to start blinking, there’s no report that says it’s blinking or has stopped blinking, if you follow

---

<div class="post-metadata">

**Author:** ![tgauchat](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/tgauchat/32/49516_2.png) [@tgauchat](https://community.smartthings.com/u/tgauchat)\
**Post date:** [February 20, 2016, 11:03pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/5 "2016-02-20T23:03:26Z")

</div>

> [@Mike\_Maxwell](#):
>
> You can blink the aeon for like 10 minutes, but once you tell it to start blinking, there’s no report that says it’s blinking or has stopped blinking, if you follow

Ah … I understand; that attribute may not be particularly important. Do you have an example of the code handy? Can you force stop the blinking prior to the duration set, etc. ?

---

<div class="post-metadata">

**Author:** ![Mike\_Maxwell](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mike_maxwell/32/18673_2.png) [@Mike\_Maxwell](https://community.smartthings.com/u/Mike_Maxwell)\
**Post date:** [February 20, 2016, 11:08pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/6 "2016-02-20T23:08:12Z")

</div>

It’s a parameter push for a zwave device, the only way to stop it is to issue another param write, but it can be stopped. This part of it is likely to be very device specific.  
I’m not even sure you’re wanting to establish defined parameter ranges since these limits will be device specific as well.  
A bit like the dimmer set level ramp rate option…

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [February 20, 2016, 11:26pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/7 "2016-02-20T23:26:34Z")

</div>

> [@tgauchat](#):
>
> “Blink” or “Flash” (the latter implies a single bright moment of light).

You and I have completely different dictionaries. 😀

How can you infer momentariness to either? “Flashing” implies multiple, but flash does not necessary infer single momentary. When you tell someone to flash their headlights, they don’t necessarily do it only once!

To me “blink” is momentary. “Blinking” is obviously repeated. “If you blink you’ll miss it”, implies singular. If you tell someone to blink, they might interpret that to mean once, or repeatedly.

So, the distinction you raise, I assert, is not a distinction at all.

Besides which, talking about new capabilities and what not is pointless since ST ignores all of this as so much blather, if they even read it at all (ben, slagle, are you actually reading any of this?). (Notice the lack of tagging.)

EDITED FURTHER TO ADD:

BTW, if you actually implement this and use Rule Machine to trigger it, it unmistakably comes across as FLASHING. “Honey, why is that light flashing?”

---

<div class="post-metadata">

**Author:** ![tgauchat](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/tgauchat/32/49516_2.png) [@tgauchat](https://community.smartthings.com/u/tgauchat)\
**Post date:** [February 21, 2016, 12:27am UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/8 "2016-02-21T00:27:04Z")

</div>

> [@bravenel](#):
>
> You and I have completely different dictionaries. 😀  
> How can you infer momentariness to either? “Flashing” implies multiple, but flash does not necessary infer single momentary. When you tell someone to flash their headlights, they don’t necessarily do it only once!

I totally agree that coming up with the _ **name** _ of the Capability is immediately subject to personal experience. For some basic Capabilities, the name is the biggest hurdle; hence the idea of making the Topic Title of each _Suggested Capability_ something that is open to evolution. In most cases, I hope the name can be settled fairly quickly so that the focus will be on the Commands and Attributes/Events (and PoC implementations using those as add-on/custom Commands and Attributes,

> [@bravenel](#):
>
> Besides which, talking about new capabilities and what not is pointless since ST ignores all of this as so much blather, if they even read it at all (ben, slagle, are you actually reading any of this?). (Notice the lack of tagging.)

@yaimavaldivia has joined the SmartThings team as “Capability Czar” – OK… I just made up that title and she probably as a range of responsibilities. However, they just deployed a few new Capabilities after about a year of dead-air, so, I have a tiny bit of renewed enthusiasm.

@Kristopher is is enthused and contributing, some recent interest from @Kyse, and, yes … we have @slagle and @jody.albritton listening and advocating – they had an actual _meeting_ on Capabilities on this past Friday. Yah … I know, nothing to write home about.

##Regardless… two things:

1. I figure it never _hurts_ to introduce a Capability suggestion. Discussion may result in:  
(a) concurrence about the idea and refinement.  
(b) concurrence that it is not needed / redundant / not a “Capability” at all.  
(c) staleness; lack of Community and/or ST involvement, but just a seed planted for future sprouting perhaps.

2. For Case (a), even if SmartThings does not participate, maybe there’s a tiny chance that the Community can agree on it as a “Device Type Template” (pending Capability). In other words, DTH developers / editors / users could come to some amount of consensus regarding the custom / ad-hoc Attributes and Commands (all the way down to their names, datatypes, and parameters). Well – this bullet is very wishful thinking, but a fella can dream, no?

> [@bravenel](#):
>
> BTW, if you actually implement this and use Rule Machine to trigger it, it unmistakably comes across as FLASHING. “Honey, why is that light flashing?”

Yup … I’m definitely leaning towards “Capability _Flash_” now. Does that mean a rapidly, ummmm, blinking light is actually “Capability **_Strobe_** ”? nb: `strobe()` has precedent as it is already a _Command_ of _Capability Alarm_. [Insert pointless frustration here that Capabilities don’t have inheritance, so we’re bound to have redundancy…]. Maybe it’s not just precedent … maybe this is a suggestion that a Device that can `strobe()` (via hardware _or_ software) should claim Capability Alarm; then again, if it can `strobe()` but not `siren()` then we have a problem with the Capability contract – exactly the sort of dilemmas that must have kept @jody.albritton and @slagle awake all Friday night. 😪

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [February 21, 2016, 12:33am UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/9 "2016-02-21T00:33:56Z")

</div>

Whatever… 😀

---

<div class="post-metadata">

**Author:** ![Sticks18](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Sticks18](https://community.smartthings.com/u/Sticks18)\
**Post date:** [February 21, 2016, 1:24am UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/10 "2016-02-21T01:24:45Z")

</div>

Personally it should be capability Alert since that’s the general use for a flashing bulb. Blink, flash, strobe, etc can be optional parameters and it can be up to the DTH to implement as close to them as they can.

I borrowed it from Hue where “blink” and “breathe” are the options, and it’s how I set it up in any custom zigbee bulb DTH I create. Zigbee bulbs are easy to flash because it’s standard in the hardware since they use it to signal pairing and reset. ZLL bulbs have even more options.

Bonus of these is that they flash full bright to full dim, but return to whatever state they were in prior automatically.

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [February 21, 2016, 3:57am UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/11 "2016-02-21T03:57:25Z")

</div>

> [@Sticks18](#):
>
> Zigbee bulbs are easy to flash because it’s standard in the hardware since they use it to signal pairing and reset.

Would you be willing to provide the code for a zigbee bulb to flash? The post below has some clumsy code for flashing a zigbee light. Show us the better code for flash(), and I’ll update that post. See this post:

> [@\[OBSOLETE\]How to makes lights Flash (code for DTH modification)](https://community.smartthings.com/t/how-to-makes-lights-flash/39873):
>
> It is possible to add a custom command to either z-wave or zigbee device handlers to make them flash when commanded. Once the custom device handler is created and published, you can edit the device you want to flash to use that device handler. After that, the flash command can be exposed in Rule Machine Create Custom Commands, and used as an action in Rule Machine. For either type, add this line in the metadata: command "flash" For a zigbee device add this code: def flash() { delayBetween ([delayBetween ([zigbee.on(), zigbee.off()], 1000), delayBetween ([zigbee.on(), zigbee.off()], 1000), delayBetween ([zigbee.on(), zigbee.off()], 1000), ], 1000) } For a z-wave device add this code: def flash() { delayBetwee…

---

<div class="post-metadata">

**Author:** ![Sticks18](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Sticks18](https://community.smartthings.com/u/Sticks18)\
**Post date:** [February 21, 2016, 6:46am UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/12 "2016-02-21T06:46:16Z")

</div>

This is the generic code that should work for any zigbee bulb. It uses the Identify cluster to trigger the bulb’s identify behavior which per the standard is a full bright to full dim cycling that takes about 1 second per cycle. The parameter is the time in seconds to flash, and in my testing you will typically see 1 less flash than the number of seconds. The bulb decrements that value automatically and stops when it hits zero.

You can also send a really high value to start the bulb flashing, then send 0 to stop it immediately if you want it to flash until a secondary action occurs. This could be tied to a open/close sensor for instance for doors left open.

(Note: swapEndianHex() is a custom method and uses an additional method called reverseArray(). Both are commonly found in zigbee device handlers. It reverses the byte order since zigbee is little endian.)

```
def alert(alertTime = 7) {
    log.debug alertTime
    def payload = swapEndianHex(zigbee.convertToHexString(alertTime,4))
    zigbee.command(0x0003, 0x00, payload)
}
```

---

<div class="post-metadata">

**Author:** ![JDRoberts](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jdroberts/32/56577_2.png) [@JDRoberts](https://community.smartthings.com/u/JDRoberts)\
**Post date:** [February 21, 2016, 7:39am UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/13 "2016-02-21T07:39:35Z")

</div>

As others have mentioned, “blink” (once) and “breathe” (15 repeated blinks) are both part of the official Zigbee Light Link standard and are considered “effects.”

See 7.4.2 in the following:

> **[JN-UG-3103.pdf](https://www.nxp.com/docs/en/user-guide/JN-UG-3103.pdf)**
>
> 2.30 MB

---

<div class="post-metadata">

**Author:** ![xAPPO](https://avatars.discourse-cdn.com/v4/letter/x/bc79bd/32.png) [@xAPPO](https://community.smartthings.com/u/xAPPO)\
**Post date:** [February 21, 2016, 12:58pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/14 "2016-02-21T12:58:51Z")

</div>

For a one time event there’s maybe ‘pulse’ too with a delay time until it happens and a duration (pulse width time). You could add a repeat ‘n’ times to create a pulse train (flashing) . Blink and flash both have an implication that a light is involved but it may be a sounder/siren or something, or even a PWM waveform.

---

<div class="post-metadata">

**Author:** ![Sticks18](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Sticks18](https://community.smartthings.com/u/Sticks18)\
**Post date:** [February 21, 2016, 1:33pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/15 "2016-02-21T13:33:34Z")

</div>

Hue A19 accept both of these, plus Okay which turns the bulb green for 1 sec then returns it to whatever state it was in. I incorporated all of these into the Enhanced Zigbee Hue DTH.

---

<div class="post-metadata">

**Author:** ![suprdave04](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/suprdave04/32/24174_2.png) [@suprdave04](https://community.smartthings.com/u/suprdave04)\
**Post date:** [June 17, 2016, 9:14pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/16 "2016-06-17T21:14:48Z")

</div>

Resurrecting this thread… 🙂  
“Is” there a way to blink a light/bulb based on an action/rule/piston?

thanks everyone!

---

<div class="post-metadata">

**Author:** ![schapper05](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@schapper05](https://community.smartthings.com/u/schapper05)\
**Post date:** [June 18, 2016, 12:15am UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/17 "2016-06-18T00:15:16Z")

</div>

Ask in core thread. Pretty sure adrian baked in a software way of doing this. Also if the bulb dth supports it you could use custom commands in core

---

<div class="post-metadata">

**Author:** ![zcapr17](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/zcapr17/32/26770_2.png) [@zcapr17](https://community.smartthings.com/u/zcapr17)\
**Post date:** [March 9, 2017, 9:29pm UTC](https://community.smartthings.com/t/capability-flash-blink-strobe/39887/18 "2017-03-09T21:29:39Z")

</div>

Would be good to have some kind of _Blink_ capability, I implemented a _blink()_ command in my [GreenWave PowerNode device handler](https://community.smartthings.com/t/release-greenwave-powernode-single-ns210-g-en-advanced-dth/80246). The _Indicator_ capability didn’t seem to fit.
