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

no connection to Worx Server. new logon procedure is required by server #18

Open
skyline2030 opened this issue Oct 24, 2022 · 14 comments
Open

Comments

@skyline2030
Copy link

Until 20 October 2022 all worked fine. We had a power outage for some time at that day. After restarting, I got the following error:

0|Landroid | DEBUG: Connect to worx....
0|Landroid | ERROR: Could not Connect to Worx Server: StatusCodeError: 404 - {"message":"Not Found","code":"404.000"}
0|Landroid | Thu, 20 Oct 2022 19:28:45 GMT --> 'ERROR: StatusCodeError: 404 - {"message":"Not Found","code":"404.000"}
0|Landroid | INFO: worx is selected

This error comes over and over again. No connection to worx server takes place.

I searched for web entries describing the same error and found several people who had the same problem, but not with fhem but with IOBROKER. I found out: somebody supplied a fix for the IOBROKER version, but the fhem version still has NO FIX.

Is anybody able to adapt the fix to the fhem version of landroid.

@eckonator
Copy link

Hi skyline2030, i will try to fork this project and implement the fixes from iobroker. Is there a link to the fixed version, which you have found?

@SuMiHe
Copy link

SuMiHe commented Nov 5, 2022

Hi eckonator, that sounds good! I have the same problem like skyline2030. I think that should be the link ?!
https://github.com/axelmohnen/fhem-landroid-s/issues

I hope it helps :-)

@eckonator
Copy link

I also did some research on this yesterday. I suspect the fix is relatively simple. In the directory "fhem-landroid-s" is a file "package.json". In this file the following line should be changed to version 1.7.0:

"dependencies": {
"iobroker.worx": "^1.0.0"
}

According to my research, version 1.7.0 is the last patched version that might work. After that the ioBroker module was completely refactored, so the rest of the FHEM version won't work with it without any adjustments from version 2.x.x on. Unfortunately I can't test my solution yet, because my Node version is at 12 and for version 1.7.0 at least Node 16 is needed.

The solution could therefore look like this:

  1. change the line in package.json to 1.7.0
  2. delete the „node_modules“ directory completely
  3. finally run an "npm install".

After that it could work again. Unfortunately I'm not at home this weekend to do further research. Maybe someone can test and report if my theory leads to success?

@SuMiHe
Copy link

SuMiHe commented Nov 5, 2022

Hi eckonator,
many thank's for your help.
I just tried it as you described. With "npm install" there are unfortunately many errors and the installation fails. Unfortunately I don't really know anything about linux and can't help you further. I guess I'll have to wait then.
npm v 6.14.17; node v 14.21.0
2022-11-05T15_57_22_520Z-debug.log

@eckonator
Copy link

Hi SuMiHe,
maybe there was a permission problem. Try „sudo npm install“. But i think i have to try by myself next week.

@SuMiHe
Copy link

SuMiHe commented Nov 5, 2022

I tried that too, nearly same error. See the 2. log
2022-11-05T16_05_08_525Z-debug.log

@eckonator
Copy link

Hm, try this:

cd /opt/PATH-TO-YOUR/fhem-landroid-s
sudo rm -rf node_modules
sudo npm install [email protected]
node LandroidSrv.js mower1

@SuMiHe
Copy link

SuMiHe commented Nov 5, 2022

then I get Errors by "sudo npm install [email protected]".
See the log.
2022-11-05T17_48_25_099Z-debug.log
Unfortunately, my knowledge of Linux is not sufficient to interpret it :-(

@eckonator
Copy link

Okay, here is a new try :-)

cd /opt/PATH-TO-YOUR/fhem-landroid-s
sudo rm -rf node_modules package-lock.json
sudo npm cache clean --force
sudo npm cache verify
sudo npm install [email protected]
node LandroidSrv.js mower1

@SuMiHe
Copy link

SuMiHe commented Nov 5, 2022

nope, no luck again.
Thank you for your help. I think I'll have to wait a bit until someone with more now how than I can help you.
2022-11-05T18_16_59_923Z-debug.log

@eckonator
Copy link

Now it seems your machine do not trust the ssl certificat. Maybe this can help:

sudo npm config set strict-ssl false

And then run the lines from my previous post.

@SuMiHe
Copy link

SuMiHe commented Nov 5, 2022

still the ssl error :-(

"npm ERR! request to https://registry.npmjs.org/iobroker.worx failed, reason: write EPROTO 1995606480:error:140943FC:SSL routines:ssl3_read_bytes:sslv3 alert bad record mac:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 20
"

Thank's a lot, but it's ok for now. Sorry.

@beimaik
Copy link

beimaik commented Nov 9, 2022

Okay, here is a new try :-)

cd /opt/PATH-TO-YOUR/fhem-landroid-s
sudo rm -rf node_modules package-lock.json
sudo npm cache clean --force
sudo npm cache verify
sudo npm install [email protected]
node LandroidSrv.js mower1

root@MYSERVER:/opt/landroid/fhem-landroid-s-master# node -v
v16.18.1

root@MYSERVER:/opt/landroid/fhem-landroid-s-master# npm -v
8.19.3

root@MYSERVER:/opt/landroid/fhem-landroid-s-master# rm -rf node_modules package-lock.json
root@MYSERVER:/opt/landroid/fhem-landroid-s-master# npm cache clean --force
npm WARN using --force Recommended protections disabled.
root@MYSERVER:/opt/landroid/fhem-landroid-s-master# npm cache verify
Cache verified and compressed (~/.npm/_cacache)
Content verified: 0 (0 bytes)
Index entries: 0
Finished in 0.008s
root@MYSERVER:/opt/landroid/fhem-landroid-s-master# npm install [email protected]
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, s ee request/request#3142
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142

added 120 packages, and audited 121 packages in 10s

14 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
root@MYSERVER:/opt/landroid/fhem-landroid-s-master# node LandroidSrv.js mower1
INFO: worx is selected

unfortunately I only get the output "INFO: worx is selected" and then the process terminates.

@eckonator
Copy link

eckonator commented Nov 9, 2022

It’s not so easy that i thougt.

You can add in LandroidSrv.js, Line 452 this:
worxCloud.login();

After that it seems to go further, but it‘s never starting the mqtt proccess.

I tried to get help from ioBroker.worx developers. Now, we have to wait…

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

4 participants