Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sleep at all since start of scapping ? is there anything to setup ? #52

Open
potens1 opened this issue May 19, 2019 · 10 comments
Open

Comments

@potens1
Copy link

potens1 commented May 19, 2019

Hi,
Thank you for the nice personal scrapper you write !

I've something that I should have missed, how to let the car sleep ?
The car is parked for more than 17h, but it sis not has gone to sleep and the battery is going low pretty fast (for not doing anything)(up to 1% per hour, but more often 1% per 2 hours)

The logs show always the same loop:

2019-05-19 09:11:21 DEBUG    Car State: online Poll Interval: 1
2019-05-19 09:11:21 DEBUG    >> Request vehicle data
2019-05-19 09:11:22 DEBUG    Only minimal range difference received. No change registered to avoid wakelock.
2019-05-19 09:11:22 DEBUG    Value Change, SG: charge_state: Logging...charger_voltage: old value: 0, new value: 2
2019-05-19 09:11:22 DEBUG    VALIDITY CHECK VIOLATED >>> charger_voltage:new_value < 10
2019-05-19 09:11:22 DEBUG    Only minimal range difference received. No change registered to avoid wakelock.
2019-05-19 09:11:22 DEBUG    Only minimal range difference received. No change registered to avoid wakelock.
2019-05-19 09:11:22 INFO     Writing Points to Influx: charge_state
2019-05-19 09:11:22 DEBUG    Only minimal temperature difference received. No change registered to avoid wakelock.
2019-05-19 09:11:22 DEBUG    Only minimal temperature difference received. No change registered to avoid wakelock.
2019-05-19 09:11:22 DEBUG    starting thread elevator:XX.XXXXXXX/XX.XXXXXX/1558257082818
2019-05-19 09:11:22 INFO     Asleep since: 0 Sleeping for 1 seconds..
2019-05-19 09:11:23 DEBUG    Elevation: 171
2019-05-19 09:11:23 DEBUG    Car State: online Poll Interval: 1
2019-05-19 09:11:23 DEBUG    >> Request vehicle data
2019-05-19 09:11:25 DEBUG    Only minimal range difference received. No change registered to avoid wakelock.
2019-05-19 09:11:25 DEBUG    Value Change, SG: charge_state: Logging...charger_voltage: old value: 0, new value: 2
2019-05-19 09:11:25 DEBUG    VALIDITY CHECK VIOLATED >>> charger_voltage:new_value < 10
2019-05-19 09:11:25 DEBUG    Only minimal range difference received. No change registered to avoid wakelock.
2019-05-19 09:11:25 DEBUG    Only minimal range difference received. No change registered to avoid wakelock.
2019-05-19 09:11:25 INFO     Writing Points to Influx: charge_state
2019-05-19 09:11:25 DEBUG    Only minimal temperature difference received. No change registered to avoid wakelock.
2019-05-19 09:11:25 DEBUG    Only minimal temperature difference received. No change registered to avoid wakelock.
2019-05-19 09:11:25 DEBUG    starting thread elevator: starting thread elevator:XX.XXXXXXX/XX.XXXXXX/1558257084875
2019-05-19 09:11:25 INFO     Asleep since: 0 Sleeping for 1 seconds..
2019-05-19 09:11:25 DEBUG    Elevation: 171

The version running is 2019.5

Any advice ? Thank you

@olexs
Copy link

olexs commented May 21, 2019

I had the same issue after installing. Merging #48 into my local code has helped - for some reason it's not yet merged into master. Very rarely my car still remains awake for longer periods of time, but mostly it goes into sleep as it should.

@lephisto
Copy link
Owner

Will be merged when I get time to review it. Few days from now...

@potens1
Copy link
Author

potens1 commented May 26, 2019

Great ! Thank you.

@CptanPanic
Copy link

Yes merging #48 does now allow me to sleep. But now I don't get any data while it is asleep, which I guess is expected. Maybe we can configure to allow to wake up every once in a while to get some data?

@potens1
Copy link
Author

potens1 commented Jun 13, 2019

@CptanPanic Maybe I miss the point, but what's the use case of having data for a sleeping car ? (real question since I did not use the apiscraper a lot yet).
Thx

@CptanPanic
Copy link

@CptanPanic Maybe I miss the point, but what's the use case of having data for a sleeping car ? (real question since I did not use the apiscraper a lot yet).
Thx

To check for battery drain, cabin temps, etc.

@wtran63
Copy link
Contributor

wtran63 commented Jun 15, 2019

When the car goes to sleep, the vehicle_data call is not available (cause your car is asleep and you get a 408 request timeout), so you wouldn't get that data until your car wakes up anyways.

The only data available is from the base vehicles call as found here: https://tesla-api.timdorr.com/api-basics/vehicles

@egonzalezpozega
Copy link

I just installed this 2 days ago. And it seems like this issue is still present on version 2019.5
I am currently on 2019.36.2.1 My car is constantly being polled every second and battery drain is pretty substantial since the car hasn’t gone to sleep. Only if I start the service while the car is asleep it will increase the polling interval. Once the car wakes up it will prevent it from going to sleep. According to the readme it should let the car go to sleep? Am I missing something?

@rtega
Copy link

rtega commented Nov 28, 2019

See issue #57 and the referred code 9161652. This solves it for me.

@gaLDWoRE
Copy link

Here to verify that the referred code that @rtega posted is all you need, resolved my issue last night.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants