serkri / SmartEVSE-3

Smart Electric Vehicle Charging Station (EVSE)
MIT License
71 stars 27 forks source link

Slave EVSE not returning to normal mode after Solar mode was active #122

Closed djoenez closed 1 year ago

djoenez commented 1 year ago

My skoda does not want to play nice with solar mode if there are alot of clouds (so the charging gets started and stopped a couple of times) So i just want to put it in normal mode but a low charging current to fix this during cloudy days.

unfortunately when i had both my chargers on solar, switch master to Off (only want to charge my slave) and switch slave to normal i still have the status: Waiting for solar. and if reboot the EVSE, it will default to solar again.

dingo35 commented 1 year ago

Could you post the settings of both EVSEs?

djoenez commented 1 year ago

Master: {"version":"21:07:36 @Feb 21 2023","mode":"OFF","mode_id":0,"car_connected":true,"wifi":{"status":"WL_CONNECTED","ssid":"xxx","rssi":-81,"bssid":"xxx","auto_connect":false,"auto_reconnect":true},"evse":{"temp":28,"temp_max":65,"connected":true,"access":false,"mode":2,"solar_stop_timer":287,"state":"Charging Stopped","state_id":9,"error":"None","error_id":0,"rfid":"Not Installed"},"settings":{"charge_current":70,"override_current":0,"current_min":6,"current_max":18,"current_main":25,"solar_max_import":0,"solar_start_current":5,"solar_stop_time":5,"enable_C2":"Not present","mains_meter":"API"},"home_battery":{"current":0,"last_update":0},"ev_meter":{"description":"Eastron","address":101,"import_active_energy":0,"total_kwh":310,"charged_kwh":2.1,"currents":{"TOTAL":0,"L1":0,"L2":0,"L3":0}},"mains_meter":{"import_active_energy":0,"export_active_energy":0},"phase_currents":{"TOTAL":34,"L1":5,"L2":121,"L3":-92,"last_data_update":1680170472,"charging_L1":true,"charging_L2":false,"charging_L3":false,"original_data":{"TOTAL":34,"L1":5,"L2":121,"L3":-92}},"backlight":{"timer":0,"status":"OFF"}}

Slave: {"version":"21:07:36 @Feb 21 2023","mode":"NORMAL","mode_id":1,"car_connected":true,"wifi":{"status":"WL_CONNECTED","ssid":"xxx","rssi":-81,"bssid":"xxx","auto_connect":false,"auto_reconnect":true},"evse":{"temp":30,"temp_max":65,"connected":true,"access":true,"mode":0,"solar_stop_timer":253,"state":"Charging","state_id":2,"error":"None","error_id":0,"rfid":"Not Installed"},"settings":{"charge_current":60,"override_current":70,"current_min":6,"current_max":16,"current_main":25,"solar_max_import":0,"solar_start_current":5,"solar_stop_time":5,"enable_C2":"Not present","mains_meter":"API"},"home_battery":{"current":0,"last_update":0},"ev_meter":{"description":"Disabled","address":21,"import_active_energy":0,"total_kwh":0,"charged_kwh":0,"currents":{"TOTAL":0,"L1":0,"L2":0,"L3":0}},"mains_meter":{"import_active_energy":0,"export_active_energy":0},"phase_currents":{"TOTAL":0,"L1":0,"L2":0,"L3":0,"last_data_update":0,"charging_L1":false,"charging_L2":false,"charging_L3":false,"original_data":{"TOTAL":0,"L1":0,"L2":0,"L3":0}},"backlight":{"timer":120,"status":"ON"}}

dingo35 commented 1 year ago

What happens if you put both on Solar, switch Slave to Normal, and then switch Master to Off?

djoenez commented 1 year ago

Hello Dingo, will do asap, unfortunately i will not be home with 2 cars for the next two weeks, will update ASAP (thanks for looking into this!).

Just a question for my understanding: Is it possible to use the EVSE2 (smart or solar) when master is in off mode? or is this prohibited?

Maybe also a feature request: I ask these questions because sometimes i have two cars connected but i want to charge one car in particular of solar (and only start charging the second car when i have enough solar power, i have enough to charge 1x16A + 1x8A for example). But now i don't have this choice, is there a way to "toggle" the preferred car? Or when the car is connected to have a toggle which states you may charge (so you prevent it to charge even when the selected mode is solar?)

dingo35 commented 1 year ago

The "OFF"mode is actually setting the Access bit off; so this is the same as when you have RFID reader activated and you would not identify yourself with a valid RFID card.

So I would expect the original firmware to be able to charge on EVSE2 when EVSE1 is not used/no RFID card is presented; and I would expect the serkri firmware to do the same, since we did not (intentionally) change that behaviour.

But I only have 1 EVSE so I cannot test it for you....

I understand your feature request, makes a lot of sense; for the near future I would use HomeAssistant and the ha-smartevse integration to script this kind of behaviour. I intend to start using solar mode this summer (also through HomeAssistant) and when I have some practical experience I might either publish my HA automations OR build them into the SmartEVSE firmware....

dingo35 commented 1 year ago

@djoenez could you please test this with newest release 1.6.0 and, if problem still exists, post the verbose telnet/debug log here?

djoenez commented 1 year ago

@dingo35, will do. Just got back from long work related travel, as soon as i use the second car again i will update this thread with testing. Thanks!

djoenez commented 1 year ago

Works now as expected. Thanks for the fix!