Continuing with pi’s
So, I was waiting on the arrival of two Raspberry Pi’s. One for XBMC and one for my Home Automation efforts. By now there was a better guide for installing Domotiga on Raspberry so I used that to get started on the new system. It wasn’t as easy as I had hoped for with Gambas not wanting to play ball on the ‘make install’ stage. After a week of tinkering I got Gambas to build and installed Domotiga again. Then I found out Domotiga wasn’t entirely made with server/client operation in mind so it took me a while to get it to run as a daemon and getting another install’s GUI to connect. Still, I got it running. This time with a fix for the initialization issue. Hooray?!
Bye Domotiga, Hello heimcontrol.js
You’re not a programmer, harry?
I’ll be honest, I’m by no means a ‘good’ programmer, maybe not even a decent one. But when you give me code I can understand it, most of the times I can make something else with it. I’ve never started coding anything from scratch and this was no exception. I found a plug-in for node.js that let’s you read and write to serial ports and used the other parts already included in heimcontrol’s arduino commands to make 2 functions that read and write to the gateway. It worked!
Heimcontrol.js the epilogue
With the thermostat now controllable by smartphone it was time to move on to the next part in my setup, lighting. I had previously bought a set of ‘Klik aan/Klik uit’ 433.92MHz switches, time to hook those up to a free-standing light and off to the races! On wait! I need something to talk to those switches from heimcontrol.js. Queue the purchase of a RFXCOM rfxtrx 433.92MHz gateway, it had a library for node.js ready and waiting to be included in yet another heimcontrol.js plug-in. Well… to save time writing to much about stuff that is long gone from my memory (this article took far to long to publish) it didn’t work out. I mean, I succeeded in getting it all the work short term, but when the rfxtrx picked up anything wrong or unknown, either from RF interference or the neighbors 433.92MHz weather station, it crashed, probably due to half read device ID’s or something but I wasn’t going to stick around to find out.
You can read why in the next part.
Resources for this article:
Domotiga available @ https://www.domotiga.nl/projects/domotiga/wiki/Home
Heimcontrol.js available @ https://ni-c.github.io/heimcontrol.js/
RFXCOM node.js plug-in @ https://github.com/rfxcom/node-rfxcom
OpenTherm Gateway @ http://otgw.tclcode.com/