Several years ago I managed to get my Vera to call me when my smoke and carbon monoxide filter went into alarm mode. That was pretty kludgy and required a PC running Asterisk - a daunting task in and of itself.
I moved to a different state and decided to tackle the problem again, and have it working, but this time using a Raspberry Pi 2 ($35!) instead of a PC. The technology has come a long way. You can trigger a voice call from any scene using LUA. The LUPP code is probably the most complicated part.
Here’s how it works:
I use the BRK-RM4 relay (works with First Alert brand smoke detectors)
Connect the relay to a door sensor (I happened to use a Schlage, but any should work including the monoprice ones)
- When the smoke detector alarms it closes the relay which in turn makes the door sensor see a “door open” event.
- When the alarm ends, the relay opens giving a door closed event.
On the RPi2 I installed asterisk from raspberry-asterisk.org.
I added a trunk to my existing voip provider though google voice would work just as well.
I added a custom context and a few extensions to handle calls for alarming and “return to normal”.
Added a custom CGI for the Vera interaction
Added a custom AGI for actually making the calls.
On vera I created a scene that was triggered when the Smoke detector “door” was closed.
In the LUA code, I collect a few pieces of information including the current temperature from the up and downstairs thermostats.
I create a URL that contains all the information that I want to pass to voip caller (including the temperature) and fire it off with luup.inet.wget( link)
Here’s what happens:
Alarm goes off - relay closes
Door sensor sends an alert to VERA for the smoke alarm door opening.
The Vera Scene collects the data from various sensors, and fires off the link to my custom CGI.
The custom CGI (in apache) collects the data from Vera and creates a “dialout” file which is tossed over to the Asterisk VOIP system, in includes all the variables passed from Vera.
The call file creates a call - connects it to my custom context and the other end to a phone number supplied by vera (in the LUUP code).
The voip system does some text to speech (using google’s text to speech engine - the same one you hear on google maps) and calls and delivers the message. It’s smart enough to look for an answering machine so it will deliver the message properly.
If you’re interested in more details I’d be happy to help, or provide a more thorough write-up. (The intro on the messages is from Peter Griffin from Family guy. )
The attached files let you hear the message that was sent.
My original post: http://forum.micasaverde.com/index.php/topic,15334.msg116522.html#msg116522