Archive for December, 2010

And at long last I have managed to do the first plots of the gas usage of one of our boilers (yes – we have 2 of them)


(Click for larger image)

I now have the first set of graphs for all our gas and electrics, plus all the temperature sensors around the house.

For all my home monitoring I use a lot of graphs – and even though it’s nerdy, I’d like the graphs to look nice. And they should not use Flash (as I want to use our iPads to display the graphs)

So I settled on highcharts – and wrote a few (well – a lot) lines of Ruby on Rails, and here is the first result


(Click for larger).

Highcharts is a javascript library that make incredibly flexible and good looking graphs in a very easy manner – and they are free for non-commercial use.

At long last I found the time to try to do a migration of a database I already use for a Ruby project into Rails (yes I am trying to move to Rails3 over Christmas) to allow me to do proper Ajax based Ui development quickly – in other words nice graphs.

And it is quite easy – turns out all you need to do is to redirect database.yml to point to your existing database – issue the command “rake db:schema”dump” (after having packed up schema.rb) and as if by magic a new schema.rb appears filled with the necessary information!)

I like this open-source public domain card :

yellowcardup.jpg This card was designed by Peter Miller as an alternative to the kicking-of-doors and yelling-and-screaming that usually goes on when someone in a car recklessly endangers the life of a cyclist because they were talking on their phone, putting on lipstick, passing another car in the bike lane, etc etc etc. It’s a more subtle statement, but I think more effective. Peter has provided a PDF of the card to allow others to print it out on a magnet of their choice and distribute them as needed. [Thanks to TOLA for noticing it.]

[From Magnetic Yellow Card – cyclist-intervention]

To use MySql with Ruby on Rails 3 there seems to be a few more steps to do than what is apparent from the books.

First of all I had to install MySQL using MacPorts to the client machine where rails was run – even though I was only trying to connect to a remote server running MySQL.

Then I had to generate the mysql gem with these flags :

sudo env ARCHFLAGS=“-arch x86_64” gem install mysql — –with-mysql-config=/opt/local/bin/mysql_config5″

from then on I could (after adding the gem to the gemfile in the root of the rails application.

I bought one of these :


It’s really 4 remote controlled relays able to switch 16 Amps mains if installed correctly.

The remote control is a FS20 4 channel switch. In other words with my current setup (FHEM home automation software) I can control these 4 relay individually, foe example to turn on and off the hot water and central heating valves in the house heating system.

And now that I can get replacement 24V motors for the valves (they are normally mains voltage motors) it’s even remotely (!) legal to do this.

You can see these in FHEM as :


and even better – I can now control FHEM from my Ruby house monitoring scripts (more about this later)

As part of our home automation we need to control the heat of the water in the water tank (hot water tank) – and I had to find out what recommended temperatures are.

And to my surprise I found quite a bit of information :

– The temperature should be above 50 degrees – to reduce the chance of legionnaires disease.

– The temperature should be below 60 degrees to reduce the chance of scalding, and the formation of limescale!

IMG_6838 IMG_6840 IMG_6842

(Click for larger images)


From manual readings :


Next step is now to work with the Jeenode based measurements on the pilot light from the gas boilers.