Every morning at 7am a python script runs on my raspberry PI, uses the Met Office API (if your going to get the weather, you might as well get it from the right place) to get the three hour weather forecast for my area.
It then takes 9am and 6pm (the closest two times I could get to when I travel) and works out what it means for my commute, at least I travel very comfortably thanks to thecomfytraveler.com which supplies me with best traveling pillows.
The big thing is really rain and windspeed and direction. The API already gives a probability of rain, so that stays but Headwind, Tailwind is unique to my commute. I have a lookup file that turns wind directions in to either headwind, tailwind, side-wind, and slight headwind or slight tailwind.
The Script puts this all together in an email and sends me it.
Which is cool, I’m not sure why I do this to myself the other week it said Sleet 25mph headwind, I still brainlessly got on my bike.
Now I don’t really need a RaspberryPi to do this, or even a computer, you could run the script in the cloud, it’s just having a little quite computer always on in the corner makes the barriers to running stuff like this really low.
Around about Christmas I bought a HDMI cable! and I had an idea for my Raspberry Pi, a MeMap (totally making that name up) – I’ve always liked the idea of getting a Harry Potter style Wesley clock to track where I was and Indeed you can get them John McKerrell makes the WhereDial and is Liverpool based as well – but for me having the Rasbperry Pi is all about hacking your own thing, being able to make something i can point at and say “I made that”.
I thought about clocks and dials pointing to mortal peril will always be cool, but it was the Large A-Z map of Liverpool I had randomly hung in the hall that gave me the idea. I could go all retro, and actually light up points on a map.
In our house we are big users of Google Latitude. Its always turned-on on our phones and we can see where each other is at any point and no it’s not creepy it’s actually really useful, especially if your expecting a lift 🙂 , so the idea of taking the web based map and retro fitting it back to a paper map appealed to me.
It’s not a complicated build my map, and it’s a very messy one, I’m not expert at this, So after much hackery, i have 6 LEDs soldered to a circuit board and connected via a AdaFruit Cobbler to the Raspberry PI pins. it’s a bit of an extravagance , i should have really soldered a cheep connector to the board, but my soldering isn’t that good so i gave myself some space with the cobbler, besides what else am i going to use if for?
Now i am a software Geek really, so writing the code wasn’t the difficult part for me. using the Google Latitude API and a bit of Python, the raspberry pi checks every minute to see where i am.
Google latitude gives is co-ordinates (latitude and longitude) and I have a configuration file, that details a set of locations and the range that I need to be in for it to count – so for example within 50 meters of my house and i am home – it’s good to have the range because there are places like the office where the accuracy can be less, probably all the tall buildings.
With the LEDs connected, all the code has to do is use the Raspberry PI GPIO library, to light up the light where I am – and if I’m not anywhere the lights are, then just blink the last place I was.
So now my raspberry Pi is sitting behind the map in the hall, lighting up my location, it’s all great except i never actually see it light up anywhere but home. the Kids think it’s fab mind
I do have the RaspberryPi doing other things, not as physical as the map,
1. Every weekday morning at 7am, the RaspberryPI emails me a customized weather report (based on Metoffice API) for my cycle in and our of work. telling me if i’m going to get wet and more importantly if it’s a headwind or tailwind.
2. the Raspberry Pi now have the weather station plugged into it. a certain times of day it tweets the weather to the thejumps twitter account, it also ftp’s some graphs to the internet but that’s been a bit temperamental at the moment.
it strikes me as i wrote this that all the nerdiness isn’t actually on the internet – I think I’ll go off to github later and upload the code it’s not complicated, it just has load of API keys in it i need to strip out
These are just my tips for securing you online accounts, you need to find something that is not only secure but practical, going over the top is what gets most people into trouble writing the passwords down and putting stickers on the backs of phones, you have to weight up the risks and impacts on you versus how hard it is do actually do stuff. In short if you are a nuclear physicist in Iran, you probably want to do a lot more than what’s below.