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() {
delayBetween ([
delayBetween ([ zwave.basicV1.basicSet(value: 0xFF).format(),
zwave.basicV1.basicSet(value: 0x00).format()], 1000),
delayBetween ([ zwave.basicV1.basicSet(value: 0xFF).format(),
zwave.basicV1.basicSet(value: 0x00).format()], 1000),
delayBetween ([ zwave.basicV1.basicSet(value: 0xFF).format(),
zwave.basicV1.basicSet(value: 0x00).format()], 1000),
zwave.switchBinaryV1.switchBinaryGet().format()], 2000)
}