A mobile battery

As a development of my Solar Power Home Automation Bus our family now has a mobile battery. Until now we have only used about 40% of the solar power we produce. Rather than selling excess power to the grid and then buying it back again I want to store and use this power in the car.

Due to the variable nature of solar power, household power needs and planned journey distances this is very complex. There are many different systems and users involved. This is where openHAB comes in to allow the integration of these different products, data points and rules.

Unfortunately the mobile battery bit of this system did not have an openHAB binding. There is a beta one in the forum but unfortunately the Renault API has changed so it no longer works. Luckily the new Reuault API has been reverse engineered and implemented in python. However what I need is an openHAB binding so lets have a go and make one. Making a new binding is fairly easy. You clone the openhab-addons github repository and run a create_template_script.

The api built for MyRenault apps is easy to use once you have an access token. However the process of obtaining this token is very uncomfortable. The binding is configured with the MyRenault application credentials, and Vehicle Identification Number of the MyRenault registered car. Then it automaticity gets the correct account and data from the cloud services.

The binding delivers channels which can linked to items.

These items can be displayed in the openHAB web UI.

The binding gets data so that I can tell my charger to stop when the battery gets to a certain level. I also want to start charging if the battery is below a certain level. When the battery is in the "good to go zone" (~above 40% ?) then I can switch to auto mode and send any excess power from my solar array to top up the car. This will involve controlling the charger but luckily my GO-e charger has an offcial openHAB binding.

I created a pull request for openHAB for this new Renault binding and after a lot of work to get it up to standard the code was merged into the openHAB official stack. As of openHAB 3.2 it should be available for other DIY home smart chargers to play with.