nfarina / homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
154 stars 38 forks source link

Different approaches, discussion #90

Closed TeslaOwnerTips closed 2 years ago

TeslaOwnerTips commented 2 years ago

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.

TeslaOwnerTips commented 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.

TeslaOwnerTips commented 2 years ago

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.

TeslaOwnerTips commented 2 years ago

01262DAF-06CF-4E99-97EA-AD57064C584B

TeslaOwnerTips commented 2 years ago

D485271D-5257-431E-885F-E0DC3AC9F899

TeslaOwnerTips commented 2 years ago

0A4E3984-5334-492E-AADB-332D3DD79F6C

deepin125 commented 2 years ago

Looks cool, hope to use.

TeslaOwnerTips commented 2 years ago

It’s been running for a few days without problems.

TeslaOwnerTips commented 2 years ago

https://github.com/TeslaOwnerTips/homebridge-teslafied