Emergency porch light blinking system using Vera and Lua

Hey everyone, I just wanted to share a really cool project I’ve been working on with my Vera system. It’s all about using the porch light to help emergency services find my house faster in case of an emergency. I stumbled upon this idea while researching ways to improve home safety, and I’m really excited about how it turned out!

So, the basic idea is to make my porch light blink when I trigger a specific scene. This can be super helpful if I’m ever in an emergency situation at night. The responders can spot the blinking light much easier, which could save crucial time. I’ve set this up using Vera and some Lua scripting, and I’d love to walk through how I did it in case anyone else wants to try it out.

First, I created a scene in Vera that uses Lua code to control the porch light. The code makes the light blink by turning it on and off at a one-second interval. I also made sure there’s a way to stop the blinking once it’s started, which is important to avoid any unintended behavior. Here’s a quick snippet of the Lua code I used:

function DipOnPorchLight(stuff)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, { newTargetValue=“1” }, 19)
if (sBlink == “1”) then
luup.call_timer(“DipOffPorchLight”, 1, “1”, “”, “”)
end
end

function DipOffPorchLight(stuff)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, { newTargetValue=“0” }, 19)
if (sBlink == “1”) then
luup.call_timer(“DipOnPorchLight”, 1, “1”, “”, “”)
end
end

if (sBlink == “1”) then
sBlink = “0”
else
sBlink = “1”
luup.call_timer(“DipOffPorchLight”, 1, “1”, “”, “”)
end

I also programmed some of my scene controllers to trigger this emergency scene, so it’s really easy to activate when needed. One thing I learned is to avoid using CFL bulbs in the porch light fixture because they don’t handle the blinking well. LED bulbs work much better for this purpose.

I’ve been testing this setup for a few weeks now, and it’s been working perfectly. It gives me peace of mind knowing that if something ever happens, the emergency services can find my house quickly. I’d love to hear if anyone else has tried something similar or has any tips to improve this system even further!

Cheers,
[Your Name]