Closed Frahmi12 closed 3 months ago
Did you try setting the limit in evcc instead of the vehicle? As long as the eallbox is enabled, evcc will update the power envelope.
/cc @maddimax seems this needs be handled by the proxy? Not sure how we did this with the http api.
The https://github.com/wimaha/TeslaBleHttpProxy proxy automatically tries to wake up the car any time a command fails. It does not use the mechanism you build to return errors about the wake state. The two options are to update the proxy, which (I think is not possible/means a rewrite) as it executes the requested commands async after it already ended the http request, or to change EVCC to not send power changes unless the vehicle is actually charging.
We could change the TWC. But whats the logic? When not charging we still need to enable the charger at some point
The https://github.com/wimaha/TeslaBleHttpProxy proxy automatically tries to wake up the car any time a command fails.
evcc over HTTP doesn‘t do this and handles wakeup in the loadpoint when it sees an api.ErrAsleep as appropriate. Seems this might be needed here, too?
Did you try setting the limit in evcc instead of the vehicle? As long as the eallbox is enabled, evcc will update the power envelope.
/cc @Maddimax seems this needs be handled by the proxy? Not sure how we did this with the http api.
I just tested it. Vehicle SOC limit to 100% and EVCC charging limit to 85%. Start Charging from 82% to 85% in PV Mode. EVCC charges up to 85% and stops charging. EVCC then does not send any further control commands.
What strikes me:
When EVCC sets the charging limit, the LP1 log says:
[lp-1 ] DEBUG 2024/07/21 13:30:42 limitSoc reached: 85.0% > 85%
This information is missing if the vehicle specifies the charging limit and therefore ends charging automatically. Although the WebGUI shows that the vehicle has reached the vehicle's charging limit and the charging process is complete, the above-mentioned note is missing in the log file.
The question for me is, why does EVCC continue to send control commands when it detects that the vehicle has reached the vehicle's charging limit? And why is this information missing from the LP1 log? Is there something wrong in the LP1 module?
LP1 Log - Charging Limit sets in EVCC
[lp-1 ] INFO 2024/07/21 13:28:42 stop charging <-
[lp-1 ] DEBUG 2024/07/21 13:28:43 !! session: chargedEnergy=2.2 > chargedEnergy=0.0
[lp-1 ] DEBUG 2024/07/21 13:28:43 !! session: start=0.000 stop=0.000 chargedEnergy=2.176
[lp-1 ] DEBUG 2024/07/21 13:28:43 soc estimated: 85.02% (vehicle: 85.00%)
[lp-1 ] DEBUG 2024/07/21 13:28:43 vehicle soc: 85%
[lp-1 ] DEBUG 2024/07/21 13:28:43 vehicle soc limit: 100%
[lp-1 ] DEBUG 2024/07/21 13:28:43 vehicle range: 346km
[lp-1 ] DEBUG 2024/07/21 13:28:43 limitSoc reached: 85.0% > 85%
[lp-1 ] DEBUG 2024/07/21 13:29:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 13:29:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 13:29:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 13:29:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 13:29:42 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 13:29:42 !! session: chargeRater.chargedEnergy=7.2 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 13:29:42 charger status: B
[lp-1 ] DEBUG 2024/07/21 13:29:42 limitSoc reached: 85.0% > 85%
[lp-1 ] DEBUG 2024/07/21 13:30:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 13:30:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 13:30:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 13:30:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 13:30:42 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 13:30:42 !! session: chargeRater.chargedEnergy=7.2 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 13:30:42 charger status: B
[lp-1 ] DEBUG 2024/07/21 13:30:42 limitSoc reached: 85.0% > 85%
[lp-1 ] DEBUG 2024/07/21 13:31:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 13:31:10 charge currents: [0.2 0 0.4]A
LP1 Log - Charging Limit sets in Car
[lp-1 ] INFO 2024/07/21 14:14:43 stop charging <-
[lp-1 ] DEBUG 2024/07/21 14:14:43 wake-up timer: start
[lp-1 ] DEBUG 2024/07/21 14:14:43 !! session: chargedEnergy=5.0 > chargedEnergy=2.2
[lp-1 ] DEBUG 2024/07/21 14:14:43 !! session: start=0.000 stop=0.000 chargedEnergy=5.018
[lp-1 ] DEBUG 2024/07/21 14:14:43 vehicle status: B
[lp-1 ] DEBUG 2024/07/21 14:14:43 vehicle soc: 90%
[lp-1 ] DEBUG 2024/07/21 14:14:43 vehicle soc limit: 90%
[lp-1 ] DEBUG 2024/07/21 14:14:43 vehicle range: 365km
[lp-1 ] DEBUG 2024/07/21 14:14:43 !! active phases: 3p = min(3p measured 0p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/07/21 14:14:43 pv charge current: 8.52A = 0A + 8.52A (-5882W @ 3p)
[lp-1 ] DEBUG 2024/07/21 14:15:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:15:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:15:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:15:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:15:45 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 14:15:45 !! session: chargeRater.chargedEnergy=10.1 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 14:15:45 charger status: B
[lp-1 ] DEBUG 2024/07/21 14:15:45 !! active phases: 3p = min(3p measured 0p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/07/21 14:15:45 pv charge current: 6.66A = 0A + 6.66A (-4595W @ 3p)
[lp-1 ] DEBUG 2024/07/21 14:15:45 max charge current: 6A
[lp-1 ] DEBUG 2024/07/21 14:16:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:16:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:16:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:16:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:16:42 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 14:16:42 !! session: chargeRater.chargedEnergy=10.1 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 14:16:42 charger status: B
[lp-1 ] DEBUG 2024/07/21 14:16:42 !! active phases: 3p = min(3p measured 0p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/07/21 14:16:42 pv charge current: 9.51A = 0A + 9.51A (-6563W @ 3p)
[lp-1 ] DEBUG 2024/07/21 14:16:43 max charge current: 9A
[lp-1 ] DEBUG 2024/07/21 14:16:43 wake-up vehicle, attempts left: 4
[lp-1 ] DEBUG 2024/07/21 14:17:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:17:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:17:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:17:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:17:42 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 14:17:42 !! session: chargeRater.chargedEnergy=10.1 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 14:17:42 charger status: B
[lp-1 ] DEBUG 2024/07/21 14:17:42 !! active phases: 3p = min(3p measured 0p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/07/21 14:17:42 pv charge current: 9.91A = 0A + 9.91A (-6839W @ 3p)
[lp-1 ] DEBUG 2024/07/21 14:18:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:18:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:18:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:18:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:18:42 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 14:18:42 !! session: chargeRater.chargedEnergy=10.1 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 14:18:42 charger status: B
[lp-1 ] DEBUG 2024/07/21 14:18:43 !! active phases: 3p = min(3p measured 0p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/07/21 14:18:43 pv charge current: 9.54A = 0A + 9.54A (-6580W @ 3p)
[lp-1 ] DEBUG 2024/07/21 14:18:43 wake-up vehicle, attempts left: 2
[lp-1 ] DEBUG 2024/07/21 14:19:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:19:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:19:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:19:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:19:43 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 14:19:43 !! session: chargeRater.chargedEnergy=10.1 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 14:19:43 charger status: B
[lp-1 ] DEBUG 2024/07/21 14:19:43 !! active phases: 3p = min(3p measured 0p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/07/21 14:19:43 pv charge current: 9.76A = 0A + 9.76A (-6735W @ 3p)
[lp-1 ] DEBUG 2024/07/21 14:20:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:20:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:20:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:20:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:20:42 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 14:20:42 !! session: chargeRater.chargedEnergy=10.1 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 14:20:43 charger status: B
[lp-1 ] DEBUG 2024/07/21 14:20:43 !! active phases: 3p = min(3p measured 0p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/07/21 14:20:43 pv charge current: 9.79A = 0A + 9.79A (-6758W @ 3p)
[lp-1 ] DEBUG 2024/07/21 14:20:43 wake-up vehicle, attempts left: 0
[lp-1 ] DEBUG 2024/07/21 14:21:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:21:10 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:21:40 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:21:40 charge currents: [0.2 0 0.4]A
[lp-1 ] DEBUG 2024/07/21 14:21:42 charge voltages: [0 4 0]V
[lp-1 ] DEBUG 2024/07/21 14:21:42 !! session: chargeRater.chargedEnergy=10.1 - chargedAtStartup=5.1
[lp-1 ] DEBUG 2024/07/21 14:21:42 charger status: B
[lp-1 ] DEBUG 2024/07/21 14:21:42 !! active phases: 3p = min(3p measured 0p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/07/21 14:21:42 pv charge current: 9.45A = 0A + 9.45A (-6518W @ 3p)
[lp-1 ] DEBUG 2024/07/21 14:22:10 charge power: 0W
[lp-1 ] DEBUG 2024/07/21 14:22:10 charge currents: [0.2 0 0.4]A
I set the vehicle max soc to 90% (in the tesla app) to stop charging, interestingly I now see evcc trying to restart the charge. From the log of my personal ble proxy:
Jul 21 15:03:00 raspberrypible bash[426]: Starting charge ...
Jul 21 15:03:04 raspberrypible bash[426]: WithCar Error: car could not execute command: complete
(This probably means that even with my proxy, evcc would then try to wake the car once it gets the errAsleep)
Even after adding "limitsoc:" to my custom vehicle definition, evcc is still trying to start charging.
Was spräche dagegen, bei schlafendem Auto ErrAsleep zurück zu geben und das Wakeup evcc zu überlassen? So ist es bei Http auch. Der Wakeup auf Proxy-seite ist hier unerwartet.
Wenn ich das Log richtig verstehe, dann hat EVCC in meinem Fall selber das Fahrzeug über den Fleet API Dienst von Tesla geweckt. Dann würde das an der BLE HTTP Proxy Mechanik nichts ändern.
[tesla] TRACE 2024/07/21 12:15:42 POST https://fleet-api.prd.eu.vn.cloud.tesla.com/api/1/vehicles/VIN1/wake_up
Liegt das Problem nicht vielmehr darin, dass EVCC den Ladevorgang, obwohl er laut Web GUI beendet ist, wieder starten möchte und zusätzlich den Ladestrom kontinuierlich anpasst? Das dürfte ja nicht passieren, wenn EVCC den Ziel SOC des Fahrzeugs bereits kennt und auch den aktuellen SOC.
Wenn der limit soc bekannt und erreicht ist sollte das nicht mehr passieren. Hilfreich wäre ein Log mit Tesla und custom charger auf trace.
Describe the bug
Hello, I have two Tesla Model Ys and two Tesla TWC3s. The control runs via the new function of the BLE Proxy. If one Vehicles has reached its Car Charging Limit in PV Mode, then EVCC continues to send Charging Currents to the BLE proxy and keeps the Car awake:
[tesla ] TRACE 2024/07/21 12:32:43 POST http://192.168.178.121:8080/api/1/vehicles/VIN1/command/set_charging_amps
and wakes up the Vehicle via Web API Proxy:
[tesla] TRACE 2024/07/21 12:15:42 POST https://fleet-api.prd.eu.vn.cloud.tesla.com/api/1/vehicles/VIN1/wake_up
On the EVCC homepage, the Charging Process is shown as complete and also that the vehicle SOC limit has been reached. I have the same behavior when the vehicle has no Charging Limit set and it has reached 100%.
When I charge in fast Mode, EVCC sends wake up and Charge Start Commands
NOTE: I have made some places unrecognizable in the Log File and the Config.
Steps to reproduce
Workaround: Set charging control from PV to Stop. Only then does EVCC stop.
Configuration details
Log details
What type of operating system are you running?
HomeAssistant Add-on
Version
0.128.3