Redis is innovative again

ReJSON: Redis as a JSON Store
We’ve created ReJSON, a Redis module that provides native JSON capabilities. ReJSON should make any Redis user giddy with JSON joy.

I have used Redis for many years – both as a database cache and as a super fast in-memory database. But it has not evolved a lot for  a long time.

But this seems to have changed – RedisLabs (the commercial arm of Redis) has released a number of opensource/commercial modules for Redis.

The first one I have looked at is RedisJSON – as I saw the potential to upload a whole Azure Cosmos database for one of my projects into Redis, while improving speed and drastically lowering costs. (Cosmos is well known for being expensive to run.

So I’m currently writing a POC to test out my theories – onwards and upwards.

The problems with charging stations for cars

Arriving down at Portsmouth Harbour today we drove up to the charging station at Gunwharf Quays and found the charging stations (all of them) displaying the following error messages :

IMG 3464

– it looks like the computer had restarted 20 hours ago and never recovered- so it’s a reasonable guess that they had been unavailable for almost a day.

As we have a Hybrid car (Bmw X5e if anyone is interested), we have of course made sure we know where we can find charging stations around the country, and as Ecotricity has a virtual monopoly on charging at motorway service stations we have used their (up till now free) service.

That is until the following email arrived :


“Since making the announcement last week, we’ve had a number of conversations with Electric Highway members – and had feedback particularly about the proposed 20 minute charge session.

As a result of this, we’re changing our approach – and charging sessions will instead be for 30 minutes and cost £6 (as opposed to 20 minutes for £5).  

From the feedback we’ve received, this should ensure that the vast majority of EV drivers are able to achieve the ideal 80% recharge in one session.

In terms of value for money, this change results in 50% more charging time for just a 20% increase in cost – overall, that’s a 25% net reduction in cost.

We know there are lots of EV drivers with different needs – there are around 40 different models of electric vehicles on the road and three charging standards – but we hope this new model strikes the right balance for everyone. We’ll be keeping a close eye on how this transition pans out and we’ll keep listening to feedback.”

and for us this does just not work – our car charges like this :

The 2016 BMW X5 xDrive40e is the carmaker’s first full-production plug-in … With a Level 2 charger,charge time drops to 2 hours and 45 minutes (or better).

Simple maths tells me that in 30 minutes it will have charged to approximately 20% – consuming less than 1.5kwh.

So in other words they want to charge me GBP 6 for this – equal to approximately GBP 4 per kWh! It is now substantially cheaper to run the petrol engine to charge the batteries in the car.

So it does not look like we belong to the “vast majority of EV drivers”, just the majority of PHEV drivers……

Needless to say we will not be using their charging stations.

The BMW X5e hybrid saga – how thirsty is it really

We have now had the X5e for 5 months, and I guess it’s time to work out how much petrol it really saves.

The old X535D used an average of 21 mpg over the 3 years we had it.

The X5e shows :

IMG 0002

This does loosely translate into an average of 42 mpg for the last 1471 miles of ordinary driving.

So although it uses 50% less than our old X5 – it’s still a far way from the published figures 


A lot of this has to do with the range you can drive on the electric motor on it’s own – and our X5e seems to be unable to get more than 11miles from this, where the specification says 19 miles. I suspect our mpg’s could be substantially higher if this was really the case, as most of our weekly driving would suddenly be without using petrol, changing the total figures a lot.

Reverse Engineering the BMW X5e software portal API

I found the following  online : 


Reverse Engineering the BMW i3 API ← Terence Eden’s Blog: “Reverse Engineering the BMW i3 API Posted November 27, 2015 & filed under /etc/ | 24 comments Tags: android, api, bmw, car, hacking, nablopomo | I’m really enjoying driving the BMW i3.

I’d love to have it tweet its driving efficiency, or upload its location to my server, or let me turn on its air-conditioning when the temperature gets too warm – there are a hundred interesting things to do with the car’s data. The official app has some of these features – but is slow, ugly, and a pain to use.


I will have to experiment this weekend!!


Calculating the electric driving range of the BMW X5e

I’m still mystified as to the pure electric driving range of the BMW X5e – and it looks like I have every reason to be so.


Look at the specifications from the BMW site – especially notice

– Battery capacity 9.2kWh

– and then the Electricity consumption in kWh/100km. : (from the cars computer) 14.6

My maths then gives me a maximum range of 63 km? So why do we in practice get around 17km max range?


UPDATE : it looks like BMW misses out a few words in their description – the “Electricity consumption in kWh/100km” is really measured in “combined” mode – i.e. with the petrol engine running as well…….

So far I’m unable to find out what the electric range really is – it looks like it would be around 30 kWh/100km, but I can not find any logging giving me such figures…








The BMW X5e range on electric – the hybrid saga continues

The X5e is now exactly 1 month old – and we have tried to find out how long it can actually drive on pure electric power.

Todays drive was from Godalming to Haslemere – a distance of 8.8 miles according to the navigation system.

The car was fully charged overnight – and we reached the parking spot in Haslemere with 21% battery power left. This should indicate that we could drive the car for a maximum of around 11 miles on a full charge.

The drive was a typical southern england drive, using the dynamic cruise control, so no speeding, and the car driven as smoothly as only the built-n computer can do.

There is a “but” her though – when the power level dips below 10% it seems impossible to drive on electric power on its own, as the car will warn you that there is not enough power in the battery to drive the demands of the car.

The BMW website states 

However, in purely electric mode, this
pioneering, unrivalled vehicle can drive approximately 19 miles completely emission free
and with zero fuel consumption.”

But this is of course not the reality we see with our car – it can drive approximately half of the advertised distance.

I will hasten to say that this may be a software problem, and it may be fixed by a software update, as all the data I can get is driven by what I see on the dashboard and from the BMW connected apps. So I hope this can be fixed without too many issues at the next service.

It has (as far as I can tell) changed from when the car was brand new – as we could only get 3-5 miles of range on pure electric.


On the positive side the stats tells us :



The last journey today was very short, and most of it driven mostly on batteries.

The “All journeys” is since the car was new btw.

The Hybrid saga – BMW X5e – map updates

Logging into BMW’s “Connected-drive” portal I found a new version of the car’s maps for Europe, and I started the download process – which you can do directly from the site – without download their “BMW updater” app – which I was unable to make work, on my Mac it just crashed every time I tried using it to upload to the USB stick.


The downloaded file is zip compressed :


it’s quite large – 23Gb compressed.

I tried copying it directly to the stick, but that did not work, so I uncompressed it – and ended up with a structure like this :


inside the directory was a structure like this :


i.e. 4 directories numbered 1..4, one pkg file, a config file and a signature file.

Then I uploaded the directory structure to the USB stick – but the car did not recognise this as a valid file.

I moved the file structure inside the top level directory to the root of the USB stick – and this time the car recognised it and I could start the upload, so I did this, turned off the car and went in. When I came back the upload had stopped – it turned out that the car had to be turned on while the upload took place – not exactly a good way of doing this BMW.

So we went for a drive – and around 45 minutes later the map-system restarted itself, just as we were entering the town of Winchester, our destination. A bit awkward. The system could have asked us for permission to restart – and we would have waited until we were stopped in a place where we did not need the map! 

Again – good of BMW to let us download updates over the Internet, but they really need to look at the way they have structured this, it really needs to be simpler in 2016!