24 June, 2013

Home automation: Raspberry Pi + Tellstick Duo ++

There are many sites that has this project in many flavors... I will just add mine.

Brief summary: Tellstick Duo is connected to Rasberry Pi (running Raspbian).  I have SE K700i GSM phone connected to RPi as well. The main features are:
  • control several radio controlled switches (Anslut)
  • monitor temperature and humidity from my wireless weather station
  • monitor for "door open event" (NEXA LMST-606)
  • monitor for commands send by SMS (gammu) Update: replaced by Android SMS Gateway. Read more...
  • report on selected events by sending SMS to predefined phone number (gammu)
  • simple web interface to control some of the features (apache + php)
  • events are logged locally in to a file and to a remote server (own twitter like)
To install telldus-core follow this guide. One can compile the GUI for RPi or use it on another computer to set the codes. I wanted to be able to repeat the original codes from the remote controls. Advanced users can use code from the examples to "learn" the codes.

Essentially, I am running a monitoring program written in python (took one of the provided examples and changed it severely). It catches signals from the remote controls and could trigger an action. In other words, I can use the remote controls to send signals to RPi. The same program monitors the GSM. It could trigger an action upon CALL or SMS. The signal from the door is logged by default but could also send an SMS - poor man's home security alarm.

I particularly like the CALL feature since you do not need to answer the call, so no cost attached. The downside is that there is only one action hooked to this event. SMS is easier but will cost you (or not - depends on the plan you have). When SMS is received from another phone (not mine) the SMS is logged and forwarded to my phone.