Page 3 of 15
Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:21
by meel4chris
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

Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:25
by meel4chris
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

Re: New: Tesla hardware module
Posted: Thursday 20 February 2020 23:26
by MrHobbes74
Thanks! I'll have a look at the new requirements

For now, a good night!
Re: New: Tesla hardware module
Posted: Friday 21 February 2020 19:43
by MrHobbes74
No more patching needed, the next beta contains the Tesla module!
Re: New: Tesla hardware module
Posted: Sunday 23 February 2020 17:29
by meel4chris
Great, installed and working!
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 9:40
by sbaloo
Do you plan to manage sleep mode.
Because it seems that the tesla module stop the sleep process of the car.
Thanks for you work
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 10:11
by MrHobbes74
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?
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 10:23
by sbaloo
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.
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 10:32
by MrHobbes74
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).
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 11:01
by sbaloo
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
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 11:11
by MrHobbes74
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!
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 11:20
by sbaloo
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 11:27
by MrHobbes74
Interesting! I will definitely investigate this and see what I can do about it. Thanks!
Re: New: Tesla hardware module
Posted: Tuesday 25 February 2020 11:30
by sbaloo
You're welcome take me posted, I will test it. For now i disable the module when i want that my car sleeps.
Re: New: Tesla hardware module
Posted: Thursday 27 February 2020 17:55
by MrHobbes74
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!
Re: New: Tesla hardware module
Posted: Friday 28 February 2020 9:16
by sbaloo
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!
Thanks
Re: New: Tesla hardware module
Posted: Friday 28 February 2020 16:18
by meel4chris
thanks!
Re: New: Tesla hardware module
Posted: Sunday 22 March 2020 12:32
by MrHobbes74
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.
Happy driving!
Re: New: Tesla hardware module
Posted: Monday 23 March 2020 12:37
by peterpijpelink
hi, great, does this also work on Ubuntu 18.04?
Re: New: Tesla hardware module
Posted: Monday 23 March 2020 13:01
by MrHobbes74
If domoticz work on Ubuntu 18.04, then of course it works
