openhab / openhab-addons

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

[tellstick] HTTP 401 Error #16242

Open andrewfg opened 10 months ago

andrewfg commented 10 months ago

I still use Telldus live bridge, but it seams to not work for me with new jar "org.openhab.binding.tellstick-4.2.0-SNAPSHOT.jar"

Request [http://pa-api.telldus.com/xml/devices/list?supportedMethods=19] failed: ExecutionException HTTP request returned status code 401
2024-01-07 15:06:53.774 [WARN ] [ternal.live.TelldusLiveBridgeHandler] - Failed to update
org.openhab.binding.tellstick.internal.live.TelldusLiveException: HTTP request returned status code 401
    at org.openhab.binding.tellstick.internal.live.TelldusLiveDeviceController.callRestMethod(TelldusLiveDeviceController.java:299) ~[?:?]
    at org.openhab.binding.tellstick.internal.live.TelldusLiveBridgeHandler.updateDevices(TelldusLiveBridgeHandler.java:155) ~[?:?]
    at org.openhab.binding.tellstick.internal.live.TelldusLiveBridgeHandler.refreshDeviceList(TelldusLiveBridgeHandler.java:124) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
    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:1136) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
    at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.util.concurrent.ExecutionException: HTTP request returned status code 401
    at org.openhab.binding.tellstick.internal.live.TelldusLiveDeviceController.innerCallRest(TelldusLiveDeviceController.java:350) ~[?:?]
    at org.openhab.binding.tellstick.internal.live.TelldusLiveDeviceController.callRestMethod(TelldusLiveDeviceController.java:290) ~[?:?]
    ... 8 more

Originally posted by @dabj123 in https://github.com/openhab/openhab-addons/issues/16220#issuecomment-1880071877

andrewfg commented 10 months ago

an HTTP 401 error means 'authentication failed' so check your login credentials please.

still recieve 401 or 429.

these are TWO different issues..

I am guessing that if the HTTP 401 error is fixed, then there will not be any retries, so the HTTP 429 error will probably go away.

Request [http://pa-api.telldus.com/xml/devices/list?supportedMethods=19] failed: ExecutionException HTTP request returned status code 401

OAuth Verification Failed: Can't verify request, missing oauth_consumer_key or oauth_token

I have renew new keys etc. Maybe TellStick have new logic in the new api to handle OAuth Verification...

https://api.telldus.com/documentation/live

andrewfg commented 10 months ago

@dabj123 the bridge configuration asks for the configuration parameters below .. the readme and the api documentation say you need to follow four steps. Probably you must redo all of those four mentioned steps since the API is on a new url and any keys associated with the old url will almost certainly not be valid for the new one.

Note: that when renewing the keys, anywhere that it mentions the old url https://api.telldus.com in the documentation you obviously need to use the new url https://pa-api.telldus.com instead.

public class TelldusLiveConfiguration {
    public String publicKey;
    public String privateKey;
    public String token;
    public String tokenSecret;
}
dabj123 commented 10 months ago

You will get "429 Too Many Requests", when you try to surf to https://pa-api.telldus.com/ and click a round... I think telldus have som problem with their server.

andrewfg commented 10 months ago

telldus have som problem with their server.

Can you ask them?

dabj123 commented 10 months ago

Certainly, I have already sent them an email. I will let you know when I receive a response.

dabj123 commented 10 months ago

https://x.com/telldus_status/status/1732778890391609597?s=20

andrewfg commented 10 months ago

^ No news since December 7th 2023..