nibi79 / worxlandroid

openHAB Binding for Worx Landroid
57 stars 20 forks source link

AWS new authorization (Worx connection blocked, App operates normal, waiting does not resolve) #73

Open LukasA83 opened 1 year ago

LukasA83 commented 1 year ago

Hi,

Since around 1 week I got the blocked message in the binding. I tried to wait 48 hours and also remove and add back the mower to my worx account without success. The Worx app operates normally.

Here is the log: 2022-10-21 10:20:42.915 [ERROR] [d.internal.WorxLandroidBridgeHandler] - Connection blocked from Worx, please try again in 24h 2022-10-21 10:22:50.060 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://id.eu.worx.com/oauth/token 2022-10-21 10:22:50.692 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"token_type":"Bearer","expires_in":3600,"access_token":"***hidden for debug log***","refresh_token":"***hidden for debug log***"} 2022-10-21 10:22:50.696 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/users/me 2022-10-21 10:22:50.858 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"id":267139,"user_type":"customer","push_notifications":true,"location":null,"mqtt_endpoint":"a1optpg91s0ydf-ats.iot.eu-west-1.amazonaws.com","actions_on_google_pin_code":null,"created_at":"2020-03-27 20:33:54","updated_at":"2022-10-21 04:45:35"} 2022-10-21 10:22:50.874 [INFO ] [d.internal.WorxLandroidBridgeHandler] - Start retrieving AWS certificate 2022-10-21 10:22:50.877 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/users/certificate 2022-10-21 10:22:51.024 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"id":160983,"pkcs12":"***hidden for debug log***","active":false,"created_at":"2020-04-10 11:21:16","updated_at":"2020-04-10 11:21:16"} 2022-10-21 10:22:51.034 [ERROR] [d.internal.WorxLandroidBridgeHandler] - Connection blocked from Worx, please try again in 24h 2022-10-21 10:23:43.735 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://id.eu.worx.com/oauth/token 2022-10-21 10:23:44.169 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"token_type":"Bearer","expires_in":3600,"access_token":"***hidden for debug log***","refresh_token":"***hidden for debug log***"} 2022-10-21 10:23:44.175 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/users/me 2022-10-21 10:23:44.236 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"id":267139,"user_type":"customer","push_notifications":true,"location":null,"mqtt_endpoint":"a1optpg91s0ydf-ats.iot.eu-west-1.amazonaws.com","actions_on_google_pin_code":null,"created_at":"2020-03-27 20:33:54","updated_at":"2022-10-21 04:45:35"} 2022-10-21 10:23:44.251 [INFO ] [d.internal.WorxLandroidBridgeHandler] - Start retrieving AWS certificate 2022-10-21 10:23:44.254 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/users/certificate 2022-10-21 10:23:44.387 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"id":160983,"pkcs12":"***hidden for debug log***","active":false,"created_at":"2020-04-10 11:21:16","updated_at":"2020-04-10 11:21:16"} 2022-10-21 10:23:44.459 [ERROR] [d.internal.WorxLandroidBridgeHandler] - Connection blocked from Worx, please try again in 24h

Any idea?

foobar26 commented 1 year ago

@nibi79 I just added a pull request for I think is a working solution with only minor downsides. https://github.com/nibi79/worxlandroid/pull/79

foobar26 commented 1 year ago

For those who want to test, here the binary: https://github.com/foobar26/worxlandroid/releases/download/v3.4.3/org.openhab.binding.worxlandroid-3.4.3-SNAPSHOT.jar

nibi79 commented 1 year ago

I'm just wondering if too many connection attempts could be causing the problem. How long has your device been running without interruption? Mine has been running for 9 days.

I think we can completely remove the polling. It was only necessary in the past to maintain the connection.

Please test and report back, but we need a long-term test, not just 2 days.

foobar26 commented 1 year ago

Mine is running now for about 3 days, whereas I was blocked with the old version always on the first day. You are right, let's wait for a long-term test. I disabled the polling before but then you don't get these informational updates of the battery. I have some rules running to deactivate the power plug if battery is fully loaded and the mower is in idle state. This doesn't work reliably if you don't poll at least every hour.

nibi79 commented 1 year ago

I found a bug in my implementation that triggered too many reconnections. I will provide you a new version for testing later.

With this buggy version, I had been reconnecting every 15 minutes and it wasn't working.

foobar26 commented 1 year ago

During my tests I had reconnects every 5 minutes without a problem. For the last 3 days it's reconnecting every 10 minutes. I'm quite sure it's related to the polling happening too often. By doing so you create traffic that worx / Positec might be charged with as it is running in the cloud.

nibi79 commented 1 year ago

I'm quite sure it's related to the polling happening too often. By doing so you create traffic that worx / Positec might be charged with as it is running in the cloud.

I had also considered that, the solution would be to modify the polling, just like you did.

I will try to apply your changes tomorrow and make a new version available so that more people can test it (or you can test the version provided by @foobar26 ).

cinadr commented 1 year ago

Hi! What are the recommended values for @foobar26 test version of Refresh status interval, Polling interval, Reconnect interval? I use 1200, 599, 300 respectively.

nibi79 commented 1 year ago

here is a new beta: https://github.com/nibi79/worxlandroid/releases/tag/v3.4.1-beta

you can disable a job (polling,refreshStatus, reconnect) by setting the interval to 0

nibi79 commented 1 year ago

by setting the reconnectInterval to 0, the old logic is used (reconnect after ~60 minutes)

foobar26 commented 1 year ago

by setting the reconnectInterval to 0, the old logic is used (reconnect after ~60 minutes)

great, thanks for merging this so quickly and even adding a new logic for deactivating certain jobs.

@cinadr for me the values that work are refreshStatusInterval=3600, pollingInterval=3600, reconnectInterval=599. But please use the version from @nibi79, mine had a small bug that ignored the reconnectInterval setting and always used 300 seconds.

cinadr commented 1 year ago

I've been testing this for two days. No disconnects. Thank you!

foobar26 commented 1 year ago

Thanks for the feedback. Mine is running now for a week without any issues. I would propose to close this issue.

Mercur13 commented 1 year ago

Sorry, but mine had worked only for 28 hours. Now also the Landroid App shows "no connection" (Verbindungsfehler). No changes can be made. :-(

foobar26 commented 1 year ago

Sorry to hear that. What values are you using for the three config parameters? If polling is set to a too small value, you still might get blocked.

Mercur13 commented 1 year ago

Refresh: 1200; Polling: 599; Reconnect: 300 (Defaults) Reading from log it reconnects every 10 minutes

Edit: Contrary to the state before the new binding, however, the bridge and the mower now remain online. It looks like the Worx server is blocking my access. Now I'll wait 24 hours......

foobar26 commented 1 year ago

Refresh is ok, reconnect also. But the polling must be set to a much higher value. Please take 3600. This should fix it.

Mercur13 commented 1 year ago

ok I'll change that Thanks !

nibi79 commented 1 year ago

with these settings (reconnect disabled) refreshStatusInterval=300, pollingInterval=3600, reconnectInterval=0 it has now been running for 5 days without any problems. So maybe polling is the actual problem!? How does it look for you?

cinadr commented 1 year ago

My settings are:
refreshStatusInterval=3600, pollingInterval=3600, reconnectInterval=599 In my logs at log level INFO every ten minutes I have: 2023-04-18 14:32:56.150 [INFO ] [id.internal.WorxLandroidMowerHandler] - reconnecting So can I set refresh to 360 seconds but polling to 10 minutes and disable reconnect? Have you tested the app simultaneously?

P.S: I have no disconnects so far since you published the latest version.

olflo commented 1 year ago

Any ideas why I can't change the reconnectInterval to "0"?

A message keeps telling me that it has to be equal to or larger than "30". I copied the latest binding version and restarted openHAB.

nibi79 commented 1 year ago

set refresh to 360 seconds

yes

polling to 10 minutes

no, I think the value is too small. I have set the value to 3600.

disable reconnect

at least it works for me

I copied the latest binding version and restarted openHAB.

hmm, are you sure? The latest version should fix this issue. I replaced the latest file a week ago.

olflo commented 1 year ago

I just replaced the file again and still no success. Do I have to recreate both Things or should replacing the JAR and restarting openHAB do the trick?

cinadr commented 1 year ago

disable reconnect

at least it works for me

I cannot set reconnect to 0 as @olflo. I've updated my binding with the latest version from github repo (it is version 3.4.1). @foobar26 version is unreachable (it was version 3.4.0.202304130533). I didn't tried to set reconnect to 0 with the latter so I can't tell if it is a version problem or else.

nibi79 commented 1 year ago

Do you use .thing files or the GUI to configure your things ?

cinadr commented 1 year ago

GUI

olflo commented 1 year ago

GUI

same

nibi79 commented 1 year ago

ok, I only use file-based configuration, so I will check this.

foobar26 commented 1 year ago

disable reconnect

at least it works for me

I cannot set reconnect to 0 as @olflo. I've updated my binding with the latest version from github repo (it is version 3.4.1). @foobar26 version is unreachable (it was version 3.4.0.202304130533). I didn't tried to set reconnect to 0 with the latter so I can't tell if it is a version problem or else.

I deleted my repo after @nibi79 integrated my changes.

@olflo @cinadr did you try to clear the Openhab cache (see https://community.openhab.org/t/clear-the-cache/36424)? Sometimes replacing old binding versions doesn't work without it.

foobar26 commented 1 year ago

with these settings (reconnect disabled) refreshStatusInterval=300, pollingInterval=3600, reconnectInterval=0 it has now been running for 5 days without any problems. So maybe polling is the actual problem!? How does it look for you?

My instance is running now for over a week without any issue. For me setting a reconnect works best, because I experienced that the binding otherwise doesn't always detect if internet connection drops. Then it takes some time to get updates.

mitch-geht-ab commented 1 year ago

I cannot set reconnect to 0 as @olflo. I've updated my binding with the latest version from github repo (it is version 3.4.1). @foobar26 version is unreachable (it was version 3.4.0.202304130533). I didn't tried to set reconnect to 0 with the latter so I can't tell if it is a version problem or else.

I deleted my repo after @nibi79 integrated my changes.

@olflo @cinadr did you try to clear the Openhab cache (see https://community.openhab.org/t/clear-the-cache/36424)? Sometimes replacing old binding versions doesn't work without it.

same for me. have also cleared the cache with

systemctl stop openhab
openhab-cli clean-cache
systemctl start openhab

interestingly the worx binding disappeared and I had to reinstall it with

bundle:install https://github.com/nibi79/worxlandroid/releases/download/v3.4.1-beta/org.openhab.binding.worxlandroid-3.4.1.jar

but with this settings

Thing mower xxxxxxxxxxxxxxxxx "umv" [ refreshStatusInterval=300, pollingInterval=3600, reconnectInterval=0 ]

oh (3.4.2) complains about the 0

==> /var/log/openhab/events.log <==
2023-04-19 09:17:07.893 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'worxlandroid:mower:WorxAPI:xxxxxxxxxxxxxxxxx ' changed from UNINITIALIZED (HANDLER_CONFIGURATION_PENDING): {reconnectInterval=The value must not be less than 30.} to UNINITIALIZED (HANDLER_MISSING_ERROR)

just to clarify, the md5 of the jar is

d1215fb0327904edaeb86b757c6c0a13  org.openhab.binding.worxlandroid-3.4.1.jar
nibi79 commented 1 year ago

just to clarify, the md5 of the jar is

d1215fb0327904edaeb86b757c6c0a13  org.openhab.binding.worxlandroid-3.4.1.jar

Maybe something went wrong by uploading the jar file. I have just uploaded the jar again.

https://github.com/nibi79/worxlandroid/releases/download/v3.4.1-beta/org.openhab.binding.worxlandroid-3.4.1.jar

MD5 6ABEA9CE05EC7C96652736B73FEE9434

nibi79 commented 1 year ago

@mitch-geht-ab thank you for the hint

Let me know if this jar works for you

mitch-geht-ab commented 1 year ago

Let me know if this jar works for you

yes... now it works with

refreshStatusInterval=300, pollingInterval=3600, reconnectInterval=0

please increase the version number with any patch... or switch from semantic versioning to a mix of semantic for major and minor and replace patch 0.0.x on a daily timestamp base 0.0.yyyymmdd

Mercur13 commented 1 year ago

After changing the pollingrate to 3600 (hint from foobar) my Binding Version 09.03.23 works fine since 5 days ! What are changes to Binding Version 09.04.23 - only the defaults ?

By the way: I reported a problem with my Landroid-App (No Connection). The Worx-Support replied yesterday: "I would ask you to check the function of the app and your device in advance because we are already aware of the problem. The error was already being worked on over the Easter holidays"

nibi79 commented 1 year ago

Version 09.03.23

'03' was a typo

meyercg commented 1 year ago

Hi, I just installed the new version but without success...

`2023-04-24 13:12:32.789 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'worxlandroid:worxlandroidBridge:f86c460516' changed from UNINITIALIZED to INITIALIZING

2023-04-24 13:12:34.687 [ERROR] [worxlandroid.internal.mqtt.AWSClient] - Exception: software.amazon.awssdk.crt.mqtt.MqttException: The connection was closed unexpectedly.`

foobar26 commented 1 year ago

Hi, I just installed the new version but without success...

`2023-04-24 13:12:32.789 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'worxlandroid:worxlandroidBridge:f86c460516' changed from UNINITIALIZED to INITIALIZING

2023-04-24 13:12:34.687 [ERROR] [worxlandroid.internal.mqtt.AWSClient] - Exception: software.amazon.awssdk.crt.mqtt.MqttException: The connection was closed unexpectedly.`

Please check your settings are changed according to the above comments. Issue is not resolved just by using a different version of the binding. For me the current version with the correct settings works now for about two weeks.

meyercg commented 1 year ago

Hi @foobar26 I tried it today again without any change. And it works. Crazy. Thanks for your support.

mitch-geht-ab commented 1 year ago

WIth the last binding version I had a more or less stable connection until the 26th. Stopped working suddenly

2023-04-26 16:25:38.154 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - try to reconnect to AWS...
2023-04-26 16:25:38.154 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - reconnecting...
2023-04-26 16:25:38.158 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 0
2023-04-26 16:25:38.686 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connected to existing session!
2023-04-26 16:25:38.687 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - last connection resume 2023-04-26T16:25:38.687531
2023-04-26 16:25:38.687 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connection is available
2023-04-26 16:25:38.688 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS reconnected: true
2023-04-26 16:45:38.761 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 5134
2023-04-26 16:45:40.283 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - last connection resume 2023-04-26T16:45:40.283473
2023-04-26 16:45:40.284 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connection is available
2023-04-26 16:45:48.762 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - lastResumed: 2023-04-26T16:45:40.283473  interrupted 2023-04-26T16:45:38.761846 im: true
2023-04-26 17:05:40.417 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 5134
2023-04-26 17:05:41.941 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - last connection resume 2023-04-26T17:05:41.941559
2023-04-26 17:05:41.942 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connection is available
2023-04-26 17:05:50.418 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - lastResumed: 2023-04-26T17:05:41.941559  interrupted 2023-04-26T17:05:40.417403 im: true
2023-04-26 17:23:39.498 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - try to reconnect to AWS...
2023-04-26 17:23:39.499 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - reconnecting...
2023-04-26 17:23:39.501 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 0
2023-04-26 17:23:40.073 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connected to existing session!
2023-04-26 17:23:40.074 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - last connection resume 2023-04-26T17:23:40.074074
2023-04-26 17:23:40.074 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connection is available
2023-04-26 17:23:40.074 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS reconnected: true
2023-04-26 17:24:08.120 [DEBUG] [.worxlandroid.internal.mqtt.AWSTopic] - onMessage: {"cfg":{"id":1,"lg":"en","tm":"17:24:09","dt":"26/04/2023","sc":{"m":1,"distm":0,"ots":{"bc":0,"wtm":0},"p":0,"d":[["19:00",90,1],["19:00",90,0],["19:00",90,0],["19:00",90,1],["19:00",90,0],["19:00",90,0],["19:00",90,0]],"dd":[["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0]]},"cmd":0,"mz":[0,0,0,0],"mzv":[0,0,0,0,0,0,0,0,0,0],"rd":180,"sn":"xxxxxxxxxxxxxxxx","al":{"lvl":1,"t":30},"tq":0,"modules":{"DF":{"cut":1,"fh":1}}},"dat":{"mac":"98D86357F56C","fw":3.28,"fwb":1,"bt":{"t":19.6,"v":19.95,"p":100,"nr":281,"c":0,"m":1},"dmp":[2.4,-1.9,334.9],"st":{"b":20716,"d":273314,"wt":21051,"bl":35},"ls":1,"le":0,"lz":0,"rsi":-64,"lk":1,"act":1,"tr":0,"conn":"wifi","rain":{"s":0,"cnt":0},"time":{"r":0,"l":0},"modules":{"DF":{"stat":"ok"}}}}
2023-04-26 17:24:26.942 [DEBUG] [.worxlandroid.internal.mqtt.AWSTopic] - onMessage: {"cfg":{"id":0,"lg":"en","tm":"17:24:28","dt":"26/04/2023","sc":{"m":1,"distm":0,"ots":{"bc":0,"wtm":0},"p":0,"d":[["19:00",90,1],["19:00",90,0],["19:00",90,0],["19:00",90,1],["19:00",90,0],["19:00",90,0],["19:00",90,0]],"dd":[["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0]]},"cmd":0,"mz":[0,0,0,0],"mzv":[0,0,0,0,0,0,0,0,0,0],"rd":180,"sn":"xxxxxxxxxxxxxxxx","al":{"lvl":1,"t":30},"tq":0,"modules":{"DF":{"cut":1,"fh":1}}},"dat":{"mac":"98D86357F56C","fw":3.28,"fwb":1,"bt":{"t":19.6,"v":19.94,"p":100,"nr":281,"c":0,"m":1},"dmp":[2.4,-1.9,334.9],"st":{"b":20716,"d":273314,"wt":21051,"bl":35},"ls":1,"le":0,"lz":0,"rsi":-64,"lk":1,"act":1,"tr":0,"conn":"wifi","rain":{"s":0,"cnt":0},"time":{"r":0,"l":0},"modules":{"DF":{"stat":"ok"}}}}
2023-04-26 17:43:40.130 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 5134
2023-04-26 17:43:41.652 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - last connection resume 2023-04-26T17:43:41.652765
2023-04-26 17:43:41.653 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connection is available
2023-04-26 17:43:50.131 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - lastResumed: 2023-04-26T17:43:41.652765  interrupted 2023-04-26T17:43:40.130367 im: true
2023-04-26 18:03:41.786 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 5134
2023-04-26 18:03:43.290 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - last connection resume 2023-04-26T18:03:43.290936
2023-04-26 18:03:43.291 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connection is available
2023-04-26 18:03:51.787 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - lastResumed: 2023-04-26T18:03:43.290936  interrupted 2023-04-26T18:03:41.786301 im: true
2023-04-26 18:23:43.422 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 5134
2023-04-26 18:23:53.423 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - lastResumed: 2023-04-26T18:03:43.290936  interrupted 2023-04-26T18:23:43.422311 im: false
2023-04-26 18:23:53.423 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connection closed -> reconnectToWorx

I detected it today by accident because my improved rain-delay-rule hadn't worked as expected. But it was the offline UMV. After disable/enable the thing the binding worked again.

I thought there is an exception to handle a diconnect from AWS? reconnectToWorx

my settings are refreshStatusInterval=300, pollingInterval=3600, reconnectInterval=0

martinlindjarv commented 1 year ago

I do have kind of same error with MD5 6ABEA9CE05EC7C96652736B73FEE9434 of binding.

2023-05-09 09:42:19.263 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://id.eu.worx.com/oauth/token
2023-05-09 09:42:19.651 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"token_type":"Bearer","expires_in":3600,"access_token":"***hidden for debug log***","refresh_token":"***hidden for debug log***"}
2023-05-09 09:42:19.651 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - API connected: true
2023-05-09 09:42:19.652 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/users/me
2023-05-09 09:42:19.732 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"id":370540,"user_type":"customer","push_notifications":true,"location":null,"mqtt_endpoint":"a1optpg91s0ydf-ats.iot.eu-west-1.amazonaws.com","actions_on_google_pin_code":null,"created_at":"2020-09-04 18:50:09","updated_at":"2020-09-16 05:59:31"}
2023-05-09 09:42:19.732 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/product-items?status=1
2023-05-09 09:42:19.824 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: [{"id":123456,...}]
2023-05-09 09:42:19.833 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - try to connect to AWS...
2023-05-09 09:42:20.242 [ERROR] [worxlandroid.internal.mqtt.AWSClient] - Exception: software.amazon.awssdk.crt.mqtt.MqttException: The connection was closed unexpectedly.
2023-05-09 09:42:20.242 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connected: false

and settings are: refreshStatusInterval=300, pollingInterval=3600, reconnectInterval=0

mitch-geht-ab commented 1 year ago

New AWSClient Error

2023-05-18 00:01:50.397 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - publish message -> null
2023-05-18 00:01:50.398 [DEBUG] [id.internal.WorxLandroidMowerHandler] - send polling message
2023-05-18 00:01:52.411 [DEBUG] [.worxlandroid.internal.mqtt.AWSTopic] - onMessage: {"cfg":{"id":1,"lg":"en","tm":"00:0...
2023-05-18 00:01:52.422 [DEBUG] [id.internal.WorxLandroidMowerHandler] - HOME | StatusCode: 1 - Home
2023-05-18 00:01:52.423 [DEBUG] [id.internal.WorxLandroidMowerHandler] - NO_ERR | ErrorCode: 0 - No error!
2023-05-18 00:04:50.952 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 5134
2023-05-18 00:05:00.953 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - lastResumed: 2023-05-17T23:47:55.749514  interrupted 2023-05-18T00:04:50.952306 im: false
2023-05-18 00:05:00.953 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS connection closed -> reconnectToWorx
2023-05-18 00:05:00.953 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - try to reconnect to AWS...
2023-05-18 00:05:00.954 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - reconnecting...
2023-05-18 00:05:04.221 [ERROR] [worxlandroid.internal.mqtt.AWSClient] - Exception: software.amazon.awssdk.crt.mqtt.MqttException: Time limit between request and response has been exceeded.
2023-05-18 00:05:04.222 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS reconnected: false
2023-05-18 00:05:04.790 [DEBUG] [worxlandroid.internal.mqtt.AWSClient] - connection interrupted errorcode: 0

Resolveable with an bundle:stop bundle:start... so can it be fixed in the binding?

nibi79 commented 1 year ago

Resolveable with an bundle:stop bundle:start.

Maybe it would be enough to disable and re-enable the bridge!?

so can it be fixed in the binding?

I am sure that this is possible. I'll take a look at this when I have time.

mitch-geht-ab commented 1 year ago

Maybe it would be enough to disable and re-enable the bridge!?

probably it is, but bundle stop start is also fast.

today another exception, maybe also handable with exception handling in the code

2023-05-24 01:51:55.114 [ERROR] [worxlandroid.internal.mqtt.AWSClient] - Exception: software.amazon.awssdk.crt.mqtt.MqttException: A query to dns failed to resolve.
2023-05-24 01:51:55.114 [DEBUG] [d.internal.WorxLandroidBridgeHandler] - AWS reconnected: false

was also resolvable with bundle stop start ;)

maybe you can implement an exception handler, when triggered check for x-times in an interval of y-minutes to reconnect.

MiniOh commented 1 year ago

For me too:

2023-05-24 15:12:14.619 [ERROR] [worxlandroid.internal.mqtt.AWSClient] - Exception: software.amazon.awssdk.crt.mqtt.MqttException: The connection was closed unexpectedly.

FranzSchi commented 11 months ago

Hello,

This summer I did not yet use the Plugin for my robomower because it got all the time blocked. "org.openhab.binding.worxlandroid-3.4.1.jar" is the Version that I'm using.,

I checked the Manual and it says set this values to avoid beeing blocked:

refreshStatusInterval | 1200 pollingInterval | 3600 reconnectInterval | 0

But if I set pollingItnervall to 3600 i get the error: Value must be less than or equal to 599.

Any ideas what should I do?

image

sihui62 commented 11 months ago

But if I set pollingItnervall to 3600 i get the error

I guess because of the extended time you did not use the binding you need to upgrade your Thing: delete it and recreate it. You should use the same UID to not have to adapt all your linked items.

foobar26 commented 11 months ago

Are you sure you are using the right version (https://github.com/nibi79/worxlandroid/releases/tag/v3.4.1-beta)? Could you please double check? Sometimes you have to delete the openhab cache (see above, https://github.com/nibi79/worxlandroid/issues/73#issuecomment-1514249281) so that a new version is being loaded. With the v.3.4.1-beta you should be able to set polling interval to 3600.

FranzSchi commented 11 months ago

Okay I've deleted the items now and wanted to add them again. But I did not found the Worx Landroid in the Things "add" dialog. Did I missed something?

image

openhab> bundle:list | grep worx 34 x Active x 80 x 3.4.1 x openHAB Add-ons :: Bundles :: worxlandroid Binding

sihui62 commented 11 months ago

Did I missed something?

Sometimes a restart of the openHAB service is needed if I remember correctly (I am not on 3.x anymore). Make sure you are on a 3.4.x version of openHAB, I am pretty sure with older versions the binding does not work.

If you can't get it to work you should open a thread in the community forum as this github issue is for our fellow developers and should not be used for individual setup problems.