openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.58k forks source link

[tesla binding] API not responsive to invoking vehicle_config, drive_state, vehicle state: error 404: not found. #14894

Closed hlemmens closed 1 year ago

hlemmens commented 1 year ago
2023-04-28 11:03:55.636 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_config
2023-04-28 11:03:55.815 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_config: 404: Not Found
2023-04-28 11:03:58.470 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state
2023-04-28 11:03:58.654 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request drive_state: 404: Not Found
2023-04-28 11:03:59.471 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_state
2023-04-28 11:03:59.655 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_state: 404: Not Found
2023-04-28 11:04:13.470 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state
2023-04-28 11:04:13.653 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-04-28 11:04:13.660 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request drive_state: 404: Not Found- 

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for Bugs)

1. 2.

Context

Your Environment

theater commented 1 year ago

Just wanted to confirm that since today I have the same issue. Probably they have changed some endpoints or the structure of the response... :(

theater commented 1 year ago

Probably this is related. Not sure if this repo is used as an API source: https://github.com/timdorr/tesla-api/issues/711

humphreysl commented 1 year ago

<!-2023-04-28 11:03:55.636 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_config 2023-04-28 11:03:55.815 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_config: 404: Not Found 2023-04-28 11:03:58.470 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state 2023-04-28 11:03:58.654 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request drive_state: 404: Not Found 2023-04-28 11:03:59.471 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_state 2023-04-28 11:03:59.655 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_state: 404: Not Found 2023-04-28 11:04:13.470 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state 2023-04-28 11:04:13.653 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds) 2023-04-28 11:04:13.660 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request drive_state: 404: Not Found- Provide a general summary of the issue in the Title above -->

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for Bugs)

Context

Your Environment

  • Version used: (e.g., openHAB and add-on versions)
  • Environment name and version (e.g. Chrome 76, Java 8, Node.js 12.9, ...):
  • Operating System and version (desktop or mobile, Windows 10, Raspbian Buster, ...):

I have exactly the same issue as here on my OpenHAB instance. Only started last night (27/4/2023 at 9pm UK time).

thekev commented 1 year ago

Another confirmation here. A number of projects are scrambling to fix their implementations today.

hlemmens commented 1 year ago

It seems a new endpoint has been created by Tesla. See https://github.com/jonasman/TeslaSwift/issues/138

Anyone able to implement thos in the binding?

kaikreuzer commented 1 year ago

I just noticed that issues in the logs as well (didn't see this issue here the past days). I'll have a look at what I can do - not sure yet, what impact the API changes will have on the functionality of the binding...

openhab-bot commented 1 year ago

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

https://community.openhab.org/t/tesla-binding-updates-stopped-suddenly/146389/12

kaikreuzer commented 1 year ago

I think I managed to fix it and have created https://github.com/openhab/openhab-addons/pull/14922 for it.

phuongpham commented 1 year ago

I think I managed to fix it and have created #14922 for it.

Great! Will this fix work for 3.4.x as well?

kaikreuzer commented 1 year ago

Once merged, I will check whether it is feasible to backport it to 3.4.x.

kaikreuzer commented 1 year ago

@phuongpham You might want to test the jar that I attached to https://github.com/openhab/openhab-addons/pull/14924.

phuongpham commented 1 year ago

@phuongpham You might want to test the jar that I attached to #14924.

great! I'm testing it now. Will give you some update tommorow. thanks for the great job!

phuongpham commented 1 year ago

@kaikreuzer ok it has been running for a while now. Everything looks fine

maisun commented 1 year ago

Is the jar only compatible with OH 4 or does it work with 3.4 as well?

phuongpham commented 1 year ago

Is the jar only compatible with OH 4 or does it work with 3.4 as well?

You can download the snapshot for 3.4.x from here https://github.com/openhab/openhab-addons/pull/14924 This one will work with OH 3.4

Or just run this command in karaf

bundle:update org.openhab.binding.tesla https://github.com/phuongpham/temp/raw/main/org.openhab.binding.tesla-3.4.4-SNAPSHOT.jar

maisun commented 1 year ago

Is the jar only compatible with OH 4 or does it work with 3.4 as well?

You can download the snapshot for 3.4.x from here #14924 This one will work with OH 3.4

Or just run this command in karaf

bundle:update org.openhab.binding.tesla https://github.com/phuongpham/temp/raw/main/org.openhab.binding.tesla-3.4.4-SNAPSHOT.jar

Thank you! I just download and drop the jar file into add-on folder (before I removed the official Tesla add-on). Everything works again, many thanks for the fix!

openhab-bot commented 1 year ago

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

https://community.openhab.org/t/tesla-binding-updates-stopped-suddenly/146389/14

kojid0 commented 1 year ago

First, thank you for fixing the binding! I've installed the jar and it started to work again. The only thing I have trouble with is channel "shiftstate". It seems to be stuck at "D". Any one else facing this bug?

cauer71 commented 1 year ago

also for me the channel eventstamp and shiftstare are not updated with the fixed version. thx for the fast fix :-)

phuongpham commented 1 year ago

also for me the channel eventstamp and shiftstare are not updated with the fixed version. thx for the fast fix :-)

I notice the same. At least everything else working :) I also see this error in the log:

TeslaEventEndpoint-tesla:modely:fe75f569dc:VIN : An error occurred in the session : java.util.concurrent.TimeoutException: Idle timeout expired: 30001/30000 ms

cauer71 commented 1 year ago

with the released version 3.4.4 the channel eventstamp and shiftstate are broken

kojid0 commented 1 year ago

FYI, I created a new issue.