Tesla Integration to Query Status and Send Commands to Your Car

How Do You Fix a Connection Timeout?

In most cases, a 504 Gateway Timeout error is a network error between the servers or a problem with an actual server. The error doesn't come from your end. So if you come across this type of status code, don't get frustrated. There are ways to fix it. Here's how:

Slight change to the driver only.
There has been a bug in the code all along with the disable/enable code where it would run multiple times in the morning as it rescheduled the next wakeup on the same time it was due to run.. till the seconds changed..

I added a pause command so that this no longer happens..

1 Like

New v3 tesla app and driver on my github for hubitat package manager..
also added a string in the old one that is has been Deprecated.

Seems successfull as it is coming up in my match existeing packages search

2 Likes

I'm already running your latest version by manually copying the raw app and driver groovy code, but I tried to install with HPM on my HE7 with the latest beta firmware and getting this error... just wanted to report. P.S. -- Thanks for all of your hard work on this project!!

thanks never knew what that field was for.. will update the repository.

try it now..

1 Like

Works now! :smiley:

I just tried to add this app using HPM and it is giving me this error. C-5 hub and it says I am on the lastest package.

slight change in driver..apparently the pause command is only for apps for drivers it is pauseExecution .. weird.

1 Like

I made the switch to the V3 version in Hubitat Package Manager and the cut-over went fairly seamless. Only issue is for some reason the new driver is not loading any of the "last known tire pressure reading" It was working when I manually copy/pasted the driver from GitHub but it is not working using the HPM version. Logs show no error.

Anyone else experiencing this issue?

last known only get set when you drive. as tire pressures are null till you actually drive for a little while. probably was reset when you installed the new stuff and will update once you drive..

2 Likes

Thanks guess time to go on a drive.

Installed properly now. Just have to figure out how to use it :+1:

Got it working painlessly. Thanks!

1 Like

For those that would like to display a Google Map on their dashboard that shows where your Tesla was last seen I've created a simple Google Maps iFrame driver that updates via a Rule that triggers anytime the Tesla driver latitude or longitude attributes change. Information on the driver is available at: How to create Dashboard Tile with Google Map that shows a device location - #4 by gomce62.web

Here is the rule

3 Likes

Readding my comment haha. Thought I had it figured out, but apparently I don't. Can you please help me with the last action that is on your screenshot? I can't seem to figure it out.

Thanks!

If you use the newer version of that driver the rules are easier . You need two but no variables... go back to that thread and look.at my rule examples for the mower i posted. You use the custom action and the car device with type of actuator. Also the rules will.not.work.in test mode. You need to acrualle move the car to test them as the variable %value% is only set when the trigger fires.

1 Like

I figured it out. This is what I had set (seems to work for me):

here is an export of the way i recommend the two rules. for ease of creating the rules just import and change your device to the tesla and also your map device.

Would it be possible to get setup instructions in full for the non super geniuses among the crowd? I've read through the whole thread and there is just too many things that were tried and working, now not, try this, get code from here, now there, k actually from here confusion.

How can I, as a new user of this app, installed from HPM, get the 2(?) Codes needed to begin the initial setup of the app in hubitat. It seems as though once those are entered, as of now they won't need refreshed or new ones entered? At least until Tesla changes something I'm sure.

Tried inputing the access and refresh tokens from here but it does not work.

Also tried the "Tesla tokens" Android app and not working either.

Both result in the same thing, Tesla Connect proceeds to the next page but the drop down box for selecting which Tesla to connect does not show any vehicle to select.

Tried both with and without checking the "activate endpoint for updating endpoint" option as I'm not sure if it was needed?

2 Likes

I agree that we should probably put together a comprehensive set of instructions, but this was cobbled together and there have been quite a few changes over the last few months. I think if we're in a good place now, the group of us who have been contributing to this can probably get something together. I'll start to work on something as I have time, but not sure how long it will be.

If you're getting an access token and a refresh token, you should be able to enter them in the Input new access token when expired? and Input new refresh token? fields - and it will work if they are valid. If I recall corretly, the first time through, your vehicle may not populate in the Which? field. If this happens, do the following from that vehicle selection screen:

  1. Click on the HE Apps menu item to go back to your list of apps.
  2. Reopen the Tesla Connect 3.0 App. Your tokens should be populated there.
  3. Without doing anything, click Next to go back to the vehicle selection screen. Your vehicle should now be selectable.

Let me know if this works.

I use the iOS Auth for Tesla app, but I'm not sure if there is an Android version.

This isn't required if you have the tokens. This was an interim workaround deployed when Tesla updated their API auth process. But it does remain a valid function that creates an HE endpoint which allows you to update your refresh tokens externally and periodically write them to the app to use. Instructions are posted above here.

1 Like

This worked! Thank you!

2 Likes