Making Zwave Devices Flash lights

I am looking to produce visual alarms by having the lights flash to get attention. Assuming if something triggers it, what would be a good way to make the lights flash for a few seconds?

In case if you’re wondering why I’m making this request - I’m deaf, so I’m looking to use Zwave for visual alerting when certain things are triggered (e.g. alarm goes off, doorbell, etc.)

Thanks for any ideas or suggestions you may have!

I recall seeing several threads here on this topic, here’s one: http://forum.micasaverde.com/index.php/topic,8242.msg52532.html#msg52532

Great, thanks for the lead. I’m learning about Lua and I see how useful it can be.

This was an old thread but I have a question that’s right on topic.

Ran the code and it worked fine however the dimmers are ramping up and down rather than turning on and off instantly.

Is there another command that can be sent to the dimmers so they turn on and off instantly? That would give a true flash effect.

[quote=“Timon, post:4, topic:171877”]This was an old thread but I have a question that’s right on topic.

Ran the code and it worked fine however the dimmers are ramping up and down rather than turning on and off instantly.

Is there another command that can be sent to the dimmers so they turn on and off instantly? That would give a true flash effect.[/quote]

Some dimmers, like the GE/Jascos, have configuration parameters that can set the ramp rate. Most of mine I have set so they are essentially instant when the command comes via z-wave, but normal ramps when being operated manually…

I would think you could easily do this with PLEG.
When a scene is triggered it turns on a device (light).
Manage delays to have it go on and off. Just add a few delays.
Haven’t tried this but don’t see why it wouldn’t work

The LUUP routing works just fine except that the dimmers ramp the light up then down rather going direct from off to full on. That doesn’t result in a very good flash.

FYI, the dimmers come from Evolve.

I got this one…
local device1 = 79 --Light 1
local device2 = 80 --Light 2
local device3 = 165 --Light 3
local device4 = 58 --Light 4
local device5 = 77 --Light 5
local device6 = 157 --Light 6
local device7 = 114 – Light 7
local device8 = 57 --Light 8
local device9 = 156 --Light 9

local virtualswitch = 4 --enter device ID for the virtual switch that will represent & control the blink status
local delay = 4 --enter the delay in seconds that you want the lights to blink at

function DipOnLights()
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device1)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device2)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device3)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device4)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device5)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device6)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device7)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device8)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, device9)

if (sBlink == “1”) then
luup.call_delay(“DipOffLights”, delay)
end
end
function DipOffLights()
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device1)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device2)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device3)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device4)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device5)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device6)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device7)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device8)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, device9)

if (sBlink == “1”) then
luup.call_delay(“DipOnLights”, delay)
end
end
if (sBlink == “1”) then
sBlink = “0”
luup.call_delay(“DipOffLights”, 0)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” }, virtualswitch)
else
sBlink = “1”
luup.call_delay(“DipOnLights”, 0)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” }, virtualswitch)
end

Or this one with a motion sensor with a camera…

local virtualNo = 4
local sensorNo = 100
local lightNo = 79
local dayNo = 12

function checkmotion()

local tripped = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, sensorNo) – sensor tripped
local lightOff = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”,“Status”, lightNo) – Light OFF
local itsday = luup.variable_get(“urn:rts-services-com:serviceId:DayTime”,“Status”, dayNo) – Night Time

	-- If sensor tripped and Light OFF and Day Time

if (lightOff == "0") and (tripped == "1") and (itsday == "0")then  

-- Set Virtual Switch and Motion sensor to OFF

luup.call_action("urn:upnp-org:serviceId:VSwitch1", "SetTarget", {newTargetValue = "0"}, virtualNo)
luup.call_action("urn:micasaverde-com:serviceId:SecuritySensor1", "SetArmed", {newArmedValue = "0"}, sensorNo)

–Enter the device ID’s fir the light and number of times you want the light to go ON and the delay beetween ON and OFF
local array_lights = {79}
local original_status={}
local counter = 6
local delay = 2

function set_switch(device,value)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=value },device)
end
function light_on()
for i, device in ipairs(array_lights) do
set_switch(device,“1”)
end
luup.call_delay( ‘light_off’, delay )
end
function light_off()
counter = counter-1
if counter > 0 then
for i, device in ipairs(array_lights) do
set_switch(device,“0”)
end
luup.call_delay( ‘light_on’, delay )
else
–Set to original status
for i, device in ipairs(array_lights) do
set_switch(device,original_status[i])
end
end
end
–Save Original status
for i, device in ipairs(array_lights) do
original_status[i] = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”,“Status”, device)
end
light_off()

– Delay of 40 seconds before returning to normal

luup.call_delay(“delayOff”,40)

function delayOff()
– Set virtual switch and Motion sensor to detect
luup.call_action(“urn:upnp-org:serviceId:VSwitch1”, “SetTarget”, {newTargetValue = “1”}, virtualNo)
luup.call_action(“urn:micasaverde-com:serviceId:SecuritySensor1”, “SetArmed”, {newArmedValue = “1”}, sensorNo)
end

else
– Maintain Virtual switch and Motion sensor to detect
luup.call_action(“urn:upnp-org:serviceId:VSwitch1”, “SetTarget”, {newTargetValue = “1”}, virtualNo)
luup.call_action(“urn:micasaverde-com:serviceId:SecuritySensor1”, “SetArmed”, {newArmedValue = “1”}, sensorNo)
end
end
checkmotion()