You’ll want to modify that devicetype to add the following two code items.
At the top, just under the capability list:
command "alert"
In the body, right above the line with def on() :
def alert(alertTime = 5) {
log.debug alertTime
def payload = swapEndianHex(hex(alertTime,4))
"st cmd 0x${device.deviceNetworkId} 1 3 0 {${payload}}"
}
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.