Tesla Binding - exception occurred while parsing data

Hey,

since I’ve updated openHAB to v4.3.0 I receive the following error message while accessing my Tesla Model 3 Highland:

2024-12-20 20:44:06.661 [ERROR] [internal.handler.TeslaVehicleHandler] - An exception occurred while parsing data received from the vehicle: 'java.lang.NumberFormatException: Expected an int but was 1689280382089412 at line 1 column 49 path $.user_id'
2024-12-20 20:45:06.921 [ERROR] [internal.handler.TeslaVehicleHandler] - An exception occurred while parsing data received from the vehicle: 'java.lang.NumberFormatException: Expected an int but was 1689280382089412 at line 1 column 49 path $.user_id'
2024-12-20 20:45:07.915 [ERROR] [internal.handler.TeslaVehicleHandler] - An exception occurred while parsing data received from the vehicle: 'java.lang.NumberFormatException: Expected an int but was 1689280382089412 at line 1 column 49 path $.user_id'

Currently, no item is working as expected. Any ideas on how to fix this issue?

I have the same thing on my Model Y too.

2024-12-23 10:45:46.929 [ERROR] [internal.handler.TeslaVehicleHandler] - An exception occurred while parsing data received from the vehicle: 'java.lang.NumberFormatException: Expected an int but was 2252370934550334 at line 1 column 50 path $.user_id'

2024-12-23 10:45:55.239 [ERROR] [internal.handler.TeslaAccountHandler] - An exception occurred while connecting to the Tesla back-end: 'java.lang.NumberFormatException: Expected an int but was 2252370934550334 at line 1 column 50 path $.user_id'

I have the same problem after this update, too:

An exception occurred while parsing data received from the vehicle: 'java.lang.NumberFormatException: Expected an int but was 1689255436789012 at line 1 column 49 path $.user_id'

I get a different error, but also only since the installation of 4.3.0:

2024-12-23 20:27:37.214 [ERROR] [internal.handler.TeslaAccountHandler] - An exception occurred while connecting to the Tesla back-end: 'ID segment 'null' contains invalid characters. Each segment of the ID must match the pattern [\w-]*.'
java.lang.IllegalArgumentException: ID segment 'null' contains invalid characters. Each segment of the ID must match the pattern [\w-]*.

Exactly same issue today after updating my openhab to latest version…

2024-12-24 00:14:05.361 [ERROR] [internal.handler.TeslaVehicleHandler] - An exception occurred while parsing data received from the vehicle: 'java.lang.NumberFormatException: Expected an int but was 16892502
88525655 at line 1 column 49 path $.user_id'

Just a little update… I just try to downgrade my openhab. It works now.
If needed:

apt remove openhab-addons openhab
apt install openhab=4.2.3-1 openhab-addons=4.2.3-1

just wait a moment since system is finishing to initialize.
now i just return to 4.2.3 with tesla binding in 4.2.3 too… now i can get tesla status in OH and wait this issue fixed before update my system

will this be fixed or is this now legacy …

Has anyone raised a bug? I’m guessing [tesla] Add null annotations by lsiepel · Pull Request #17582 · openhab/openhab-addons · GitHub broke things, but also looks like @Kai tested it.

It’s running fine for me, yes. Has anybody created an issue on GitHub?

From the exception messages above my educated guess is that

  • the user is field @lsiepel added to VehicleData should be of type long, not int
  • given the nature of the field, it probably affects only new users/accounts, which is why it doesn’t affect @Kai

Either way, fix should be pretty simple…

2 Likes

@mikooflo Could you verify the fix with the provided jar from the PR.

  1. Make sure you have openHAB 4.3.0
  2. Uninstall the current binding (all things, channels and configuration remains available)
  3. Drop the jar into your addon folder.
  4. Observe the new behavior and please report your results.
2 Likes

FYI I submitted ticket [Tesla] An exception occurred while parsing data received from the vehicle · Issue #17984 · openhab/openhab-addons · GitHub

loaded addon and now initialised and disable and enabled thing ,

its working now !!
thanks

note the usual error:

Cannot find channel type: tesla:allowwakeup

I confirm its working now.

Thanks for the job !

It’s working - thank you!