-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Set user defined maximum charging speed limit #33
Comments
Hi Thijs, |
Floris thank you very much for making this bluecurrent integration. 👌 |
@Floris272 has there been any progress on this issue in the meanwhile? I'm also interested in this feature: (temporarily) disabling the load balancer and adjust the maximum current based on the available solar energy. Would be great if this will be available on the Websocket API. |
@msomhorst If this is not added soon, I'm almost thinking of starting to mis-use the P1 port input to the load balancer. Simulate as if the house has a very high load so charging will slow down. |
I second @RobertDeLeeuw on this - when can we expect this feature please? It's easy to hook up an esp32 to drive the p1 port of the charger but why hack it if we can just ask nicely? :) |
Unfortunately @Floris272 is not working for Blue Current anymore... So it looks like this code is now unsupported. I also mailed and called Blue Current about this, without success. Last year I wrote some code to misuse P1 data with a 'man in the middle' solution (ESP32 board), to fool the Blue Current load balancer. I succeeded in creating a valid (checksum) manipulated P1 message. Also, the Blue Current load balancer responds to this manipulated data, by adjusting the charging power. Nice! However, the adjusted charging power depends on both the actual charging power and the manipulated data message. Somehow I can't get the load balancer to react exactly the way I want it to. Sometimes it 'kills' the charging session and adjuststhe charging power to 0 kW, when my manipulated power (in the manipulated P1 message) is too high. Anyway, I a happy to share my code with you guys. Maybe you can make something out of it, if Blue Current isn't making a move itself... |
Please do share, I would be happy to poke around and see how mine reacts. I will also call Blue Current next week to get some emphasis on this. In their integration they have these power values but they are sensors and thus read-only. I'm wondering if it would just work by writing to the API. |
2024-01-10_blue_current_dynamic_charging_speed.zip See attached. Forgive me my programming skills; code quality isn't on par with pro's. But it works. Some explanation (see also the architecture picture in the ZIP file):
I am happy to assist, if you're having trouble getting it to work. |
Thanks for posting this. I have a HomeWizard P1 lezer too so I'll try to replicate your experiment and probably port the code over to esphome and native HA API. I played around with the websocket API they have and noticed some amp values - probably set by the installer. Like:
That max_usage: 20 means it can use 20 amperes max (I have a 3x25A grid connection) but interestingly smartcharging_max_usage is set to 6 for whatever reason. It would be nice to get someone from BlueCurrent to help out... |
I found an interesting solution I want to use EVCC, URL: https://evcc.io/ You triggered me about this P1 manipulation to the charger and I found an interesting P1 simulator URL: https://www.benefactus.nl/projecten-elektronica/project-slimme-meter/slimme-meter-simulator/ If it is possible to use this and implement this is EVCC we have a solution. |
Very possibly yes. I also digged aroud today and found that you can set the current with the internal webserver - but this is just a display value. curl 'http://ip-of-charger/cgi-bin/save_installation_data?current=16&phase=3&iphase=1' would set this to 3 phases and 16 amps. Unfortunately even when set to 3 amps it was happily charging at 5 and 11 kW as well depending what I set on the car. Let's see what a weekend of tinkering can achieve ;) |
A bit of an update; I had no RJ12 stuff in my workshop and I was not able to get it work with a stripped RJ11 cable - but now they have arrived and I have a working DSMR lezer using esphome and the level-shifter circuit. I've also noticed that if you disconnect the charger from the P1 port it throttles the charge back to 4kW. Next step is to create the emulator and be "man-in-the-middle" between my meter and the charger, essentially rewriting the power values while proxying everything else. |
@dmagyar Once you get it to work, you will notice that the load balancer increases/decreases charging speed per 1A (= 3 phases x 230V = steps of 690W). You will also notice that it take around 20 seconds for the load balancer to respond to a new (manipulated) P1 message. I am not entirely sure about the schematics for connecting the P1 input wires to the ESP32 board, and the ESP32 board with the load balancer input. I soldered it on the back side of the ESP 32 board and then glued it on a mount, without writing down the schematics... amature... I can peel the glue off and have a look, if you don't get it to work. Good luck! |
I went a different route. I have taken a Raspberry PI, installed DHCP and DNS servers on it. |
This is very clever indeed but my company reimburses me with the charging costs (company car) so I need the back-office work normally. How did you trick the charging point to connect to your fake service instead of their own websocket API? Does it not validate TLS certificate chains? |
It took me some time but it's finally ready. I can arbitrarily change consumed amps/power and indeed control the charger. The code below needs a lot of improvements, I thought I share in case someone would like to repeat this after me. Also realised that the easiest/cheapest way to interface with the P1 port is to use a MAX3232 TTL to RS232 converter module (25 cents form Aliexpress lol). One module can handle both directions which is very convenient. Please let me know what you think about this and how should I improve it further.
|
Okay, it's time to give up. It does not work. I can manipulate the telegrams and all my other lezers detect them just fine (zonneplan, homewizard, esphome). But does not matter how I adjust the current (I've implemented a constant addition to the current value as well) it's not limiting charge. It stays at the rate I set on the car. I think an alternative approach would be to mess with the PWM signal between the car and the charger, telling a lower value to the car which controls the charge process. |
Checklist
Is your feature request related to a problem? Please describe.
Currently, the load balancer defines the maximum charging speed.
If the load balancer doesn't receive P1 data from the smart meter, a more conservative maximum charging speed is used.
However, it is not alway desired to charge with the maximum allowed charging speed by the load balancer.
For example, one would like to relate the maximum charging speed to the actual domestic PV power.
Or, one would like to be more grid / neighbour friendly by charging with a lower speed.
Describe the solution you'd like
It would be great if a user defined maximum charging speed limit could be set
Describe alternatives you've considered
It is OK if some constraints would be put on such functionality. For example, a limitation in how frequently one can update the user defined maximum charging speed (e.g. once every 15 minutes). Or, to use a lower limit on the user defined maximum charging speed, because of technical chargingpoint / electric vehicle constraints
Additional context
Part of a bigger picture, of dynamic charging based on energy prices and home energy management
The text was updated successfully, but these errors were encountered: