TellstickController modified for Google Calendar
Quite some time ago, I bought the tellstick to automate the lights at home. I was fed up with walking around the house every night to turn the lamps off in the various rooms and windows. At the same time I also bought some Nexa remote power controllers to have it all work together from start.
Now, I had to choose the software to use for the setup. As I already had a Linux server running 24/7 one of the requirements was that it should run on that platform. And preferably controllable by something else than just a graphical interface. If I also could control everything from my smartphone it would be great.
So, something controlled from the command line that could be scripted to work with the web too, and I would be set. After testing a few different solutions I found that TellstickController would work best. And in top of that put the mobile adopted interface Tellit (The developers URL no longer work) to control things manually (when needed) from my Android phone webbrowser.
After a while, although very used to it, I found scheduling the lights and outlets through the configuration file on the server was not the best solution. Doing that from the phone worked, but far from good. And I did not want to add scheduling to the web interface. As we use Google calendar to plan the life of our family, I thought it would be nice if we could control the lights with it too. So. I started to look at the gcal API and modify the TellstickController code.
Pretty soon I had a solution. I can now add my lights as ”meetings” in my dedicated Tellstick calendar. If I want to use random timings, sunrise, sunset or offsets I can do that with some simple text entries for the ”meeting”. And i can do it from any computer, or even the native Google calendar application on my phone!
Next step is to add some code to allow controlling outlets depending on the temperature outside. Or in any location my server is already measuring the temperature in and around our house with 1-wire sensors. For example, turn the car engine heater on one hour earlier if it is colder than usual one day. Or not at all even if It is scheduled, if it is too warm. Or powering up the heating cable on the water pipes in the garage when the temperature reaches freezing. Or… whatever you can think of 😉
And here is the modified tellstickController perl script and an example config with instructions on how to find the private gcal XML URL you need to set.