Accessing BT Home Hub 5 statistics with PHP + cURL

I’ve had the BT Home Hub 5 for a few months now, and it keeps restarting and generally acting like a cut-price pile o’ shite. So, in an effort to monitor its shitey-ness, I figured that my home server could extract the uptime and the¬†traffic usage every x minutes.

Bt Home Hub 5A
A BT Home Hub 5A in its natural environment, with what looks like pubic hair in the carpet

The HH5 is – on paper – a great little router especially as it has an Infinity modem built in meaning you can do away with the separate OpenReach white box. You can’t mount it on the wall which is annoying, and the feet are fairly useless at keeping it from toppling over, but it does output both 2.4 and 5Ghz wireless networks. One of its big downside, at least for myself, is the lack of any way of scripted monitoring (e.g. SNMP).

Continue reading Accessing BT Home Hub 5 statistics with PHP + cURL

Sofa LEDs

While on a 48 hour long drink/blackout, the idea was posed that the sofa should have under lighting. Seemed like a reasonable request. With the installation of a projector, the room had to be kept as dark as possible. A few dented shins and it was evident that some kind of low-level lighting was required. Jump to having 2 large pieces of MDF cut to 10mm narrower to the sofa outline and we’re half way to victory. Looking through Ebay it was easy to find LED strips that would be sufficient to wrap around the perimeter of the MDF; it was just a matter of controlling the colours.

sofa-under-lights

Continue reading Sofa LEDs

Capturing serial events

My home automation and monitoring system runs off two separate radio networks; RF12 and XRF. The RF12 network communicates with a JeeNode LED board, which also runs the light strip for the centre cabinet. The XRF network uses a USB stick made by the makers of the XRF radio.

syslog

Both of these devices create a serial port instance on the Ubuntu server, and pass through exactly what is sent or received – either PC to radio, or radio to PC. In order for my web apps to communicate with them, I had to find a way to constantly monitor what was received, and also a way to send commands out.

Continue reading Capturing serial events