After reading an article over on AutomatedHome the other day, I decided to go ahead and order a Current Cost (CC) system for monitoring our own home electricity usage.
I ordered via their eBay shop, and the package arrived the next morning! Installation was a breeze: just pair the display unit with the sensor (for the wireless communication), attach the sensor ring around one of the main cables feeding electricity into your house, and away it goes! Once the basics were up and running it was time for the fun part: connecting it to a PC! This feature was the main reason I went with CC over the other units. The connection is made using a standard RJ-45 cable via a port on the display unit. Using a serial-to-USB cable I’ve connected it to my Linksys NSLU. Like most people, when I first got the NSLU (AKA the slug) I flashed it and installed an alternative Linux OS (SlugOS/BE). This allows you to then use the slug for just about anything you want from a networked PC. In my case I installed TwonkyMedia to turn it into a nice little UPnP AV server, storing files and serving photos and music to a digital photo frame and the PS3. But I digress. So with the CC connected to one of the slug’s USB ports I just had to write a little python script to parse the data, which the CC spits out in XML format every few seconds. Rich Cumbers has been kind enough to document a description of the XML format, which made it easy to identify the bits I needed.
Now on to the data consumption! When I started looking into the whole CurrentCost thing I stumbled across a new site called Pachube, “a service that enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world.” There are already quite a few interesting feeds set up on the site, such as the UK’s electricity usage, an automatic weather station in the Ross sea, and a musical swing in a Swedish park, as well as several current cost feeds, as well as my own. The service also allows you to generate a dynamic image for various feeds, so here’s mine:

Now to start adding more sensors to the house. I’m sure Hanne will be pleased!
Tags: current cost, electricity, energy usage, linksys, nslu, pachube, python, slug
From the BBC: Wikipedia child image censored
A decision by a number of UK internet providers to block a Wikipedia page showing an image of a naked girl has angered users of the popular site.
The wikipedia page in question, regarding the Scorpions album “Virgin Killer,” appears to be blocked by my ISP (Virgin Media)… all I get is a blank page, however I can access the page from work (can’t remember which ISP we use). But in the words of Kim Jong Il: Congwatulations… you have stopped nothing!
Update (10/12/2008): The IWF have now removed the wikipedia page from their list. Hooray for the Streisand effect!
Tags: censorship, IWF, scorpions, wikipedia
A friend from work who has a bit of a knack for the mathematics of gambling has been playing with the Betfair API and developed a bookmaker bot to automagically take and place bets. The way it works is no different to someone logging on to betfair and taking a bet for some competitor to win / lose an event, but because he’s automated the process it’s able to process LOTS of transactions (I’m not going to give away any numbers) across multiple events. I don’t know / understand the exact details of how it works, but it seems to be doing quite well for him!
So hearing about what he’s done has inspired me to create a bot of my own. I’m steering clear of Betfair as knowing my luck all my spare money would disappear within a month, so instead I’m gonna have a go at creating a WAR BOT! Or, more specifically, a WEEWAR bot! Hmm… weewar used to have a wikipedia page, however it looks like it’s been deleted (”reason was ‘Non-notable game, no citations from multiple reliable, third-party published sources.”…. pah!). Basically, weewar is a turn-based strategy game based on maps composed of hexagons representing different terrain types. Once a player controls a base he is able to produce more units (troopers, tanks, ships, aircraft), which can be used to capture / destroy enemy units. The game is won once a single player has eliminated all enemy units. So far this sounds fairly ordinary, and it will continue to do so… unless you’re the kind of person that has an interest in WEB SERVICES, because weewar has it’s own “RESTFul” API (ok, technically it might not be RESTful in the strictest sense, but it’s the buzzword of the year so I’ll go with it)!
And so the idea for gazbot was born! So far all I’ve really done is create a crude implementation of Dijkstra’s algorithm in order for units to follow the shortest path to any given coordinate. Next I’ll need to create some form of strategy for choosing which coordinate to head for, and some way of determining how to behave according to the situation. No, this isn’t going to be easy, and yes, it will probably be next to useless against any half-decent human player, but it should still be a fun experiment and hopefully it’ll beat a couple of the other weewar bots already out there!
Tags: api, betfair, bot, programming, restful, web service, weewar
The longer I leave this blog un-updated the less inclined I am to write a new entry, probably because quite a lot has happened since the last real update (before I tried that del.icio.us idea which didn’t work quite as well as I’d hoped…). But a recent post on codinghorror.com has given me the incentive to start again, in the hope that by improving my writing style I might also improve my coding. Now I just need to pick up a copy of The Elements of Style.
So I’m not going to fill in the gaps too much right now. Just stay tuned, and it will all make sense sooner or later. Change is coming!
Tags: writing
Here’s what I’ve been reading between May 2nd and May 8th:
Tags: awesome, camera, canon, comparison, css, dvcs, git, hacks, jspwiki, mercurial, schema, scm, security, simpsons, vcs, webdev, wiki, xml, xsl, xslt
Here’s what I’ve been reading between April 29th and May 1st:
Tags: botnet, businessmodels, domains, ecommerce, football, kraken, live, local, sports, streaming, tv, urls, video, web, worm
Here’s what I’ve been reading between April 27th and April 29th:
Tags: appengine, authentication, brightkite, bush, database, development, elections, funny, google, howto, humourous, iis, mariahcarey, microsoft, music, programming, python, rails, restful, ruby, security, sql, sqlinjection, support, tutori, tutorial, tutorials, usa
Here’s what I’ve been reading between April 24th and April 26th:
Tags: 5aside, audio, bbc, birmingham, crowdstatus, digitaldivide, effects, football, humourous, interesting, linux, penguins, tips, ubuntu
Here’s what I’ve been reading between April 22nd and April 24th:
Tags: ajax, bionics, broadcasting, development, fuidhand, internet, iphone, javascript, linux, media, mythtv, p2p, programming, prosthetics, robotics, streaming, terminator, tv, ubuntu, vbscript, video, web, webdev