nfarina / homebridge-tesla

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

Request: Presence Detection to trigger switch (ie garage open/close) #42

Closed eoren1 closed 4 years ago

eoren1 commented 4 years ago

Wondering how the connection to the car is handled by this/homebridge and if it would be possible to detect the car arriving home to trigger a switch (and thereby open a garage door).

I have tried to do this with automations but the iPhone connection is not always fast enough to trigger. Since the car is on, I wonder if it may have faster/better/more reliable presence detection.

To get around Homekit automation limitations, I would automate presence of car to trigger a dummy switch with that switch triggering the garage open (via MyQ)

If not possible, I'll close this issue. Thanks!

nfarina commented 4 years ago

Does HomeLink in the car not work for this? (I don't park in the garage so I don't have experience with it). As for an "I'm home" trigger, I would look into some of the open-source apps out there that retrieve location of the car in real-time (maybe https://github.com/jpasqua/VisibleTesla/ ?). I don't know that I would add it to this plugin, but you could make your own!

eoren1 commented 4 years ago

Does HomeLink in the car not work for this? (I don't park in the garage so I don't have experience with it). As for an "I'm home" trigger, I would look into some of the open-source apps out there that retrieve location of the car in real-time (maybe https://github.com/jpasqua/VisibleTesla/ ?). I don't know that I would add it to this plugin, but you could make your own!

Unfortunately, my Model 3 was made after HomeLink was removed as a built-in option.

I use Home Assistant as well and integrated the Tesla and tried some presence detection based on the car's location and WiFi assuming it would be 'always on' and thus better/faster to connect and register home than the iPhone but it hasn't worked out.

I'm going to wait for WWDC to see if Apple comes out with their Tile equivalent which I hope/expect will integrate with Homekit and can then serve as a better presence detection.

Thanks for the follow up and suggestions.

*Might have figured it out thanks to your clue. Using device_tracker for car instead of iPhone and worked flawlessly on first attempt. Thanks