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

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

Open
LukasA83 opened this issue Oct 21, 2022 · 151 comments
Assignees
Labels
bug Something isn't working

Comments

@LukasA83
Copy link
Contributor

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?

@Incom0de
Copy link

No ideas from my side, but I have this problem also since 3 days.

@nibi79
Copy link
Owner

nibi79 commented Oct 21, 2022

I also have no idea

@sihui62
Copy link

sihui62 commented Oct 21, 2022

Same here, there are several more reports:

https://community.openhab.org/t/worx-landroid-binding/95246/223

@PilotIoTSystems
Copy link

The same thing happened to me... I did the following:

  1. I noticed the blocking after restarting an OpenHab
  2. The Android app still works.
  3. The Desktop App also worked after that!
  4. After 48 hours the blocking did not disappear (Disabled Worx Bridge), I deleted it and added the mower again in the Android app
  5. Then it seems to work in the Android app, the Desktop APP does not work for now.

@LukasA83
Copy link
Contributor Author

LukasA83 commented Oct 21, 2022

But did it solve the issue in Openhab, @PilotIoTSystems ?

@PilotIoTSystems
Copy link

@LukasA83 No, there is no solution yet! It still doesn't work!

@mitch-geht-ab
Copy link

mitch-geht-ab commented Nov 4, 2022

Have do some research, API Req./Resp. looks good, get Bearer token + mqtt_endpoint (from .../users/me) + certificate (from .../users/certificate) but it seems that there is no mqtt connection req. to the mqtt_endpoint.
the only thing I see is the dns lookup for the endpoint but no try to connect to one of these ip nor a connection to tcp 1883 or tcp 8883.
@nibi79 : what would be the expected behaviour after getting the client certificate (pkcs12)? I would expect a mqtt connection to mqtt_endpoint.

2022-11-04 18:21:18.861 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://id.eu.worx.com/oauth/token
2022-11-04 18:21:19.453 [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-11-04 18:21:19.453 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/users/me
2022-11-04 18:21:19.746 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"id":666666,"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-07-12 10:28:34","updated_at":"2022-09-28 2022-11-04 18:21:18.861 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://id.eu.worx.com/oauth/token
2022-11-04 18:21:19.453 [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-11-04 18:21:19.453 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/users/me
2022-11-04 18:21:19.746 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"id":666666,"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-07-12 10:28:34","updated_at":"2022-09-28 16:25:37"}
2022-11-04 18:21:19.749 [INFO ] [d.internal.WorxLandroidBridgeHandler] - Start retrieving AWS certificate
2022-11-04 18:21:19.750 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/users/certificate
2022-11-04 18:21:19.896 [DEBUG] [nternal.webapi.request.WebApiRequest] - Worx Landroid WebApi Response: {"id":5555555,"pkcs12":"***hidden for debug log***","active":false,"created_at":"2020-07-12 10:59:29","updated_at":"2020-07-12 10:59:29"}
2022-11-04 18:21:19.896 [ERROR] [d.internal.WorxLandroidBridgeHandler] - Connection blocked from Worx, please try again in 24h

I tried your 3.2-beta binding
290 │ Active │ 80 │ 3.0.0.202210051231
with openhab 3.3.0-1 on debian11

@nibi79
Copy link
Owner

nibi79 commented Nov 4, 2022

When you get the response with the certificate you get also a value 'active' and this value is false. And when the certificate is not valid/active it is not possible to get a mqtt connection. Some other Implementation (e.g. iobroker) use a solution without certificate but I have not been able to solve it this way yet.

@nibi79
Copy link
Owner

nibi79 commented Nov 4, 2022

and I also asked POSITEC (provider of the API) for support but so far without success!

@mitch-geht-ab
Copy link

... when the certificate is not valid/active it is not possible to get a mqtt connection. ...

hmmm, thats true, when I have a look to my older logs it was always active:true. Last time at the 6th Oct.

and this problem hits only a few users? strange. what's your status? still active:true?

had a look to the received certificate and it looks good so far.
Interestingly with a long lifetime

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            d0:93:8b:38:e7:39:83:0c:74:0d:55:50:xxxxxxxxxxxxxxx
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: OU = Amazon Web Services O=Amazon.com Inc. L=Seattle ST=Washington C=US
        Validity
            Not Before: Jul 12 10:57:29 2020 GMT
            Not After : Dec 31 23:59:59 2049 GMT
        Subject: CN = AWS IoT Certificate
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (2048 bit)
                Modulus:
...

and I also asked POSITEC (provider of the API) for support but so far without success!

yeah, the support is unfortunately not that fast 👎

@nibi79
Copy link
Owner

nibi79 commented Nov 4, 2022

No it's also not working for me and I think it's not working for all users in generall!?

@PilotIoTSystems
Copy link

@mitch-geht-ab
"and this problem hits only a few users? strange."

When I had the problem with MyWorx Bridge (OpenHAB 3.3), the Desktop APP was still working fine. After the mower re-pair, the Desktop APP also stopped. EISHA wrote to this (sorry for the German language): "Entscheident ist das active:false im certificate. Offenbar zieht Positec nun die mqtt Verbindung ohne Zertifikat durch."
Probably the same certificate problem is behind both.

@PilotIoTSystems
Copy link

@mitch-geht-ab
He developed the Desktop APP.
https://github.com/EishaV/Desktop-App

@PilotIoTSystems
Copy link

@nibi79
Eisha writes about the Desktop APP:
"Es wird kein Zertifikat mehr bereitgestellt. Positec stellt auf custom authorisation via wss um."
I don't know what this means, but it seems that the authorization method has changed...

@nibi79
Copy link
Owner

nibi79 commented Nov 4, 2022

Yes that is what I meant:

Some other Implementation (e.g. iobroker) use a solution without certificate but I have not been able to solve it this way yet.

@LukasA83
Copy link
Contributor Author

LukasA83 commented Nov 6, 2022

Looks like the awsiot sdk for java does not support adding custom auth headers via websocket. Not sure if there is any alternative?!

@nibi79
Copy link
Owner

nibi79 commented Nov 6, 2022

you're right! and there are alternatives but I didn't get them to work until now...

@nibi79
Copy link
Owner

nibi79 commented Nov 6, 2022

I'll try to publish a new repository with a small testproject tomorrow .... maybe someone else has an idea and can help me...

@nibi79
Copy link
Owner

nibi79 commented Nov 7, 2022

as promised yesterday -> https://github.com/nibi79/WorxTest

in this testproject I use another library:
<dependency>
<groupId>software.amazon.awssdk.iotdevicesdk</groupId>
<artifactId>aws-iot-device-sdk</artifactId>
<version>1.10.3</version>
</dependency>

Here it's possible to set header information, but I'm not sure how to handle the token.
Take a look at the ioBroker implementation:

Maybe someone else has a solution or an idea

@nibi79
Copy link
Owner

nibi79 commented Nov 7, 2022

Sorry... no connection

@nibi79
Copy link
Owner

nibi79 commented Nov 7, 2022

[Completed exceptionally: software.amazon.awssdk.crt.mqtt.MqttException: The connection was closed unexpectedly.]

ErrorCode 5134

@LukasA83
Copy link
Contributor Author

I also spent couple of hours on this, but ended up with the same error. Is there anyway to get more detailed logs on the sdk used to connect to aws?

@LukasA83
Copy link
Contributor Author

LukasA83 commented Jan 3, 2023

@nibi79: I spent some time and got the MQTT connection working, see my pull request on the test repository:
nibi79/WorxTest#1

Hopefully you can continue from there.

@MatzeMuc86
Copy link

MatzeMuc86 commented Feb 19, 2023

How can community support @nibi79, @LukasA83, @mitch-geht-ab , @PilotIoTSystems ?

@nibi79
Copy link
Owner

nibi79 commented Feb 19, 2023

I'm still workig on this but I think i have a interims solution for this,

@MatzeMuc86
Copy link

Great to hear!

@nibi79
Copy link
Owner

nibi79 commented Mar 6, 2023

hi all, @mitch-geht-ab, @sihui62, @LukasA83, @PilotIoTSystems, @MatzeMuc86

I have put in a lot of effort and managed to create a new version of the binding. However, I had to implement some workarounds to make it work properly:

I may be able to resolve these issues in a different way in the future. As of now, the software works with OH 3.4.1 and OH 3.4.2, but not with OH 3.2 (I had to update my installation to 3.4.1). I am unsure about compatibility with other versions of OH.

I hope your mowers are not still in hibernation. Please give your feedback after testing this new version -> https://github.com/nibi79/worxlandroid/releases/tag/v3.4.1-beta

@nibi79
Copy link
Owner

nibi79 commented Mar 6, 2023

don't forget to set the loglevel -> log:set DEBUG org.openhab.binding.worxlandroid

@nibi79 nibi79 changed the title Worx connection blocked, App operates normal, waiting does not resolve AWS new authorization (Worx connection blocked, App operates normal, waiting does not resolve) Mar 6, 2023
@nibi79 nibi79 self-assigned this Mar 7, 2023
@cinadr
Copy link

cinadr commented Apr 18, 2023

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
Copy link
Owner

nibi79 commented Apr 18, 2023

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

@cinadr
Copy link

cinadr commented Apr 18, 2023

GUI

@olflo
Copy link

olflo commented Apr 18, 2023

GUI

same

@nibi79
Copy link
Owner

nibi79 commented Apr 18, 2023

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

@foobar26
Copy link
Contributor

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
Copy link
Contributor

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
Copy link

mitch-geht-ab commented Apr 19, 2023

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
Copy link
Owner

nibi79 commented Apr 19, 2023

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
Copy link
Owner

nibi79 commented Apr 19, 2023

@mitch-geht-ab thank you for the hint

Let me know if this jar works for you

@mitch-geht-ab
Copy link

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
Copy link

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
Copy link
Owner

nibi79 commented Apr 19, 2023

Version 09.03.23

'03' was a typo

@meyercg
Copy link

meyercg commented Apr 24, 2023

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
Copy link
Contributor

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
Copy link

meyercg commented Apr 25, 2023

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

@mitch-geht-ab
Copy link

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
Copy link

martinlindjarv commented May 9, 2023

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
Copy link

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
Copy link
Owner

nibi79 commented May 23, 2023

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
Copy link

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
Copy link

MiniOh commented May 24, 2023

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
Copy link

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
Copy link

sihui62 commented Aug 3, 2023

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
Copy link
Contributor

foobar26 commented Aug 3, 2023

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, #73 (comment)) 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
Copy link

FranzSchi commented Aug 3, 2023

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
Copy link

sihui62 commented Aug 3, 2023

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.

@FranzSchi
Copy link

Short feedback, it was really an issue of picking the right version. So not yet relevant for this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests