From Z-Wave to my phone!

Now that I know a bit better how to use the ZWay library, and that I refreshed a bit my C/C++ knowledge, I can finally complete the first use-case of my home security system: getting notified of an event on my phone (my good "old" HTC Legend running Android 2.2).

For a long time I have been wondering and hesitating about the "server" part of my system.
The Raspberry Pi could of course play this role, but it would not be "safe" since cutting the home power or un-plugging it would void the "security system". Yes of course I could put the Raspberry Pi on battery, hide it somewhere in the house and use WiFi to connect to others networks in case my home Internet connection would drop, but then again, cutting the power of the whole neighborhood would still kill my system.
So it had to be something external. Looking at prices for getting my own Linux private server, that would be something like 5-15 Euros a month. That sounds rather stupid since for that price I could almost get a professional security system.

Finally, I ended up trying Google App Engine...
And a few hours later, I have my little Java web application, for free, receiving events from my home and sending me XMPP messages when something happens: G-R-E-A-T! That's a start.

As a a summary, here is the complete "chain" of events:

  1. A Z-Wave sensor triggers an event.
  2. The Z-Wave controller ("Razberry") installed on my Raspberry Pi receives the event.
  3. The Z-Way software stack gets notified of the event.
  4. My little "proxy" C/C++ application forwards the event using HTTP (***).
  5. My little server java application running in the cloud receives the HTTP event and converts it into a XMPP message sent to my Google account.
  6. My Android phone gets the XMPP message.
(***) Using the great libcurl C library.

Simple isn't it?

Comments

Popular posts from this blog

ZWay: getting the device list.

First steps with the ZWay library

Libcurl: perform a REST HTTP PUT