Connecting things up

A long term projects has been to build some smaller temperature sensors that can be dotted around the house. These would store data back centrally but mainly be used to feed additional room data into the Idratek Cortex system that controls the house heating.

This has ended up being a project made up of part development and part integration but as of today I've got the initial integration of the various components working - albeit to a limited extent.

It all starts with a little Nanode board. Wedged above it is a small digital temperature sensor.

The green cable is to the network. Every few seconds the Nanode makes a pretty rudimentary web call to a predefined web address (which happens to be a VM on my server, but where & what isn't that important). The call includes an identity of the Nanode (there will be several eventually) and a set of temperature readings from each of the (currently one) sensors.

The server (running some basic php) stores the data into a database.

To help me test the interaction this far, the server also hosts a very basic web page that lists the last few readings received, displays a big red "Temperature now" reading and has a graph of the last 100 readings. As I'm lazy, it auto refreshes and the same frequency as the Nanode transmits. Here's an image of it on the iPad:

Display on iPadDisplay on iPad

The next step is to get this temperature data pushed into Cortex and recognised there as data for one of the objects defined in Cortex. To make this leap, I'm using the xAP automation protocol which is support by Cortex for both inbound & outbound transfer.

Another module of rudimentary code is on the same server that receives/stores the data. This takes the last two readings and if they differ (the assumption here is a temperature change) then the code builds an xAP packet and squirts it at the Cortex server. xAP is apparently normally a broadcast protocol but as the two servers involved here are on different networks the xAP packet is sent unicast so it'll get routed to the destination (in reality the 2 VMs are both on the same physical server but are on different networks for reason that once made more sense than now). For speed and convenience this module is currently triggered by the refresh of the web page so wont actually work unless that page is being viewed somewhere, but now it's working I'll move the trigger to a cron or something similar.

Finally, Cortex receives the packet, pulls the data out and applies it to the DTS Temperature Sensor module defined in the guest bedroom.

Intel Wireless broken on Ubuntu 9.04

2009-12-21: Update - Working just fine with Ubuntu 9.10 !!

After using the Auto Update on Ubuntu 9.04 recently, the Intel wireless in my laptop stopped working. More exactly, it would associate to the same-old AP configured in the Network Connections applet, but after 20-30 seconds trying to authenticate it would fail.

The output of sudo dmesg would be along these lines:

[ 1494.509061] wlan0: authenticate with AP 00:1d:68:0a:fb:11
[ 1494.511257] wlan0: authenticated
[ 1494.511264] wlan0: associate with AP 00:1d:68:0a:fb:11

Linux test page

linux test pge

New HA & Home Server

At the heart of the Idratek setup is ideally a PC running the intelligent 'management' software Cortex. Of course, this means having a PC running 24/7 - potentially costing more in electricity to run than the smart management of the heating will save in fuel. Cortex requires Windows as the base operating system, so a Windows PC is required. I already have a home-server, running Linux, to do a number of 'server' type things (file, print, email etc). The linux box is already a moderately low-power device, pulling around 20w but it's age is starting to show: it's a bit slow, still running Fedora Core 3 (remember 'Core' ?) and the harddisk is almost full.

Baulking at the idea of having 2 hungry servers running 24/7, I decided to try to combine both servers into 1 machine, so I got an updated version of the low power machine and have set about trying to get this combination working.

Things to sort out in 2008...

In no particular order, a list of things I want to sort out during 2008...

  1. Last few CDs not yet ripped.  I've been routinely archiving my CDs since the late 90's.  I've never lost the archive (touch wood) and always used MP3 and the higher quality sample rates, so most of the earliest MP3 files are still on the server.  Over the years, I've archived almost all of my CDs (currently 3200 tracks) but I know that a few have slipped through the net.  I've despirately avoided being anal enough to pull every CD off the shelf and check it's on the server, but the absence of the missing few on my iPod is starging to annoy me, so it's time to do it.  It's especially 'needed' now that the archive feeds not only 2 iPods and the desktop PC but also the new Roku/Pinnacle Soundbridge.  This is linked with my next "must do":