openhab / openhab-addons

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

[TESLA] HTTP returncode 444 #10003

Closed mboremski closed 3 years ago

mboremski commented 3 years ago

Since the Binding was running for weeks I now face this problem after a reboot of my openhab-server.

2021-01-31 12:00:57.362 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:models:c66b8d8025:5YJSA7E22HFXXXXX' changed from OFFLINE (BRIDGE_OFFLINE) to UNINITIALIZED
2021-01-31 12:00:57.395 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:models:c66b8d8025:5YJSA7E22HFXXXXX' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2021-01-31 12:00:57.398 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:account:0a847b56db' changed from OFFLINE (COMMUNICATION_ERROR): HTTP returncode 444 to UNINITIALIZED
2021-01-31 12:00:57.435 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:account:0a847b56db' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2021-01-31 12:00:58.057 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:models:c66b8d8025:5YJSA7E22HFXXXXX' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2021-01-31 12:00:58.068 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:account:0a847b56db' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2021-01-31 12:00:58.099 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:account:0a847b56db' changed from INITIALIZING to UNKNOWN
2021-01-31 12:00:58.181 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:models:c66b8d8025:5YJSA7E22HFXXXXX' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2021-01-31 12:00:58.198 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:models:c66b8d8025:5YJSA7E22HFXXXXX' changed from INITIALIZING to UNKNOWN
2021-01-31 12:00:59.003 [DEBUG] [internal.handler.TeslaAccountHandler] - Authenticating: Response : 444:org.apache.cxf.jaxrs.impl.ResponseImpl$1@81d4f6
2021-01-31 12:00:59.008 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:account:0a847b56db' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): HTTP returncode 444
2021-01-31 12:00:59.010 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tesla:models:c66b8d8025:5YJSA7E22HFXXXXX' changed from UNKNOWN to OFFLINE (BRIDGE_OFFLINE)
2021-01-31 12:01:14.006 [DEBUG] [internal.handler.TeslaAccountHandler] - Setting up an authenticated connection to the Tesla back-end
2021-01-31 12:01:14.872 [DEBUG] [internal.handler.TeslaAccountHandler] - Authenticating: Response : 444:org.apache.cxf.jaxrs.impl.ResponseImpl$1@1ea065c

after that this repeats every 20s:

2021-01-31 12:08:07.126 [DEBUG] [internal.handler.TeslaAccountHandler] - Setting up an authenticated connection to the Tesla back-end
2021-01-31 12:08:07.979 [DEBUG] [internal.handler.TeslaAccountHandler] - Authenticating: Response : 444:org.apache.cxf.jaxrs.impl.ResponseImpl$1@123ce4a

So far I tried to see if a connection from my openhab-server to Tesla-API-Servers is possible:

[12:04:21] openhabian@openhab3:~$ nmap -p 443 owner-api.teslamotors.com
Starting Nmap 7.70 ( https://nmap.org ) at 2021-01-31 12:04 CET
Nmap scan report for owner-api.teslamotors.com (205.234.31.120)
Host is up (0.18s latency).
PORT    STATE SERVICE
443/tcp open  https
Nmap done: 1 IP address (1 host up) scanned in 0.85 seconds

I also tried:

I dont know what else I can look for to find the rootcause of this Problem. Can anybody help me to find out whats wrong?

My System:

mboremski commented 3 years ago

Not sure if this is relevant. If I call https://owner-api.teslamotors.com/ from ma browser I get Blocked as awnser.

Also if I use another application to e.g. generate a Tesla-api-token I am facing this 444-error:

[12:29:18] openhabian@openhab3:~$ npx generate-tesla-token
npx: installed 142 in 43.519s
Hi! I'm going to generate a Tesla-login ‘token’ for you, which will allow
services to authenticate to Tesla on your behalf without giving them your
login information / password.
 (note: These will only be sent directly to Tesla, and not be saved anywhere!)
? The e-mail address you use to login on Tesla.com: my@email.com
? The password associated with that e-mail address: [hidden]
x Connecting to Tesla.com ...
  Error: Unknown API response: 444 CUSTOM
  - generate-tesla-token.js:39 generate
    [lib]/[generate-tesla-token]/generate-tesla-token.js:39:16
  - task_queues.js:97 processTicksAndRejections
    internal/process/task_queues.js:97:5
mboremski commented 3 years ago

I found the reason.. For unknown reason my (static) IP-Address seems to be on Teslas blacklist. :-/

Anyone has a hint on how to redirect binding-communication over a proxy? I configured a proxy like this:

https://www.raspberrypi.org/documentation/configuration/use-a-proxy.md

But the traffic for this binding is not routet over it.

I also tried some solution like this:

https://community.openhab.org/t/how-to-run-openhab-behind-an-internet-proxy/87295/5

my traffic for apt and other is routet over the proxy, but not the traffic that openhab generates..

Pedals2Paddles commented 3 years ago

Same problem for me just started. I just released and pulled a new IP address from my ISP, and it didn't help. Still dead in the water.

sjonez commented 3 years ago

This is because the old Tesla API has now been deprecated, which is what the OH Tesla binding uses.

You get blocked because the binding is hammering the old API trying to login. Stop the binding and your IP will get unblocked after around 15 minutes (I speak from experience!)

Another issue has been raised for changing the binding to use the new auth method #10016

mboremski commented 3 years ago

Can confirm, that after about 20min the usage of the TeslaApp is possible again. Looking forward to updates.

This one can be closed with #10016

kaikreuzer commented 3 years ago

I suggest to close this as a duplicate of https://github.com/openhab/openhab-addons/issues/10016.