Tesla binding: (COMMUNICATION_ERROR): HTTP returncode 400

2.5.12 │ openHAB Add-ons :: Bundles :: Tesla Binding

It seems like Tesla have change the authentication method for Tesla API
It has already been discussed here:

Authentication - Tesla JSON API (Unofficial) (timdorr.com)

Tesla has deprecated the /oauth/token endpoint in favor of using auth.tesla.com


I’m on Tesla binding 3.0.1and I have same problem…
Installed Tesla binding a few days ago. Worked 2 days and, suddenly I get error message HTTP return code 400.
Is anyone working on updating the binding to work with new auth method?
I’m on Tesla binding 3.0.1…

Same for me on 2.5 and 3.0

I have the same issue on 3.0

Same for me :unamused:

Same for me.

An issue is available on GitHub: [Tesla] Authentication no longer working · Issue #10016 · openhab/openhab-addons · GitHub

I am new to GitHub - Where do you find information abort status of this issue, and how to update once resolved ?

any update on this ? is someone working on a solution ?
I’m using teslalogger and they have a fix for the authentication.


Has anyone found a way to make this work again ?
Thanks, Happy Easter!

Same issue here @billfor are you the binding developer?

I think @Kai has done work on it, but you can look here for issues: [Tesla] Authentication no longer working / getting blocked · Issue #10016 · openhab/openhab-addons · GitHub which was aleady posted by @RichardWegier . Try the 3.1.0.M2 version. I haven’t had time to…

1 Like

Thanks, I’m using 2.5.12 though, not 3.0 :frowning:

Does anybody knows if the authentification with the Tesla Account is working with activated multifactor authentification? I am running OH 3.0. and can not connect to my Tesla account. Tried the several bindings mentioned on GitHub…

I have tried the 3.1.0.M4 version and it does not work in this version either. Is there something I am doing wrong at my end or is this simply a non working binding at this moment?

openhab> openhab:tesla login
Username (email): [redacted]
Attempting login...
Failed to retrieve refresh token

I’m using the latest stable Openhab version and the binding works somewhat if you configure it with the GUI and enter your Tesla credentials.

But for me it only works for some hours, then it gets an communication error which can be solved if I stop my Model3 thing and start it again. I have to see how to fix this…

Yes, correct, from the GUI it actually works to set it all up. I did it the console way and since I got a clear error there I did not try the gui way.

I can add my Tesla and also bind some channels to items but most of the usable ones does not work (for me at least). When I try to open the trunk for instance, nothing happens. Range channel just gives an error. I have managed to get two things to work and that is flashing the lights and also open charge port.

I don’t get an error in the log when trying to open the trunk but I have not switched on debug log for the Tesla binding. If you need that, please tell me and I will dig deeper into the logs.

A while ago there was an app called EVCar that also could just open the charge port and some basic things like flashing the lights but that also stopped working, both as an app (hence me trying to get openHAB to work) and before that the trunk opening stopped working. I got the impression that this is a security change from Teslas side.

Now when I checked it doesn’t even work from their own app to open the trunk…

Edit: Range does actually work in a way, it is just that when you put the item on a page in OH3, it says ERR. But if I go to Analyze of the item, I see actual values - I think they are in meters.

I have exact same behavior. Works well for few hours. Then it seems to stop interacting with the Tesla servers, although in log everythings seems fine, but no updates arrive anymore. Cannot send actions anymore to Tesla (such as wake up, open trunk, stop charging etc…).
But when i Stop / Start the Thing in the GIU it behaves correct again, for a few hours.

Not sure what is going on.

same issue here :slightly_frowning_face:

Same error for me after few hours

2021-06-14 09:30:37.037 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle : Response : 200:org.apache.cxf.jaxrs.impl.ResponseImpl$1@1722372 
2021-06-14 09:30:37.041 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN 5YJ3E7EB3MF825XXX
2021-06-14 09:31:37.872 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle : Response : 200:org.apache.cxf.jaxrs.impl.ResponseImpl$1@fe762 
2021-06-14 09:31:37.875 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN 5YJ3E7EB3MF825XXX
2021-06-14 09:32:48.713 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle : Response : 408:org.apache.cxf.jaxrs.impl.ResponseImpl$1@1a8a724 
2021-06-14 09:32:48.715 [WARN ] [internal.handler.TeslaVehicleHandler] - Got an unsuccessful result, setting vehicle to offline and will try again 
2021-06-14 09:32:48.718 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: java.lang.NullPointerException: null at 
org.openhab.binding.tesla.internal.handler.TeslaVehicleHandler.checkResponse(TeslaVehicleHandler.java:564) ~[?:?] at 
org.openhab.binding.tesla.internal.handler.TeslaVehicleHandler.queryVehicle(TeslaVehicleHandler.java:709) ~[?:?] at 
org.openhab.binding.tesla.internal.handler.TeslaVehicleHandler.queryVehicleAndUpdate(TeslaVehicleHandler.java:737) ~[?:?] at 
org.openhab.binding.tesla.internal.handler.TeslaVehicleHandler.lambda$0(TeslaVehicleHandler.java:941) ~[?:?] at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?] at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?] at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at 
java.lang.Thread.run(Thread.java:829) [?:?]

same here with openHAB version 3.1.0