Tuesday 30 September 2008

A quiet September

Whilst not so much has happened in recent weeks, gentle prompting has again persuaded me that I should provide some sort of update for a few distant friends. (For the record, I don't very often give in to nagging!)

Last month's torn calf muscle took a fair while to heal and only in the last few days have I really been properly back to normal. Just of good measure, at the start of the month I snapped the nail on my little toe against a wheely bin, not something I would recommend. And to top it all, I managed to sting both my ankles silly with poison ivy with the itching taking a good week to subside. Had the Piriton not been so effective, I think I may have considered amputation.

Belle has continued to grow in size and character. She's now had three "holidays" at two different kennels and doesn't seem to mind one bit. She's very keen to show off her full set of adult teeth and (thankfully) she's now got some idea of how hard she can bite without being immediately banished to the garden. Unfortunately for the rest of the nearby canine community, she's yet to understand what "I don't want to play" means.

The boy's school routine is now properly re-established, as are the daily activities such as swimming and piano lessons. He's started walking to and from school with a couple of his friends, something his Mum and Dad will appreciate when the cold weather arrives.

I've gone back to school myself this term having signed up for some further education in the form of twenty evenings of City & Guilds Introductory Welding. Rather unsurprisingly this has turned out to be fairly hot and hard work, although just as much fun as I expected. If only I had something at home that I could practice on - perhaps an old Land Rover or the like... ;-)

For the last weekend we went away with two other families to Sherwood Castle, only about 45 minutes from home now that the A1 is roundabout-free in these parts. The weather and accommodation was great, the kids pretty much entertained themselves, the company was top notch and I didn't get into too much trouble for watching the Singapore F1 qualifying on Saturday and the full race on Sunday.

As the evenings have started to draw in, we've been busy booking holidays for next year, one warm and one cold for starters. We'll be taking a trip to London in the not too distant future as well. I'm not sure Belle's so excited at the prospect.

Wednesday 17 September 2008

Cheap remote power control via SMS

Following on from the spasmodic power interruptions of this summer I've been investigating how to improve the survivability of my IT infrastructure. Now, in the event of any electrical trouble, my infrastructure powers itself off in an intelligent and orderly fashion, save for a minimal core of low-power equipment that tries to stay alive until the very, very last gasp of battery power. A couple of APC switched PDU devices allow me to control sixteen individual sockets remotely so even my most archaic machines can be effectively managed. Having already beefed up my lead/acid capacity and remote control capability I decided to look again at notification.

Whilst I have most things configured to cry for help via email, this relies on someone actually monitoring for such messages if any useful remedial action is going to be taken. I used to use a free email-to-SMS gateway but this type of service seems to have dried up, in the UK at least. It occurred to me that perhaps I could attach a pay-as-you-go GSM phone to my always-on Asterisk server and then send SMSes using shell scripts. A brief Google turned up the gnokii toolset.

I've got a number of old Nokia phones lying around, most with an accompanying data cable, but all of these require a separate charger. Ideally I wanted something that would get it's juice from USB power provided by the data cable itself. An old Samsung clamshell did just this and "gnokii --identify" configured for USB and the AT command set confirmed that the phone was recognised.

Sending SMSes proved to be very trivial indeed and I now have any critical power events from my UPSes forwarded on to my mobile. I've tagged the remaining PAYG balance onto the end of each message so I am reminded of when I need to (remotely) top-up.

Once this was up and working, it was obvious that I could parse messages coming in the other direction. Configuring gnokii's smsd and some more very easy scripting now allows me to control most of my infrastructure from my mobile. I've restricted access so that only a whitelist of CIDs are permitted to use the (of course unpublished) service and have made the command syntax pretty much unguessable with no feedback to failed commands. This leaves me vulnerable to the very few suitably skilled and authorised bods working for mobile phone companies who could eavesdrop and then spoof instructions, so I'll hook the scripts up to my two factor authentication box when I get the chance. Functionality wins over security once again. :-)