Enabling modbus replaces the built-in active load balancing of the Alfen device.
So if you use Modbus, you have to interpret P1 readings to determine a sensible charging current and send that to the charger using Modbus.
So you have to create your own load balancing rules in Home Assistant.
I can confirm that my BMW hybrid has the same issue: it will not start charging when the Alfen is first set to under 6 (5 in my case) and then goes to 6 or more.
So that charge current trick cannot be used to determine whether the car should be charging.
I wonder if there is another signal to send through Modbus or the API to gracefully disable/enable charging?
There is the “Suspend Charging Mode” which responds to a switch or relay connected to two of the lines that would otherwise be used for the P1 connection. That’s a last resort for me, because I would need to connect a relay to an ESP8266 and control that from home assistant. Quite a hassle for something that should be easy with software.
I did not succeed to reliably disable charging from the chargepoint either. I am using the API to the car to pause charging. This way I can ‘suspend’ the charging for longer times reliably. But I don’t know if your car brand supports this via API.
Another possibility - with limited extra energy consumption - would be to set the charge current to ‘0 A’ and enable the charging for a short time at 6A every now and then (e.g. every 15 minutes). To be tested if your car supports this of course…
[edit: oops, I did not realise you replied on a post from long ago where I basically explained how I tackle the charging…]. Either way: I would give it a go with testing 0 A for 15 minutes - 6A for 1 minute - 0A for 15 minutes - … to see if this helps…
I’m guessing these are the ones that set phases and amps on the charger? I have all the pieces working seperately, I can switch phases mode, I can change amps but the combination is something I have not been able to get working yet. I’m guessing the magic is in those 3 scripts
Yes that helps greatly @bartland ! I must confess that after posting my question I reread the thread and basically everything is there already, so sorry for the inconvenience
Nice. This gives a more smooth increase of the wattages from 1.5 kW till 10.7 kW.
Just a warning if using high amperage: make sure that the electrical setup of your house can handle it.
When I used 14 ampere or above, the fuses in my electrical board sometimes went out.
Here, it’s just a line in a configuration file, but it’s “high power” stuff.
Hi @bartland four followup questions after combing through your automations.
How did you calculate the bytes sent to the charger (based on amps) I’m trying to figure out how to add 15 and 16
Would you mind sharing your stop_charger script (and is there a start_charger one? couldn’t find that in your shared automation)
what are you using this for: car_charge_sun_max_netwattage I’ve now set it to -125 to have a little spare energy, but perhaps you are using it for a different purpose?
Purely out of curiousity, could you share your /dashboard-car/car-charging yaml?
Feel free to answer only some or none, I can imagine you’re getting these questions a lot since contributing to this thread
Interesting, but I can’t find this setting in the Alfen app. Perhaps it’s only available in the Windows application?
Edit: I cannot find it the app on my android phone, but it is indeed available in the ACE. That means you can still do loadbalancing on the P1 even if you only have a RJ45 network cable.
For example: connect the P1 port with a raspberry pi, read the serial port and publish it to a tcp/ip port with ser2net. Then configure the charger with the ACE: select DSMR4.x/SMR5.0 as the protocol in Active Load Balancing, and in the DSMR/SMR (P1) tab, select Telnet as the interface, and enter the ip and port of the raspberry pi.
Stopping the charger is done by putting it at 5 ampère. That is too low for the car to charge, so the car stops charging but the charger itself is still powered on and the “session” continues.
stop_charger:
alias: "laadpaal - stop laden door op 5 A te zetten"
sequence:
- service: modbus.write_register
data:
address: 1210
unit: 1
hub: car_charger
value: [0x40a0, 0x0000]
I’m able to read from the registers of the Alfen, but writing to it does not have any effect and neither does it give an error. Is there some setting that needs to be activated before you can write?
Edit: there is this setting: ‘SCN Modbus Slave Max Current enable’ at address 1431. This is disabled on my charger. Perhaps that is the reason. Any idea how it can be enabled?
Check the Logging tab in the ACE Service Installer application after you write a register, maybe there will be some information?
“SCN Modbus Slave Max Current enable” is only relevant when you are using a Smart Charging Network (which is when Alfen stations work together to stay below the configured maximum current, it also requires a separate license IIRC)
The first screenshot you showed is to login to the ACE Service Installer. This is done using your actual username from Alfen and the password that matches it.
The second screenshot you showed is to login to the charging station. This is done using the Owner user level (I think this uses ‘admin’ underwater, I’m not sure). For that, you need to use the password that came with your charging station (or whatever you changed it to). If you kept the password default, perhaps you can obtain the default password in Alfen customer portal?
Do you still have this issue? When you encounter this issue, can you download a week’s worth of logging using the ACE Service Installer application and send it to me? Maybe I can find something interesting in there…
(replying to a post from @hollie) Thanks, I now use the car API too. The latest version supports selecting “charge immediately” or “charge in time slot” which is enough to turn charging on or off. It’s not ideal because if I connect the car to a public charger somewhere, it won’t immediately start unless I also change that setting.
The momentary turning on of charging is something I haven’t tried yet, indeed.