Hello, I’m starting to take an interest in this topic as I’m planning to switch to an electric car, and I have solar panels (2.9 kW max) that generate between 10 and 13 kWh per day, and I use an average of only 5 kWh, despite having a heat pump programmed to heat water between 2:00 p.m. and 6:00 p.m. So the idea is to be able to use all the unused electricity to charge an electric car’s battery.
My project involves retrieving, every 10 seconds, production data, household consumption, and energy imported from and exported to the grid from an “Envoy Emphase” gateway. I do this using a REST API via a Python script running as a service on a Debian NUC. Additionally, using a GUDE smart plug, I retrieve consumption data specific to battery charging via a REST API request every 10 seconds as well.
This information allows me to calculate threshold parameters, for example, for a slow charge at 8A (1780 W), I accept that power imported from the grid can account for up to one-third of consumption; therefore, once the power imported for charging the electric vehicle exceeds 600 W, I disconnect the phase of the smart plug via a REST API command, and I reconnect the phase of the smart plug as soon as the surplus production (Production – Household Consumption) reaches 1,200 W. I’ve implemented start and stop delays to account for passing clouds that could cause the system to cycle on and off too frequently. At the end of a charging session, I calculate the portion supplied by the solar panels and the portion imported from the grid to quantify the cost of charging based on the total amount in kWh and its breakdown. And of course, when necessary, I’ve set up a scenario where I force a charge without taking all these automation parameters into account to charge the electric car’s battery if the surplus production from the solar panels isn’t sufficient (fall/winter).
In my research, I found that communication between the charger and the electric vehicle requires the use of charging stations that comply with the IEC 61851 standard, and that abruptly cutting off power to the charger is not the solution. States A, B, C, and D allow the equipment to be validated before charging begins and enable clean shutdowns.
So, what I’m hoping to learn by talking with other users is whether it’s possible to communicate with the OpenEVSE unit every 10 seconds using a REST API command such as ‘GET http://{IP}/r?json=1’, and to understand the response and its format so I can determine the real-time power and current of the charge, as well as control the OpenEVSE unit with commands such as ‘GET http://{IP}/r?json=1&=8’ to start charging and ‘GET http://{IP}/r?json=1&=0’ to stop charging.
I’d like to thank in advance anyone who knows how to do this and can help me better understand it so I can successfully complete my project.
