Closed trollvottel closed 3 years ago
I guess the bug lies here:
Since the task is re-scheduled every second, at some point a minute has passed which is <10 minutes where everything is re-read.
Minutes is the time passed since the car last time changed its state from sleeping to wake up. In addition, this get's reset when the car is in use (Checking shift_state, charge_state, speed and climate). The task is rescheduled every 5 seconds (ignore the misleading comment in the code, need to remove that), but if the "Minute" goes higher than 10 it trys to let the car fall asleep by not requesting infos for the next 15 minutes anymore. Somehow your adapter did reset the "lastTimeWokeUp" and because of that, it did never go to sleep.
I've just pushed a version with additional logging at the places where "lastTimeWokeUp" get reset. Could you install the newest version from github and if the car does not go to sleep, send me the corresponding logfile?
Will do, installing right now..
I guess it has sth. to do with the fact that I leave the car plugged in over night (without actually charging due to photovoltaics-optimized charging)
Ah, then you should already be ok with the last latest version. The state of the charger in that case is "Stopped", I've included this because of a request from another user a couple of days ago, so in case it is "Stopped", it does not reset the time and should also go asleep. Just take the latest version from github.
Indeed the case is "Stopped" when plugged in over night without charging. Thanks!
The adapter kept my car online the whole night (0:00-8:30), even in "smart" mode. Please see logs attached, it says each time it's getting all data because last wake was just a minute ago. I'm disabling the adapter for now, because its useless to me like that ATM as the car wastes A LOT of energy when awake (>5% per night). iobroker.2021-04-07.log