Tesla Connect 3.0 - Integration to Query Car Status - Deprecated, see below for replacment

@kahn-hubitat, I would have another ask if you are interested - Would it be possible to add the command to close the trunk? There is a command to open it, but not to close it. Thank!

Question - Is there a concern with the number of times the driver polls the car? If not, and assuming it doesn’t do this already, would there be value in adding an option to poll the vehicle when commands are sent? Ex.: lock doors, the driver updates showing they are locked.

BTW - What a great app! Thank you!

This is actually the same activate trunk command as the open command in the Tesla API with a which_trunk parameter to specify the front or rear. The rear command is a toggle which either opens or closes the rear trunk depending on current state. So the “openTrunk” command on the device is a bit of a misnomer.

The vehicle state data does include an ft and rt response of 1 or 0 to show front or rear trunk open or closed, but it does look like that isn’t currently being pulled into this app. If you had that, you could use the status in a condition to send the command if the current state doesn’t match the desired state. So for that purpose, it would be great to have it added in.

As for the poll after a command, I believe the app does this or at least waits for the response to provide an update, because I always seem to get an updated state soon after the command is issued. If you’re using in a rule, you can always add a short delay and a refresh. I have a couple rules that do this, and I’ve never noticed a rate limit.

1 Like

Also many cars like the older model 3s dont have powered trunks.

True! And I’ve just tested it and can confirm that using the “Open Rear Trunk” button will both open and close it.

1 Like

Also missing on some older Model S and X, as it was part of an option package until 2018.

I’m fairly certain X always had power open/close. I had a 2017 X, and it did.

1 Like

Given all the other powered doors, you are right it might have not been an option. It was certainly standard when I bought my X in late 2018. But my S from early 2017 doesn't have it (again, it was an option and I choose not to spend on it).

Hi
I saw some vampire drain (1%-3%) after installing (not saying it is this app but obviously multiple polling apps can wake the car and cause the drain). I did set the time so that the car is sleeping during the night but ideally I would like to use a button to refresh the app when pushed in the dashboard UI. For this I tried a virtual button and RM to refresh and although the command is executed the current (battery) state is not updated. Also tried to modify the driver to include eg 6hour interfal (resulted in a method error.... I guess I am not that familiar with coding). For me ideally the interval should be "user defined" or even better "manual" having an additional attribute,
Cheers

1 Like

For me, when I force a refresh, the battery current state is refreshed. It does take a few seconds to refresh though…

On the device (the car, not the app), there’s an option to turn off or adjust refresh. I have mine turned off, and then I use a rule to refresh the car on interval, depending on location. As for battery drain, I have refresh set to 5 min and 1 hour, depending on location, and my car still goes to sleep (I can see the long periods of sleep in TeslaFi). You should be able to make some adjustments to allow your car to sleep and prevent too much vampire drain.

Refreshes also happen for battery within a few seconds for me.

1 Like

Hi

I tried a rule to force refresh but if I disable the refresh in the app, like you have, then I see in the log the refresh command is disabled immediately after the refresh request. So how do you get past that? Maybe I am missing something. Thanks.

Refresh being disabled in.the app has nothing to do with manual refresh not working. Your button approach should work fine. What you probably are seeing us the car going to sleep and in that case the refresh is unreliable. For that you'll need to try a wake pause another wake possibly then pause and then finally a refresh.

Aldo your drain issue is something else not related to this app or refreshes. We are away from home and i have mine sleep at night and refresh every fifteen minutes during the day and for 2 months now i have not charged the car and have no drain. More than likely with the heat your cabin overheat is kicking in or something else.

You are correct, the refresh works reliably when I wake the car via the Tesla app. Would it be an option to have a refresh when to car arrives eg at home, ie include a refresh based on geo location? That is the whole point for me, ie to see in the Hubitat dashoard UI, how much charge I still have when parked at home (no need to have every 15min an update once parked at home).

Always had 0% drain untill I noticed it after installing the app.... maybe because intially I was probably polling 24/7. I have configured it to sleep approx 8 hours during the night....drain is now 0-1% (which still be not related to this app)......

That can be done easily through a rule. Here is.my rule that i posted earlier.inbthe thread i believe.

2 Likes

If you have iPhone and use HomeKit or Homebridge integration, you can use a HomeKit presence automation that turns on a switch to indicate arrival (e.g., when any person arrives) and use that to trigger a refresh. (Probably accomplish something similar with Android and Google Home) I have poor cellular service at my house and found this is the most accurate/responsive for me. You could also use iPhone Wi-Fi Presence Sensor by Joel Wetzel (on Habitat Package Manager) to detect when your Tesla connects to your Home Wi-Fi, but this one requires a bit of RM wizardry since the Wi-Fi will disconnect/connect when your car sleeps/wakes.

I also set up a “teslaLocation” string variable for my primary locations that is set based on latitude/longitude values reported by the car, but this is quite complex to achieve. This is how I do certain things with other rules in RM like automatically turn on valet mode when I arrive at my parking garage in the city and set different refresh intervals and charge levels based on location.

I also use TeslaFi and a Homebridge plugin called Homebridge TeslaFi that brings status and commands directly to HomeKit Home app. I have set up HomeKit automations from that which refreshes my Tesla using this app whenever charging starts/stops, sentry mode enables/disables, etc. this ensures that my Tesla in Hubitat is always updated upon state changes. (This is frequent because TeslaFi polls the car every minute.)

I know this sounds like a lot, but I’m a control freak. :roll_eyes:

1 Like

As i said none of that is necessary, as long as you set your home location in the car the app will flag the car as present as shown in my rule above.

1 Like

Here's my similar method in WebCoRE :wink:

Unfortunately that’s not the case for me. I have my home location set in my car, and the presence indicator in this app has never updated. What value from the Tesla API response is being used to indicate “presence” in the app?