Perl powered home automation

September 5th, 2012 robin Posted in Home, Ironman, Perl Comments Off on Perl powered home automation

I recently got my first raspberry pi, and have been hacking… 🙂

If you haven’t heard of “The Pi”, it’s a credit card sized computer with a 700MHz ARM processor, 256MB RAM, USB, HDMI, Network, … and a load of GPIO output pins.  Happily, someone has already written a perl interface to the GPIO pins, and so now for the first time I can quickly and easily do hardware hacking with perl.

There are already a few operating systems ported to the Pi, but the most popular is Raspbian – a Debian variant customised for the Pi.  With a bit of hardware hacking (optocouplers to isolate a 12V circuit from the 3.3V one, and a 3V to 12V voltage converter), I was able to make an interface between the Pi, and a household plug socket remote control (about 9.90EUR at most hardware stores).

Here’s the result:

The effects of cycling 10000km

January 31st, 2012 robin Posted in Home, Travel 7 Comments »

This post should have come out in September 2011 because that’s when the odometer on my bike wrapped from 9999km to 0km.

The stats

  • New price: 450€ (city bike, aluminium frame, solid carrier, hub dynamo, …)
  • At the 10000km my bike was about 4 years old (but one year in storage)
  • I cycled an average of 3300km per year that I used it
  • Never cycled outside of Munich city
  • No recreational cycling – all commuting
  • Average speed with winter tyres: 15km/h
  • Average speed with summer tyres: 18km/h

How much wear and tear on the bike?

  • Replaced break blocks 3 times
  • Replaced 3 tyres
  • Replaced 2 tubes
  • Replaced break and gear cables
  • One broken crank shaft bearing
  • One new saddle
  • Replaced rear sprocket
  • Replaced crank set and pedals
  • Purchased studded winter tyres
  • Replaced front halogen lamp with powerful LED lamp
  • Lots of oil…
Total cost of maintenance over 3 years: ~250€

Total cost of ownership

Assuming a linear depreciation to 100€ over 5 years, the cost of the bicycle, plus maintenance (my work time not included): 127€/year

Given that at least 2/3 of the distance travelled was work related I can write off 5ct/km (flat-rate in German taxes): 110€ per year, so it only costs me ~17€ per year to cycle.

Had I driven that distance by car (assuming a car which I would own: a 7 year old compact) it would have cost me about 200€ taxes, 500€ insurance, 400€ maintenance, and 700€ depreciation, plus 188€ for petrol: 2000€, minus the tax deduction of 660€ leaves 1340€ for a small car.  Granted I wouldn’t have only driven the car in the city, so it’s not exactly comparable…

Had I got a year round ticked for the local municipal transport system (MVV), it would have cost me 438€ for public transport. This could be written off 100% by using the flat rate.

Other effects

  • Depending on the distance between home and work over the years, I had anything up to 1.5 hours of fresh air and light exercise per day.  At my last general medical check-up the doctor did a stress ECG on me and found all parameters well above “healthy”.  I’m sure that has something to do with cycling.
  • I haven’t had a single sick day in the last 10 years of work.  That’s not to say I was never sick, but nothing bad enough to keep me home.  Maybe not sitting in public transport (confined metal tubes full of coughing and sneezing people) helped too…
  • I hate sitting in traffic… I hardly ever sit in traffic… 🙂
  • Taking into account the time for walking to a car, driving through traffic, finding a parking spot, and walking from there to the destination, I’m always faster by bike than you will be by car in the city.
  • I’m always faster than public transport over short distances, and in the spring/summer/autumn faster over all distances (without breaking a sweat!).

Enough already?

Get on your bike! 🙂

Home Kanban board

January 29th, 2012 robin Posted in Home, Project Management Comments Off on Home Kanban board

I hate having to remember stuff… so I applied some tried and tested work practices and made a home kanban board.


The example above has 4 tasks

  • Feed the dog
  • Feed the fish
  • Get bread and milk
  • Water the plants

Daily tasks are blue/red

Weekly tasks are yellow/green.

Every day we can slide the marker below along one field (there’s two weeks shown, because 7 days aren’t evenly divisible by 2, but 14 are… :)).

At the end of the day, all the pegs should have the colour of the day showing.

In the example above, today is Monday, and it’s a blue day, and a green week.  Whoever fed the dog and the fish already turned the cloths pegs around to show the blue side.  Milk and bread hasn’t been bought yet (so the peg is still showing red from the day before), and the plants haven’t been watered yet this week.

Construction is pretty straight forward.  For the pegs, get cheap plastic cloths pegs in four colours.  Take them apart and reassemble them so that each peg has two colours:

The board is just a piece of 3mm MDF (cardboard will do too) with a spacer on the back to give it some distance to the wall.  On the bottom area, make 14×2 rows, and colour them in with the four colours of the cloths pegs you have.  The only complicated bit is making the slider.  I used a piece of over exposed film for a nice frame, and a strip of transparent folder as the strip for it to run on.  If you use something smooth for your board, you can probably get away with whiteboard markers, or just cut a piece of paper to size and write/draw your tasks on it – the handy thing about the pegs: you’ll only be turning one at a time, and the rest will hold the paper for you!

The advantages of having a board like this in your household:

  • Everyone automatically knows what has been done, and what has to be done without asking each other
  • Nothing gets done twice (feeding animals too much can be bad for them)
  • Your mind is free to think about more productive things than “what did I still have to do today?”

Say begone to confusion and forgetfulness in your household and go Kanban today! 🙂