Hi @kender,
charger reset is not used in automation, as there is no need for it . I have a switch for it instead:
- platform: modbus
scan_interval: 10
coils:
- name: ChargerOvercurrentDisable
hub: wallbe
slave: 255
coil: 409
- name: ChargerEnable
hub: wallbe
slave: 255
coil: 400
- name: ChargerReset
hub: wallbe
slave: 255
coil: 413
ChargerEnable
is a later addition. I changed the charger dip switches so that separate enable command is always required; either from Modbus TCP or separate input. I added a switch to input too, so I have a backup in case HA fails
My current setup is quite complex, but it works.
- Normally charger is enabled and set for 10A
- When I connect charging cable charging starts and
EVStateDec
changes from A (decimal 65) - State change triggers telegram automation to ask for user selection and starts a 10 min timer. Additionally entrance lights are turned on if the sun is below horizon.
- User (me) can select charging speed or no charge, all selections cancel the timer. So the choice is charge now or do not charge
- If nothing is selected the timer reaches zero, this triggers another telegram message and stops charging. Reasoning for this 10 min is battery lifetime optimization. Lithium batteries do not like high nor low voltages, so short charging after driving is always good. In reality this should have near zero effect, but it’s there because it’s the most optimal solution I could think of .
- I get the car battery SOC with Mercedes Me component made by @ReneNulschDE (). SOC is used to start charging at night so that charging is ready at 6:30 (input_datetime). This optimises the charging losses for cabin heating and minimizes the time battery is at full SOC, also electricity is cheaper at night time.
- Last automation is based on whole house current consumption. Main fuses are 25A, and if the current goes over 30A for a minute (they last quite long time small over current) charging is stopped and telegram message is sent out.
Furthermore I have other automations, all in same file in quite messy order. So it’s not presentation quality . I can share any pieces you’d be interested in, or send more via pm, but putting it all here would require too much cleaning work…
Just this week I had one issue. HA reported in the morning that battery is at 34%. I got nervous, if something is broken. Rebooted everything, charger too and charging did not start… Finally I checked the current consumption graphs and saw that charging had happened. The issue was in Mercedes cloud service, which reports the SOC. Cloud was down all night and battery was already full, but it was difficult to believe (going out and starting the car is too much) :).