opengraphlogo So, I needed a simple open graph library for a project. There are other libraries, but I just needed something simple and quick, so I bashed this library together.

The library contains a class with a single static function, you pass it some page contents, and it’ll spit back a key => value array containing any open graph entries in the page.

This was handy for me, it might be for you 🙂

» Visit the project on Github…

Current-CostThe current cost meter is an electricity monitoring device which attaches to your house’s electricity meter. It gives you a read out of how much electricity you are using at any given time, and how much that electricity is costing you.

One of the cool things about the Current Cost meter, verses other meters which are out there, is that it includes a data cable. This cable attaches the meter to your computer, and you are able then to extract usage data, very simply, over a serial connection.

So, riffing off the weather display tool I wrote a few weeks ago, here is a quick tool for extracting electricity usage data from your Current Cost meter, and outputting it in a customisable format. The tool is tested on Linux against a Current Cost EnviR, but it may well work with other meters in the range.

Since the first step towards any form of optimisation is to collect data, my plan is to use this tool to graph my electricity usage over time, and hopefully reduce my running costs a bit. Anyway, code up on GitHub as usual!

» Visit the project on Github…

As I am sure most of you are aware by now, I’m a keen pilot, and as I’m sure most of you can work out, knowing what the weather is doing is kinda critical.

My club operates a weather station, and during the tower’s operating hours, the data is uploaded to the internet. I thought it’d be pretty cool if I could pull this data in a machine readable form in order to be able to some coding using the sensor data.

After some research, I discovered that the weather station software outputs the raw data in a text file, which, with a little bit of coding, you can parse and extract useful data. I dug up the specification for the file from some old documentation I found on the web (to save you searching, I’ve stuck the file format spec up on gist for convenience), and using this I was able to write a little tool to parse the file and output values requested in a highly customisable way.

Usage

Pass the code the URL of your clientsraw.txt and optionally specify a format string (it will default to outputting some basic useful weather information).

python wd-parse.py -u http://example.com/path/to/clientraw.txt [-o "formatted list of output"]

I find this useful, not least because it provides me with a quick way of telling if it’s a flyable day before getting into the car. But of course the real power of this tool is being able to hook it into other things, for example, you could graph weather over time using a tool like munin, output a METAR, or even cross reference the wind direction and runway orientation and calculate crosswind components.

All of these I plan to do if I get the time!

» Visit the project on Github…