MrHobbes74 wrote: ↑Thursday 20 February 2020 23:16
meel4chris wrote: ↑Thursday 20 February 2020 23:10
MrHobbes74 wrote: ↑Thursday 20 February 2020 23:07
I use the token/bearer code. The tesla falls asleep quite fast. And even when not asleep, it is slow. In the app this is also the case.
If all switches are off (you are not heating/charging) the polling is once per 10 minutes. I think that doesn't cost much battery.
If you are charging, every minute the values are requested.
ok. any particular reason why it only works when the car is at home?
Because I don't feel safe if domoticz is accidentally sending commands to my car when I'm driving....but I could replace it with 'speed is 0'
haha, better not while driving indeed
autopilot already gives us enough surprises already
but you did a great job! would really love to see it in the next beta.
changing the at home check to speed 0 would be a good one indeed. and maybe parameterizing the polling interval?
I know the sentry mode costs a lot of energy if enabled and parked on the airport for a few days
Right now, when the car is not charging, the car is polled for information every 10 minutes. So it wakes up the car every 10 minutes. In between, the car sleeps. When it is charging (only when at home) this changes to an update every minute. I plan to make this configurable, depending on users needs. What is your observation?
When the car is sleeping, it will be great to not wake up it to read infos that should be the same.
If you click on the climate or defrost of course you need to wake up the car.
I'm not charging my car at home because i can charge it at work for less money than at my home.
I know that teslafi is doing something to not wake up the car when it's sleeping.
Fair enough! But if you don’t charge at home, using the Tesla module has not much use anyway . Except for warming up the car automatically in the morning. But in a next update I will allow the user to choose the update frequency, or 0 for no update. 0 of course will mean you cannot monitor the battery (e.g if you want to charge only when the battery is lower than a certain percentage).
the tesla module could be helpful also to see the battery graph. So yes it can be helpful.
For me the best for the update frequency of course is to configure the value, but also as i said to investigate in detecting if the car is sleeping and to let it sleep. If you are interesting i could try to see how teslafi has done
The only command to figure out if the car is sleeping or not, is the wake up command...the Tesla app also always wakes up the car. There is no other way that I can find from the Tesla api (described in https://tesla-api.timdorr.com/). So there is no way to check if the car is sleeping and then leave it alone....the check wakes up the car. But if you know a way, let me know!
In the latest beta (merged today) I reduced the number of api calls with less wake-up calls, so the response is much faster. I also added two options to the Tesla hardware: a default poll interval, and a poll interval for when charging at home. I have not yet implemented a keep asleep function, but it’s on the list!
MrHobbes74 wrote: ↑Thursday 27 February 2020 17:55
In the latest beta (merged today) I reduced the number of api calls with less wake-up calls, so the response is much faster. I also added two options to the Tesla hardware: a default poll interval, and a poll interval for when charging at home. I have not yet implemented a keep asleep function, but it’s on the list!
The new stable release introduces a new feature in the Tesla hardware. There is now an option to avoid the car to wake up in case it sleeps. This is turned on by default. The hardware also detects an occasional wake up during sleep to retrieve updates.
This will avoid battery drain! It requires a default update frequency of no less than 20 minutes, else the car will not go to sleep at all. Note: commands via the switches sent to the car will always wake up the car, no matter the setting.