Closed TeslaOwnerTips closed 2 years ago
When asleep some states always get set off such as climate, heaters, defrost, charging, sentry… I’m not sure what to do with temperature. locks, doors, windows trunk frunk, charge port get left in their last state I’ve taken a state file and set asleep values. So if state returned is asleep read this file instead. One option is to use push buttons so regardless of accuracy of a state the commands get sent. However I ended up with many. Anyway they are easily changed in the config file as either switches or push buttons.
There is a state (online/asleep) switch accessory which acts as an indicator as well.
I think it’s more important that the commands get sent compared to an accurate state.
For example unlocking the doors. No harm sending the unlock command if already unlocked. But having HomeKit think it’s unlocked and not send the command is annoying.
I think the code is debugged. Now I’m going to figure out the balance between using switches vs push buttons. Switches need accurate state updates. So using what I have over time will help determine how often the state is wrong due to say using the app or changing things in person.
I’m tempted to try using the Tesla api again. The last time I tried it I could not refresh the token so gave up and used TeslaFi.
It would be awesome if someone published and kept up to date a homebridge plugin that only did token acquisition and refresh. This is hardest part for us hobby programmers.
Looks cool, hope to use.
It’s been running for a few days without problems.
From #85
I'm writing my own bash script that basically does that. Using TeslaFi & Webhooks Two Scripts: A server and an updater Server
Updater
Webhook Devices
Logs
I'm close to being done. I've said that for a couple of weeks :) The two scripts will run as a service (current plan anyway.) I'm happy to share my current work if you like.