HomeHub: History part 2

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

While domotiga and the gateway where both working at this point in time, I started to dislike the ‘hoops’ I had to jump through the change the temperature. I needed to start a VM, launch the front-end and connect¬† it to the pi, change the setpoint and logout. Domotiga did not have a good web-interface (maybe it does now) and since I don’t know how to code in gambas I kinda decided I wanted something else. The search began for replacement software that I could customize just a bit more. You might have gathered from this paragraphs heading the replacement I found was heimcontrol.js. Now… if by change you already know heimcontrol.js you might just be saying: Heimcontrol.js cannot control a opentherm gateway, and if you said that, you would be right. But with heimcontrol being a node.js app and node.js being JavaScript, a language I’m much more familiar with than gambas, I wrote a little plug-in the control the gateway myself.

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/

 

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.