[plan : smart charger]

After laying some ground work by gathering energy use and production systematically, it’s finally time to build up some smartness. I want to use excess energy of PV panels efficiently to charge an electric car. Here I will show you what’s the plan and needed beforehand.

First, what’s needed is a charger that offers a local network connection and an API we can hack. I chose the go-e charger [1.] some months ago because of its price and flexible accessibility. It creates an access point we could use to connect to via the wireless connection of our smartics [2.] controller (the raspberry pi in use). Or we can setup an additional connection to our local wireless network. Since I don’t want to use the wireless connection of the raspberry yet, I chose to connect it to our wireless home network. There a word of caution: a lot of devices that can connect to the internet will also connect to some remote servers. Mostly they do so to deliver usage data and statistics, nonetheless I recommend to watch your outgoing traffic as soon as you add your network credentials to any new device and drop anything leaving your local network for security reasons (f.e. with iptables on your routers firewall).

With this step we have the following picture with either one router connecting the raspberry pi, inverter, charger to the global network by cable (grey) or wireless (blue), or a solution where there are more than one router (maybe with the wireless router as extra system). Note: the internet connection should not be needed for now.

Connected systems at this early state: EV charger, pi, router, inverter, internet.

The API of the charger is quite simple and lets us get a complete status JSON on one hand, while letting us set various of those values on the other hand. It has nice color codeable LEDs I will use to display what energy mix it’s actually receiving. At the same time the amount of LEDs on will show the current ampere flow. This means that I will send updates with the ampere count and the charging color to the charger. It is recommended to query the charger a maximum of once every five seconds, so I am planning to use the most detailed of the already implemented scheduler methods. I will use some caching of values in the database to make sure not to send unnecessary updates tough.

go-e charger with different LED states.

Into account for the calculation of how many ampere to set I will take: the amount of energy produced by the PV panels and the energy used within the last five minutes as well as a flag that is to define if the value should be set manually or a fixed value of ampere was set and is to be taken. The fixed value is to override any smartness with our own settings.

Next, the implementation will follow. Even though that is not so difficult I need to find some time to do so. What should be next after that? Adding the weather forecast, or rather connecting the car via OBD (on-board diagnostics)?

— Raphael


links

  1. go-e charger spec/downloads https://go-e.co/en/go-echarger-home-2/
  2. github, smartics https://github.com/seywerth/smartics

Leave a comment