Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tesla] Latest vehicle update to 2023.38.x breaks location updates #15878

Closed
psmedley opened this issue Nov 11, 2023 · 17 comments · Fixed by #16029 or #16032
Closed

[tesla] Latest vehicle update to 2023.38.x breaks location updates #15878

psmedley opened this issue Nov 11, 2023 · 17 comments · Fixed by #16029 or #16032
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@psmedley
Copy link
Contributor

Seems that the latest 2023.38.x firmware update breaks location updates - since installing the app on my two cars, the location shows as 0,0.

There is a PR for Teslamate which provided a fix - Add endpoints parameter by jsight · Pull Request #3373 · adriankumpf/teslamate · GitHub

@psmedley psmedley added the bug An unexpected problem or unintended behavior of an add-on label Nov 11, 2023
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/tesla-latest-update-breaks-location/151128/1

@fapgomes
Copy link

Same here.

@Chrischan20
Copy link

I have the same issue.
Feel free to contact me if I can support for testing.

@psmedley
Copy link
Contributor Author

Looking at tdorssers/TeslaPy@38ff7da, I thought the fix was going to be as simple as changing:
https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaBindingConstants.java#L31

to

public static final String PATH_DATA_REQUEST = "vehicle_data?endpoints='location_data;charge_state;climate_state;vehicle_state;gui_settings;vehicle_config";

but after changing this and rebuilding it, I end up with a 404 error :(

@BillGOH
Copy link

BillGOH commented Nov 14, 2023

Same issue here. Btw: Teslamate (see post 1) update works.

@psmedley
Copy link
Contributor Author

https://smedley.id.au/tmp/org.openhab.binding.tesla-4.1.0-SNAPSHOT.jar contains a fix for this. Patch is in psmedley@3919cfb

patch is NOT tested with older firmwares.

@phuongpham
Copy link

https://smedley.id.au/tmp/org.openhab.binding.tesla-4.1.0-SNAPSHOT.jar contains a fix for this. Patch is in psmedley@3919cfb

patch is NOT tested with older firmwares.

Will this snapshot works on OH 4.0.4?

@psmedley
Copy link
Contributor Author

Yes, it's built with -Dohc.version=4.0.0 to ensure it's compatible with OH 4.0

@phuongpham
Copy link

Yes, it's built with -Dohc.version=4.0.0 to ensure it's compatible with OH 4.0

Can confirm this snapshot also works on OH 4.0.4!
Great work! Thanks

@Chrischan20
Copy link

It works for me as well on openHAB 4.0.2.
Thanks a lot! 👍

@Chrischan20
Copy link

https://smedley.id.au/tmp/org.openhab.binding.tesla-4.1.0-SNAPSHOT.jar contains a fix for this. Patch is in psmedley@3919cfb

patch is NOT tested with older firmwares.

Since updating to the patch on my OH4.0.2. I see the location jumping, every minute, between my home location and a fixed random location, as long as my Tesla is awake e.g. during charging:

2023-11-17 09:42:21.917 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:43:22.161 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:43:22.168 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:44:22.300 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:44:22.305 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:45:22.492 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:45:22.500 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:46:22.583 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:46:22.588 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:47:22.796 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18

Do you have the same issue?

@phuongpham
Copy link

https://smedley.id.au/tmp/org.openhab.binding.tesla-4.1.0-SNAPSHOT.jar contains a fix for this. Patch is in psmedley@3919cfb
patch is NOT tested with older firmwares.

Since updating to the patch on my OH4.0.2. I see the location jumping, every minute, between my home location and a fixed random location, as long as my Tesla is awake e.g. during charging:

2023-11-17 09:42:21.917 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:43:22.161 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:43:22.168 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:44:22.300 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:44:22.305 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:45:22.492 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:45:22.500 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:46:22.583 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:46:22.588 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:47:22.796 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18

Do you have the same issue?

I experienced the same. But I think this only happens when the location is home...

@Chrischan20
Copy link

https://smedley.id.au/tmp/org.openhab.binding.tesla-4.1.0-SNAPSHOT.jar contains a fix for this. Patch is in psmedley@3919cfb
patch is NOT tested with older firmwares.

Since updating to the patch on my OH4.0.2. I see the location jumping, every minute, between my home location and a fixed random location, as long as my Tesla is awake e.g. during charging:

2023-11-17 09:42:21.917 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:43:22.161 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:43:22.168 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:44:22.300 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:44:22.305 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:45:22.492 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:45:22.500 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:46:22.583 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18
2023-11-17 09:46:22.588 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.664188,XX.885738,18 to XX.870151,XX.885738,18
2023-11-17 09:47:22.796 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TeslaLocation' changed from XX.870151,XX.885738,18 to XX.664188,XX.885738,18

Do you have the same issue?

I experienced the same. But I think this only happens when the location is home...

Yes, you are right. Just verified: it happens only at my home location.

@psmedley
Copy link
Contributor Author

I'm seeing very small changes in location:
2023-11-18 05:29:11.883 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Tesla_Model_Y_Location' changed from -xx.90882,138.499632 to -xx.90875,138.499632
2023-11-18 05:29:11.893 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Tesla_Model_Y_Location' changed from -xx.90875,138.499632 to -xx.90882,138.499632

&

2023-11-18 05:29:12.077 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Tesla_Model_3_Location' changed from -xx.279515,138.447056 to -xx.2796,138.447056
2023-11-18 05:29:12.083 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Tesla_Model_3_Location' changed from -xx.2796,138.447056 to -xx.279515,138.447056

Model Y is sitting at home, Model 3 is sitting at our holiday house.In both cases - for me at least - it's about a 10m move.

@phuongpham
Copy link

Some new status with the current issue with location?

@kaikreuzer
Copy link
Member

@psmedley I have created #16029 with your patch, so that this can be included in 4.1.
Wrt changing locations at home, let us see if we can address this individually.

@kaikreuzer
Copy link
Member

I think I identified the root cause of the location updates and hope to have fixed it with #16032.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
7 participants