Hack my ride

Just before Christmas, I had the pleasure of collecting my new car – a Tesla Model S! This is something I’d been lusting after for months since it was announced, and finally pulled the trigger on an order back in September. I can honestly say that I have never waited so impatiently for something in my life, and was absolutely delighted to finally take ownership on Christmas Eve – a rather extravagant early Christmas present! The driving experience is absolutely sublime, the ability to effortlessly transition from cruising, to having your insides re-arranged by the breathtaking acceleration, is something that has to be experienced to be believed!

Sadly my first week of ownership didn’t go as smoothly as hoped – I drove the car up to Manchester on Boxing Day to visit my parents, where I discovered that the supplied charging cable wasn’t functioning properly, something that’s fairly critical for a fully electric car! Due to holiday opening times I wasn’t able to get this replaced as quickly as I would have liked, but to their credit Tesla did replace the cable without hassle when I was actually able to make it to a dealership. Still, this left a slightly sour taste about the whole experience, and curbed my enthusiasm somewhat – until this week, when I’ve had time to enjoy the car some more!

Putting a few more miles on the clock quickly reminded me of why I’d bought the car in the first place, and then I started to delve into the possibilities of the API that’s unofficially offered by Tesla (their Android & iOS apps use it). There are a variety of services that take this data and will turn it into nice graphs and stats for you, however I was more interested in how I could integrate this into my blossoming “smart home” setup. My first venture has been creating a script that scrapes Google Calendar for events, and then will set the auto-conditioning on the Tesla at a set time before each event, meaning that the car is toasty warm/nicely chilled when you set off for work! I’ve put the source code on GitHub for the world to laugh at and hopefully improve!

This is definitely only scratching the surface of what’s possible with the Model S – I’m thinking of future scripts including:

  • Turning on home heating when leaving work
  • Estimating driving distance based on the days events, and setting the charge limit accordingly
  • Monitor power draw while plugged in, for cost estimation

What other car manufacturer gives you access to so much data to nerd out over?! I’m enjoying this car without even having to sit in the drivers seat!

Blinkytape

Yet another one of my Kickstarter jaunts turned up just before Christmas – the Blinkytape by BlinkinLabs. Essentially, this product is a strip of 60 LEDs connected to a USB interface, which allows you to address each “pixel” individually through a little bit of coding so you can build up your own programmable lighting show! So far I’ve only had chance to use this as a very nerdy alternative to Christmas lighting, and more generally expanding my knowledge of Python, but I’ve got big plans for it in future!

First up – getting started. I decided to use this in conjunction with a Raspberry Pi I had going spare from another project, as it gives me network connectivity and a platform to write and run Python scripts on. Conveniently, no powered external USB hub is required to run the Blinkytape off a Pi (as I had no other peripherals plugged in, your mileage may vary!), so it was just a case of plugging it in and installing the necessary Python libraries:

$ sudo apt-get install python-pip
$ sudo pip install pyserial

There is an official Blinkytape python library available from their GitHub repository (along with some other languages), however at the time when I was playing with this (before Christmas) their base class was lacking a lot of features – so I wrote my own! To get my integration script, run the following:

$ svn co http://projects.mattdyson.org/projects/blinkytape blinkytape

This will give you the main class (BlinkyTapeV2.py) and a couple of example files, all of which are commented in a (hopefully!) helpful manner to show what’s going on. The following video shows an example of the BouncingBlocks.py class in action (by running sudo python BouncingBlocks.py) followed by a more ‘festive’ example, something I knocked together very quickly to cycle through a series of effects in very Christmas-y red and green colours!

Overall, I’m very impressed by the quality of this product. I was expecting something very rough-and-ready, being a rather specialist product marketed through Kickstarter – however the LEDs themselves are very bright, and nicely packaged up in a plastic flexible strip in order to protect the circuitry. The ease with which I managed to write my own integration library is also a testament to how simple the electronic design of this product is.

So what am I planning on using this for? First up, I’m looking at building my own alarm clock that reads from Google Calendar to only wake me up when I need to be up – normal alarms don’t seem to have been built with shift work in mind! I’m hoping to integrate the Blinkytape into this project by creating an ambient light that gradually fades up after the alarm has gone off, hopefully easing the transition into daylight hours! There are also plenty of projects I was hoping to do with a Moore’sCloud Light, another Kickstarter project that sadly failed to meet their funding goals, but hopefully Blinkytape will fill the void! I’ll make sure to post back here with further updates when my Blinkytape gets put to use!

XBMC – My Experience

Over the Christmas holidays I got a bit bored (as you do), and decided to experiment with an old projector, turning my bedroom wall into a giant monitor!

I’ve been looking for some time to find a decent ‘10 foot UI‘, and from initial glances at the internet all fingers were point towards Apples FrontRow, however I didn’t want to sacrifice the Mac Mini to run as a media PC (although it would do a very good job – virtually silent!). I decided to go slightly off the beaten track and try XBMC (Xbox Media Centre as was).

I must say I was pleasantly surprised at how easy it was to set up and configure – within a few minutes I had a working interface that looked great, it was playing nicely with my network to drag videos off my main PC and download box (headless machine running get_iplayer and rtorrent in a cupboard, more on that in another post). My only major gripe is that the navigation is fairly awful – whether you’re using a keyboard or mouse (or a remote I presume), I can’t seem to figure out whether I’m needing to go forwards/backwards/up/down on the menus, and a lot of functionality seems to be duplicated.

The process of gathering TV and film information is pretty seamless, the scanner seems to run nicely in the background gathering data on my files, even though they’re sat on another machine. I’ve noticed a few false positives for TV shows, and you definitely need to do some config file editing to get TV files picked up.

I unfortunately don’t have the right kit at the moment to try and get live TV displayed through XBMC as well (from forum browsing it seems possible), although I have installed the iPlayer and YouTube extensions, both of which seem to be quite buggy. The iPlayer extension inparticular has some pretty major issues – trying to pause a video will cause the whole program to lock up!

Overall – I’m pretty happy with this solution for the meantime. Anyone who’s happy hacking around with setting files to get things working just how they want should be right at home, but I wouldn’t really recommend to anyone who’s after an ‘out of the box’ solution.

The never ending list

Or more specifically – the never ending list of things to do that seems to dictate my life more than I do.

Over the last 3 months, I’ve watched said list grow and grow as my department shoved more and more assignment deadlines towards me, and watched the things I really want to do get moved gradually towards the bottom. This term has been a rather bumpy ride in terms of deadlines, assignments and exams – and I’m told it’s downhill from here! I’ll write some follow up posts soon showing off what I’ve achieved in creating recently (I’m actually proud of some of it!).

The happiest moment of my life occurred last week, when said list of ‘essentials’ finally reached zero, when the final assignment had been sent to the abyss that is known as ‘DUO’, and the end of term benchtest was over. I’m told that after spending a night out marking this occasion, I was heard celebrating in my room… Which involves me yelling a lot, before your minds jumped elsewhere!

Anyway – I get home, having promised myself a fortnight to enjoy Christmas before getting stuck down to work, and I find myself unable to even get started on that list of ‘want to do’ items. Congratulations to the CompSci department – they’ve killed my work ethic even for things that I enjoy!

My life

Well, its been a very long time since I posted here! Don’t believe I’ve written anything since I got back from Hungary even… that was a long time ago!

Upon getting back from Hungary, I’d heard from Durham that I’d been accepted into Van Mildert College, which has been my home for the last term. I moved in on October 4th, was consistently drunk for 10 weeks, and then moved back home in mid-December, having learnt not a lot – but having had a bloody good time! You can see why I’ve not had time for blogging!

Hungary was awesome if you were wondering, as was Summer Camp the week after – a good preparation for the ensuing mayhem at university!

I’ll try to post more on here as and when I remember, including some updates from Durham!

P.S. – Happy belated Christmas and New Year!

iPhone?!?!?!!!!!

Mum’s finally come round to the idea of iPhone! Seems that she wants one as well, however… and also sister wants one. Doesn’t seem quite so cool any more 🙁

Ah well… possibility of going into Macclesfield to get one tomorrow!!!

Xmas Greetings

Got a nice Christmas present from some script-kiddie this weekend – a nice attack against FsPortal! This little moron thought it would be funny to post 800 stupid messages on the forum… I guess he must be the alpha-male within the circles of retards – I only hope that natural selection takes its course and this particular branch of society dies out quickly!

Anyway, I won’t be around much over the next week or so – managed to get myself into quite a lot of debt recently, and hence need to earn the money back!

Seasons greetings to everyone, hope you get everything you wish for and more!

3 nights running…

Tonight will be the 3rd night of consecutive drinking!

2 Xmas concerts… needed a drink after that, and off to Nic’s tonight I believe!

Still looking forward to a weekend of actual work though 🙁

Anyway, Christmas concerts were as crap as usual. Last night had less than half the seats filled, I recon there were less in the audience than in the performers put together! Why do they make us suffer every year?!

Still nothing from UCAS, although Edinburgh and Durham have sent me correspondence saying they basically won’t give offers until January… keep me waiting why don’t you!!!

Nearly Christmas!

Oh dear… its only just December and already I’m fed up of Christmas adverts on the TV – its getting ridiculous! When you’re seeing adverts for "Great Xmas Deals!!" before we’re even in November… it gets rather depressing!

I vote we stop all adverts of a Christmas nature before the festive season is even here! I’m not being Scrooge, I’d just rather not be thinking about Xmas before my birthday in July!!!