All posts tagged OsX

I;ve had a few speed issues with my MacNook after I changed/upgraded the internal hard disk, but not done anything about it until now, as it was getting ridiculous.

Xbench to the rescue :


As you can see it’s appallingly slow …..(scores should ideally be around 100)

I use Prowl to send notifications from our home monitoring system to my iPhone and iPad etc.

But I have been using the gem “ruby-growl” to do this for quite a while.

Growl was just updated to version 1.3 – and this broke “ruby=-growl”.

But to help others with the same problem – drop in “growl_notify” – make a few simple changes, and all is good again.

The high level software in the house monitoring system works on a simple principle


(Click for a larger pic)

All the data collected from the various sensors is sent to a memcached instance running on one (or more) of the servers, and stored together with a timestamp.

A small library makes it easily accessible for all the other software in the system.

In a simple display it looks like this :


As I was feeling rather under the weather on Friday and Saturday I spent some quiet time rewriting parts of the home monitoring software, but before I write up something about the details I;d better describe some of the high level details


(Click for larger image)

On the right hand side are a large number of jeenodes and other nodes with a variety of sensors.

All the jeenodes send data wirelessly to 2 different collecting jeenodes in different parts of the house. This is because coverage can get spotty with just one receiver. As a matter of fact the design of the system means that the transmitters effectively multicast and the data can be picked up by as many receivers as you may want to have to provide cover. All these receiver run the standard jeelabs demo code – as it makes programming everything really easy.

There is also one extra node running separate software to receive data from a RFID transmitting jeenode with some homegrown software.

A last jeenode acts as a transmitter (again running the jeelabs standard demo software (!) to send data to a number of LCD screen equipped Jeenodes around the house, plus a number of jeenodes with attached relays for control of various devices.

All this is controlled by distributed software running on a couple of old Mac Minis – mainly homegrown software written in Ruby (and Ruby on Rails) to pull all the data together.

After upgrading one of our Mac’s to Lion Server I had a problem where the webserver refused to start up correctly – and as most server management uses the webserver it makes life a bit difficult.

But the solution was simple – the httpd.conf file was missing for some reason.

Fix : go to /etc/apache2 (“cd /etc/apache2 “)

copy “httpd.conf.default” to “httpd.conf”, and restart the webserver.

It turns out that it is ridiculously easy to send Growl notifications like these


from Ruby – all it takes is a few line of code using the ruby-growl gem.

And the kicker? It can automatically be forwarded to the iPhone or the iPad using a excellent little app called “Prowl” .


So now (as you can see above) any action on our RFI reader (soon to be RFID reader lock) will show up as alerts on the iPhone.

I had to set up a Belkin wireless router today – and when it came to encryption I started off using WPA – all ok on the PC’s I sued, but the Mac’s, iPhone’s and iPad’s in the house refused to authenticate.

In the end it turned out that I had to use the extremely long Hex password – and from then on everything worked.

A central service in our home automation system is provided by Memcache – a in-memory “database” that sits on one of our servers and is available to all the various components of the home monitoring/home automation system.

All measurement points and other information that should be available to other software is registered here – and it currently looks like this if I dump out the contents


every line is a key/value pair where the part before the “=” equals sign is the label, and everything after this is the value(s).

In some cases (where it is just a number) it refers back to the jeenode ID number, otherwise it is just a label to easier memorise things. For most measurements I have also added a timestamp to show last update of the values.

A lot of the data is also added to a MySQL database sitting on a different server for plotting graphs etc.

The labels with the word “roomstring” are all reported from a jeenode running a variation of the “ROOMS” sketch (and rooms plug board) on a jeenode, and can contain light levels, humidity levels and temperature measurements.

The labels prefixed by “fht” are reports from 2 FTH80B electronic thermostats connected to a FHEM home automation system.

The labels prefixed “outside” and “library” are reported from a WS2350 weather station connected to LWC – (Lightsoft Weather Center) software running on a Mac Mini.

The labels prefixed “garage” are reported from a Ethernet attached Arduino in the garage with a variety of sensors close to the electronic catflap.

The monitoring of the new radiator heating controls is starting to work out ok


neat – I have just ordered more.

To help with the aim of controlling (and possibly reducing) the amount of energy we are using we have had electronic (and remote controlled) radiator valves for a while – the Hometronic system.

They work – but the control protocol is proprietary and I can not control them (or report from them) to any of our other home systems.

So I went out and bought a set of new electronic actuators from Conrad – with a electronic thermostat (FHT80) which supports a well documented protocol.

The actuators are attached to the radiator by replacing the old-fashioned mechanical thermostat, so no wires as they are battery powered. The little display is used for setup, and form then on shows the percentage open the valve is.


These (lots of them) can be controlled by one or more thermostats – like the FHT80 (important)


which send valve opening commands to the actuators, and also asks the actuators how open they are at any one time.

And now the fun part – by using a small device


– a USB plugin transmitter/receiver we can communicate with the thermostats – and in the long run directly with the valves.

More about this later.