dingo35 / SmartEVSE-3.5

Smart Electric Vehicle Charging Station (EVSE)
MIT License
38 stars 13 forks source link

Not able to set charging status with post request when starting time is set #65

Closed Ferrox85 closed 2 months ago

Ferrox85 commented 2 months ago

Describe the bug After a lot of debugging, I've found out that it is not possible to start imidiate charging with a post request. It is possible with the gui of the smart EVSE. So i think it is a bug in handling the post requests with charging modes.

Upload your config { "version": "v3.5.1", "serialnr": 7162, "mode": "OFF", "mode_id": 0, "car_connected": true, "wifi": { "status": "WL_CONNECTED", "ssid": "xxxxxxxxx", "rssi": -45, "bssid": "xxxxxxx" }, "evse": { "temp": 28, "temp_max": 65, "connected": true, "access": false, "mode": 1, "loadbl": 0, "pwm": 1024, "solar_stop_timer": 0, "state": "Charging Stopped", "state_id": 9, "error": "None", "error_id": 0, "rfid": "Not Installed" }, "settings": { "charge_current": 160, "override_current": 0, "current_min": 6, "current_max": 16, "current_main": 25, "current_max_circuit": 16, "current_max_sum_mains": 600, "solar_max_import": 0, "solar_start_current": 4, "solar_stop_time": 10, "enable_C2": "Not present", "modem": "Not present", "mains_meter": "API", "starttime": 1714698000, "stoptime": 0, "repeat": 0 }, "mqtt": { "host": "", "port": 1883, "topic_prefix": "SmartEVSE-7162", "username": "", "password_set": false, "status": "Disconnected" }, "home_battery": { "current": 0, "last_update": 0 }, "ev_meter": { "description": "Disabled", "address": 12, "import_active_power": 0, "total_kwh": 0, "charged_kwh": 0, "currents": { "TOTAL": 0, "L1": 0, "L2": 0, "L3": 0 }, "import_active_energy": 0, "export_active_energy": 0 }, "mains_meter": { "import_active_energy": 0, "export_active_energy": 0 }, "phase_currents": { "TOTAL": 10, "L1": 10, "L2": 0, "L3": 0, "last_data_update": 1714676750, "original_data": { "TOTAL": 10, "L1": 10, "L2": 0, "L3": 0 } }, "backlight": { "timer": 0, "status": "OFF" } }

Upload a debug log not available at this moment if needed, I will flash that

To Reproduce Steps to reproduce the behavior: Set a planned charging smart action with the gui (or API post) do a API post to start charging immediately :http://ip adress/settings?mode=3 (or any other mode does not work)

Nothing changes, but if you hit smart in the gui of the smart evse, it starts charging immediately.

Expected behavior I expect the same behavior as hitting the smart button in the gui.

Screenshots none

Ferrox85 commented 2 months ago

The home assistant integration suffers from the same problem.

dingo35 commented 2 months ago

Thanks for your bug report, fixed in a006f89b25e5