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

404 from api.worxlandroid.com #70

Closed
mitch-geht-ab opened this issue Sep 28, 2022 · 13 comments
Closed

404 from api.worxlandroid.com #70

mitch-geht-ab opened this issue Sep 28, 2022 · 13 comments

Comments

@mitch-geht-ab
Copy link

Hi @nibi79

new year, new problems.
Suddenly I get 404 errors from api.worxlandroid.com.

From Openhab3.3 Logs:

2022-09-28 19:13:41.952 [DEBUG] [nternal.webapi.request.WebApiRequest] - URI: https://api.worxlandroid.com/api/v2/oauth/token
2022-09-28 19:13:42.507 [ERROR] [ternal.webapi.WorxLandroidWebApiImpl] - Error connecting to Worx Landroid WebApi! Error = Error calling Worx Landroid WebApi! HTTP Status = 404

Had allready removed the mower from my account an reconnected it, no luck.

Following from a mitmproxy dump:

Request:

POST  https://api.worxlandroid.com/api/v2/oauth/token HTTP/1.1
Accept-Encoding:	gzip
User-Agent:	Jetty/9.4.46.v20220331
Content-Type:	application/json
Host:	api.worxlandroid.com
Content-Length:	175
{
  "grant_type":"password","client_secret":"xxxxxxxxxxxxx","username":"xxxxxxxxx","password":"xxxxxxxxxxxx","scope":"*","client_id":1,"type":"app"
}

Response:

HTTP/1.1 404 Not Found
Date:	Wed, 28 Sep 2022 17:13:42 GMT
Content-Type:	application/json
Transfer-Encoding:	chunked
Connection:	keep-alive
Server:	nginx
Vary:	Accept-Encoding
Cache-Control:	no-cache, private
Content-Encoding:	gzip
{
  "message":"Not Found","code":"404.000"
}

As usual, no change from my side.
Landroid App on my Android is working....
Login to https://id.eu.worx.com/login is working...

Could it be, that Worx or AWS-Iot has changed sth. on the OAuth procedure? Maybe to "/api/v3/" ??
But it should affect more people than me.

BR
Mitch

@mitch-geht-ab
Copy link
Author

mitch-geht-ab commented Sep 28, 2022

Seams like ioBroker had the same problem but got it fixed by TA2k.
Quick lock into the code confirms that worx had changed sth. on the auth method.
From bearer token to sth. complete different :(

Issue on iobroker: iobroker-community-adapters/ioBroker.worx#569

Solution see commits from TA2k from Sep. 28th: https://github.com/iobroker-community-adapters/ioBroker.worx/commits/master

I fear the changes are a bit more voluminous. Maybe worth to have a short chat with TA2k @nibi79

From my point of view, I'm a bit shocked to kill bearer token and switched to this form-based rebuild sth. construct.

BR
Mitch

@nibi79
Copy link
Owner

nibi79 commented Oct 4, 2022

I have already written to TA2k. I have a problem to implement this in Java because I don't understand the lines from 497 of the code or the behavior:
https://github.com/iobroker-community-adapters/ioBroker.worx/blob/98cebed3758212d947d6a2284e571e29ec06630d/lib/api.js#L497
What is the trigger for this catch to get the code or how to imlement this?
I agree with youi that this form based solution is not that great.

@RolandRosenfeld
Copy link

Don't know whether this helps, but in HomeAssistant there is also much information about the issue and how to fix it.
An explanation of the workflow is in MTrab/landroid_cloud#259 (comment) and the resulting merge is in MTrab/pyworxcloud#85

@nibi79
Copy link
Owner

nibi79 commented Oct 4, 2022

Maybe someone of you has Python skills and can analyze this solution and explain to me how it works?
Otherwise I have to learn a little bit python...

@nibi79
Copy link
Owner

nibi79 commented Oct 4, 2022

the solution is not described in the mentioned commment

@nibi79
Copy link
Owner

nibi79 commented Oct 5, 2022

this new beta version should fix this issue:

https://github.com/nibi79/worxlandroid/releases/tag/v3.2-beta

Please test this veriosn and let me kow if it works for you!

thank you

@martinlindjarv
Copy link

Thank you!

Changed jar in addons folder and reenabled landroid bridge trough config.

According to logs all seem to work :)

2022-10-05 17:01:24.642 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'landroid.things'
2022-10-05 17:01:25.960 [INFO ] [d.internal.WorxLandroidBridgeHandler] - Start retrieving AWS certificate
2022-10-05 17:01:27.594 [WARN ] [ernal.webapi.response.WebApiResponse] - Cannot get response as JsonObject
2022-10-05 17:01:28.606 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'landroid.things'

Not sure if that JsonObject is something important or not ...

But buttons started to work and turning on party mode trough OH changed it in original app as well :)

@sihui62
Copy link

sihui62 commented Oct 5, 2022

let me kow if it works for you!

Works like a charme, @nibi79, you are the man of the day, thanks a ton :-)

@RolandRosenfeld
Copy link

I replaced the jar and restarted openhab and now all my items are available again and everything seems to be online.
This is with openhab 3.1 and a Landroid Worx WR105SI SO500i.

Many thanks to @nibi79 for this great job!

@PilotIoTSystems
Copy link

Thanks @nibi79, I've been using Binding successfully for a year. I made really good rules for it (gate closes when mowing, etc.) and ever since it stopped working, I really miss it. My problem is that, like many others, I'm using org.openhab.binding.worxlandroid-2.5.3-SNAPSHOT.jar for OpenHab 2.5 (there are many reasons I haven't migrated to OpenHab 3). Please, if you have already managed to patch the v3.2-beta, prepare the patch for the v2.1 version as well! Besides me, many people would be happy about it. Thanks in advance!

@TottiWhat
Copy link

Works perfectly!
Thanks very much for that great binding and your immediate effort to fix that issue!

@nibi79
Copy link
Owner

nibi79 commented Oct 6, 2022

Thank you all for your feedback!

@martinlindjarv "Cannot get response as JsonObject" doesn't matter

@PilotIoTSystems I'm really sorry, but it's too much effort and I just don't have the time. I'm glad that I can take care of the binding at all and solved this problem. Maybe later but I can not promise anything.

@nibi79
Copy link
Owner

nibi79 commented Oct 6, 2022

Many thanks to @TA2k (ioBroker) and @MTrab (HomeAssistant) for their support!!!

@nibi79 nibi79 closed this as completed Oct 6, 2022
nibi79 added a commit that referenced this issue Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants