nfarina / homebridge-tesla

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

Charge level bulb, disable frunk and how do I know the vehicle is home? #111

Closed KE55ARD closed 1 year ago

KE55ARD commented 1 year ago

I just installed this plugin the other day and it's a possible game changer so thank you so much for creating it!

The things I am struggling with so far are, that I did not get a bulb for adjusting charge level.

I have tried disabling the Frunk service but the Frunk Lock still appears and works (not worth having as I keep accidentally triggering it with voice commands then have to go out and physically shut it again).

And perhaps most importantly, for the sake of automations within HomeKit, is there some way of telling the car is "At Home" so I can only trigger automations like auto shutting the trunk if it is?

nfarina commented 1 year ago

Hi, glad you like the plugin!

You should be able to disable front trunk and expose charge limit by adding these values to your config.json:

{
   ...
   "frontTrunk": false,
   "chargeLimit": true
}

As for determining if the car is at home, I think that would be a nice feature - you would have to make sure to wake the car up in your Shortcut by turning on the "Connection" switch first, but then I could expose whether the car is "at home" by making a dummy switch that turns on when inside a geofence maybe?

KE55ARD commented 1 year ago

Yeah that sounds perfect! I was trying to work out what some of the switches were and hoping that one of them was “at home state” but I guess they were "sentry mode" and "wake" from what you just mentioned..

TeslaOwnerTips commented 1 year ago

If the plugin can poll the vehicle awake/sleep state then the following approach may work.

Home location Provide a temporary flag/configuration to enable for the plugin to record the gps home location. Or output to the homebridge log and the user enters it into the settings/config file.

Geofence Radius in meters or feet.

Update Logic

The user should not need to wake up the vehicle or trigger a plugin update.

After exploring a number of solutions including the Tesla API, the vehicle blue tooth signal, wifi connection and a BLE beacon I settled on using our iPhones arriving home to automatically open our garage doors.

PeterAlexander75 commented 1 year ago

Just jumping on this, it would be great to see an actual battery level that is not tied to an accessory. i.e. a light with a level that is representative of the current charge level.

nfarina commented 1 year ago

Battery level lightbulb is now supported in the latest version of the plugin!