copystring / ioBroker.roborock

Roborock ioBroker Adapter
MIT License
45 stars 21 forks source link

Support for Roborock Q8 Max (Plus) #436

Closed saint-hh closed 10 months ago

saint-hh commented 11 months ago

Hi, it would be nice if the Q8 Max Plus would be supported.

Currently, with version 0.4.4 the adapter is continuously crashing (tried production and dev).

My system is running on: Ubuntu Linux 22.04.3 Node.js v18.18.2

Please let me know how I can support.

Last log:


2023-11-24 20:28:04.712 info    Rebuild for adapter system.adapter.roborock.0 not successful in 3 tries. Adapter will not be restarted again. Please execute "npm install --production" in adapter directory manually.
host.raspberrypi
2023-11-24 20:28:04.712 error   instance system.adapter.roborock.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
host.raspberrypi
2023-11-24 20:28:04.712 error   Caught by controller[1]: at /opt/iobroker/node_modules/iobroker.roborock/main.js:208:29
host.raspberrypi
2023-11-24 20:28:04.712 error   Caught by controller[1]: at new vacuum (/opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js:45:31)
host.raspberrypi
2023-11-24 20:28:04.712 error   Caught by controller[1]: at require (node:internal/modules/cjs/helpers:119:18)
host.raspberrypi
2023-11-24 20:28:04.712 error   Caught by controller[1]: at Module.require (node:internal/modules/cjs/loader:1143:19)
host.raspberrypi
2023-11-24 20:28:04.711 error   Caught by controller[1]: at Function.Module._load (node:internal/modules/cjs/loader:922:27)
host.raspberrypi
2023-11-24 20:28:04.711 error   Caught by controller[1]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
host.raspberrypi
2023-11-24 20:28:04.711 error   Caught by controller[1]: - /opt/iobroker/node_modules/iobroker.roborock/main.js
host.raspberrypi
2023-11-24 20:28:04.711 error   Caught by controller[1]: - /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js
host.raspberrypi
2023-11-24 20:28:04.711 error   Caught by controller[1]: Require stack:
host.raspberrypi
2023-11-24 20:28:04.711 error   Caught by controller[1]: Error: Cannot find module './undefined'
host.raspberrypi
2023-11-24 20:28:04.710 error   Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

roborock.0
2023-11-24 20:28:04.623 info    terminating

roborock.0
2023-11-24 20:28:04.121 warn    Terminated (UNCAUGHT_EXCEPTION): Without reason

roborock.0
2023-11-24 20:28:04.120 info    terminating

roborock.0
2023-11-24 20:28:04.105 error   Exception-Code: MODULE_NOT_FOUND: Cannot find module './undefined'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js

roborock.0
2023-11-24 20:28:04.104 error   Error: Cannot find module './undefined'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Function.Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:119:18) at new vacuum (/opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js:45:31) at /opt/iobroker/node_modules/iobroker.roborock/main.js:208:29

roborock.0
2023-11-24 20:28:04.099 error   unhandled promise rejection: Cannot find module './undefined'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js

roborock.0
2023-11-24 20:28:04.098 error   Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

roborock.0
2023-11-24 20:28:03.303 error   The model roborock.vacuum.a73 is not supported. Get in touch with the dev to get this robot supported.

roborock.0
2023-11-24 20:28:03.301 info    MQTT initialized

roborock.0
2023-11-24 20:28:02.588 info    starting. Version 0.4.4 in /opt/iobroker/node_modules/iobroker.roborock, node: v18.18.2, js-controller: 5.0.16```
copystring commented 11 months ago

Q8 Max or Q8 Max Plus? This is important to correctly create the needed files.

copystring commented 11 months ago

Please test https://github.com/copystring/ioBroker.roborock/tree/dev and let me know if anything is missing. Most likely, some commands would be missing. If there are any errors or warnings, post a new Debuglog. Thank you.

saint-hh commented 11 months ago

Q8 Max or Q8 Max Plus?

Q8 Max Plus please. Gorgeous, I'll test it right away!

saint-hh commented 11 months ago

Unfortunately not running:

` 2023-11-25 22:04:56.104 info Rebuild for adapter system.adapter.roborock.0 not successful in 3 tries. Adapter will not be restarted again. Please execute "npm install --production" in adapter directory manually. host.raspberrypi 2023-11-25 22:04:56.104 error instance system.adapter.roborock.0 terminated with code 6 (UNCAUGHT_EXCEPTION) host.raspberrypi 2023-11-25 22:04:56.103 error Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.roborock/main.js:207:29 host.raspberrypi 2023-11-25 22:04:56.103 error Caught by controller[0]: at new vacuum (/opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js:65:31) host.raspberrypi 2023-11-25 22:04:56.103 error Caught by controller[0]: at require (node:internal/modules/cjs/helpers:119:18) host.raspberrypi 2023-11-25 22:04:56.103 error Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1143:19) host.raspberrypi 2023-11-25 22:04:56.103 error Caught by controller[0]: at Function.Module._load (node:internal/modules/cjs/loader:922:27) host.raspberrypi 2023-11-25 22:04:56.103 error Caught by controller[0]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) host.raspberrypi 2023-11-25 22:04:56.103 error Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.roborock/main.js host.raspberrypi 2023-11-25 22:04:56.103 error Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js host.raspberrypi 2023-11-25 22:04:56.102 error Caught by controller[0]: Require stack: host.raspberrypi 2023-11-25 22:04:56.102 error Caught by controller[0]: Error: Cannot find module './roborock_vacuum_a73' host.raspberrypi 2023-11-25 22:04:56.102 error Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

roborock.0 2023-11-25 22:04:56.009 info terminating

roborock.0 2023-11-25 22:04:55.507 warn Terminated (UNCAUGHT_EXCEPTION): Without reason

roborock.0 2023-11-25 22:04:55.505 info terminating

roborock.0 2023-11-25 22:04:55.490 error Exception-Code: MODULE_NOT_FOUND: Cannot find module './roborock_vacuum_a73'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js

roborock.0 2023-11-25 22:04:55.490 error Error: Cannot find module './roborock_vacuum_a73'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Function.Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:119:18) at new vacuum (/opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js:65:31) at /opt/iobroker/node_modules/iobroker.roborock/main.js:207:29

roborock.0 2023-11-25 22:04:55.484 error unhandled promise rejection: Cannot find module './roborock_vacuum_a73'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js

roborock.0 2023-11-25 22:04:55.484 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

roborock.0 2023-11-25 22:04:55.066 info MQTT initialized

roborock.0 2023-11-25 22:04:53.513 info starting. Version 0.4.4 (non-npm: copystring/ioBroker.roborock#dev) in /opt/iobroker/node_modules/iobroker.roborock, node: v18.18.2, js-controller: 5.0.16`

copystring commented 11 months ago

Fixed. Please try again.

saint-hh commented 11 months ago

Please see attached I'm not sure if this might be important, but: I bought a Q8 Max + (roborock Q8 Max+ Saugroboter mit selbstentleerender Absaugstation), but the app is stating Q8 Max / Model roborock.vacuum.a73

` 2023-11-25 22:18:11.319 error instance system.adapter.roborock.0 terminated with code 6 (UNCAUGHT_EXCEPTION) host.raspberrypi 2023-11-25 22:18:11.319 error Caught by controller[1]: at Module.require (node:internal/modules/cjs/loader:1143:19) host.raspberrypi 2023-11-25 22:18:11.319 error Caught by controller[1]: at Function.Module._load (node:internal/modules/cjs/loader:960:12) host.raspberrypi 2023-11-25 22:18:11.319 error Caught by controller[1]: at Module.load (node:internal/modules/cjs/loader:1119:32) host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10) host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: at Module._compile (node:internal/modules/cjs/loader:1256:14) host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: at Object. (/opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js:13:5) host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: at require (node:internal/modules/cjs/helpers:119:18) host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: at Module.require (node:internal/modules/cjs/loader:1143:19) host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: at Function.Module._load (node:internal/modules/cjs/loader:922:27) host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: - /opt/iobroker/node_modules/iobroker.roborock/main.js host.raspberrypi 2023-11-25 22:18:11.318 error Caught by controller[1]: - /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js host.raspberrypi 2023-11-25 22:18:11.317 error Caught by controller[1]: - /opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js host.raspberrypi 2023-11-25 22:18:11.317 error Caught by controller[1]: Require stack: host.raspberrypi 2023-11-25 22:18:11.317 error Caught by controller[1]: Error: Cannot find module 'ioBroker.roborock/lib/genSpecs/gen8/q8_max/robot' host.raspberrypi 2023-11-25 22:18:11.317 error Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

roborock.0 2023-11-25 22:18:11.221 info terminating

roborock.0 2023-11-25 22:18:10.719 warn Terminated (UNCAUGHT_EXCEPTION): Without reason

roborock.0 2023-11-25 22:18:10.718 info terminating

roborock.0 2023-11-25 22:18:10.703 error Exception-Code: MODULE_NOT_FOUND: Cannot find module 'ioBroker.roborock/lib/genSpecs/gen8/q8_max/robot'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js

roborock.0 2023-11-25 22:18:10.702 error Error: Cannot find module 'ioBroker.roborock/lib/genSpecs/gen8/q8_max/robot'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Function.Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js:13:5) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Function.Module._load (node:internal/modules/cjs/loader:960:12) at Module.require (node:internal/modules/cjs/loader:1143:19)

roborock.0 2023-11-25 22:18:10.697 error unhandled promise rejection: Cannot find module 'ioBroker.roborock/lib/genSpecs/gen8/q8_max/robot'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js

roborock.0 2023-11-25 22:18:10.696 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

roborock.0 2023-11-25 22:18:10.253 info MQTT initialized

roborock.0 2023-11-25 22:18:08.540 info starting. Version 0.4.4 (non-npm: copystring/ioBroker.roborock#dev) in /opt/iobroker/node_modules/iobroker.roborock, node: v18.18.2, js-controller: 5.0.16`

copystring commented 11 months ago

Yes, but I checked the files Roborock supplies and Roborock does not know a Q8 Max Plus. image

Please execute this command on your ioBroker host: ls -l /opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/gen8/q8_max/ and paste its output here

saint-hh commented 11 months ago

ls -l /opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/gen8/q8_max/ ls: cannot access '/opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/gen8/q8_max/': No such file or directory

Already genspecs/gen8 doesn't exist.

copystring commented 11 months ago

There is your problem. Try loading the dev again.

saint-hh commented 11 months ago

I did - but stays the same. genspecs still doesn't exist.

copystring commented 11 months ago

Not sure what to do. There is something wrong on your end. The folder exists in the GitHub repo. https://github.com/copystring/ioBroker.roborock/tree/dev/lib/genSpecs/gen8

saint-hh commented 11 months ago

This is what I get when installing the dev:

$ iobroker url https://github.com/copystring/ioBroker.roborock/tree/dev --host raspberrypi --debug install copystring/ioBroker.roborock#dev NPM version: 9.8.1 Installing copystring/ioBroker.roborock#dev... (System call) up to date in 8s150 packages are looking for funding runnpm fundfor details upload [13] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/de/translations.json i18n/de/translations.json application/json upload [12] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/en/translations.json i18n/en/translations.json application/json upload [11] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/es/translations.json i18n/es/translations.json application/json upload [10] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/fr/translations.json i18n/fr/translations.json application/json upload [9] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/it/translations.json i18n/it/translations.json application/json upload [8] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/nl/translations.json i18n/nl/translations.json application/json upload [7] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/pl/translations.json i18n/pl/translations.json application/json upload [6] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/pt/translations.json i18n/pt/translations.json application/json upload [5] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/ru/translations.json i18n/ru/translations.json application/json upload [4] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/uk/translations.json i18n/uk/translations.json application/json upload [3] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/i18n/zh-cn/translations.json i18n/zh-cn/translations.json application/json upload [2] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/jsonConfig.json jsonConfig.json application/json upload [1] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/roborock.png roborock.png image/png upload [0] roborock.admin /opt/iobroker/node_modules/iobroker.roborock/admin/words.js words.js application/javascript Update "system.adapter.roborock.0" Process exited with code 0

copystring commented 11 months ago

Looks OK, but obviously there must be something wrong. Maybe delete /opt/iobroker/node_modules/ioBroker.roborock/ and load the dev again? If that does not work, reinstall the adapter.

saint-hh commented 11 months ago

No remedy - deleted the directory, reinstalled the adapter. How can I download the whole genSpecs directory, so I can add it manually?

copystring commented 11 months ago

Download the github repo in the dev branch as zip

saint-hh commented 11 months ago

Thank you - did so and while on the way to upload it via Webmin, I realized that all the files are already there:

Bildschirmfoto 2023-11-25 um 23 29 06

Adapter still crashing and in the shell still: ls: cannot access '/opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/gen8/q8_max/': No such file or directory Could it be a weird permission problem?

copystring commented 11 months ago

Could it be a weird permission problem?

Maybe

copystring commented 11 months ago

What does ls -l /opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/ output?

saint-hh commented 11 months ago

ls -l /opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/ ls: cannot access '/opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/': No such file or directory

Reinstalled, rebooted the whole server, etc. And I can see all the required directories in Webmin - and in the shell as well, if I navigate with cd to it.

copystring commented 11 months ago

Do you execute the command as root?

saint-hh commented 11 months ago

And permissions are looking OK as well.

saint-hh commented 11 months ago

``

Do you execute the command as root?

Just as you typed. And as well: sudo ls -l /opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/ ls: cannot access '/opt/iobroker/node_modules/ioBroker.roborock/lib/genSpecs/': No such file or directory

copystring commented 11 months ago

Output of ls -l /opt/iobroker/ as root? Just dig deeper one folder at a time. But really, your system has an issue. If you deleted /opt/iobroker/node_modules/ioBroker.roborock/ and reinstalled the dev, I cannot image you'd have permission problems.

saint-hh commented 11 months ago

sudo ls -l /opt/iobroker/node_modules/iobroker.roborock/lib/genSpecs/gen8/q8_max/ total 40 -rw-rw-r--+ 1 iobroker iobroker 35 Nov 25 23:51 camera.hbs -rw-rw-r--+ 1 iobroker iobroker 1754 Nov 25 23:51 camera.js -rw-rw-r--+ 1 iobroker iobroker 28 Nov 25 23:51 robot.hbs -rw-rw-r--+ 1 iobroker iobroker 20382 Nov 25 23:51 robot.js -rw-rw-r--+ 1 iobroker iobroker 36 Nov 25 23:51 station.hbs -rw-rw-r--+ 1 iobroker iobroker 1217 Nov 25 23:51 station.js

the log: `ypi 2023-11-26 00:26:28.574 info Rebuild for adapter system.adapter.roborock.0 not successful in 3 tries. Adapter will not be restarted again. Please execute "npm install --production" in adapter directory manually. host.raspberrypi 2023-11-26 00:26:28.574 error instance system.adapter.roborock.0 terminated with code 6 (UNCAUGHT_EXCEPTION) host.raspberrypi 2023-11-26 00:26:28.574 error Caught by controller[1]: at Module.require (node:internal/modules/cjs/loader:1143:19) host.raspberrypi 2023-11-26 00:26:28.574 error Caught by controller[1]: at Function.Module._load (node:internal/modules/cjs/loader:960:12) host.raspberrypi 2023-11-26 00:26:28.574 error Caught by controller[1]: at Module.load (node:internal/modules/cjs/loader:1119:32) host.raspberrypi 2023-11-26 00:26:28.574 error Caught by controller[1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10) host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: at Module._compile (node:internal/modules/cjs/loader:1256:14) host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: at Object. (/opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js:13:5) host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: at require (node:internal/modules/cjs/helpers:119:18) host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: at Module.require (node:internal/modules/cjs/loader:1143:19) host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: at Function.Module._load (node:internal/modules/cjs/loader:922:27) host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: - /opt/iobroker/node_modules/iobroker.roborock/main.js host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: - /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js host.raspberrypi 2023-11-26 00:26:28.573 error Caught by controller[1]: - /opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js host.raspberrypi 2023-11-26 00:26:28.572 error Caught by controller[1]: Require stack: host.raspberrypi 2023-11-26 00:26:28.572 error Caught by controller[1]: Error: Cannot find module 'ioBroker.roborock/lib/genSpecs/gen8/q8_max/robot' host.raspberrypi 2023-11-26 00:26:28.572 error Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

roborock.0 2023-11-26 00:26:28.481 info terminating

roborock.0 2023-11-26 00:26:27.978 warn Terminated (UNCAUGHT_EXCEPTION): Without reason

roborock.0 2023-11-26 00:26:27.977 info terminating

roborock.0 2023-11-26 00:26:27.961 error Exception-Code: MODULE_NOT_FOUND: Cannot find module 'ioBroker.roborock/lib/genSpecs/gen8/q8_max/robot'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js

roborock.0 2023-11-26 00:26:27.961 error Error: Cannot find module 'ioBroker.roborock/lib/genSpecs/gen8/q8_max/robot'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Function.Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js:13:5) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Function.Module._load (node:internal/modules/cjs/loader:960:12) at Module.require (node:internal/modules/cjs/loader:1143:19)

roborock.0 2023-11-26 00:26:27.956 error unhandled promise rejection: Cannot find module 'ioBroker.roborock/lib/genSpecs/gen8/q8_max/robot'Require stack:- /opt/iobroker/node_modules/iobroker.roborock/lib/roborock_vacuum_a73.js- /opt/iobroker/node_modules/iobroker.roborock/lib/vacuum.js- /opt/iobroker/node_modules/iobroker.roborock/main.js

roborock.0 2023-11-26 00:26:27.955 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

roborock.0 2023-11-26 00:26:27.504 info MQTT initialized

roborock.0 2023-11-26 00:26:26.166 info starting. Version 0.4.4 (non-npm: copystring/ioBroker.roborock#dev) in /opt/iobroker/node_modules/iobroker.roborock, node: v18.18.2, js-controller: 5.0.16`

copystring commented 11 months ago

Is this your only robot?

saint-hh commented 11 months ago

Yes. From Roborock. But I have a Roomba too, although I guess that doesn’t matter.

copystring commented 11 months ago

Ok. I don't know how to help any further. I just wanted to make sure it's not the definition of the robot but if you have only one roborock we can't test that.

copystring commented 11 months ago

Maybe install iobroker your windows PC and test the dev branch there? If it works on your windows PC it must be your setup on the server

saint-hh commented 11 months ago

Thank you so much for all your help so far! And I have to admit, that I'm currently also running out of ideas.

Just to clarify for the root user question: I'm running on Ubuntu, where the root user is locked. But sudo does the job.

For now I go to sleep - will continue within the next days. I have an older ioBroker instance (a couple of months, before I've migrated on a virtual Ubuntu machine) running on an RasPi 4B. Maybe I'll give it a shot on that system for testing. Thanks a million again!

saint-hh commented 11 months ago

If it works on your windows PC

Only MacOS available

saint-hh commented 11 months ago

Seems like I found it. I've edited the paths in roborock_vacuum_a73.js this way: require("./genSpecs/gen8/q8_max/robot"); require("./genSpecs/gen8/q8_max/camera"); require("./basic_robot");

Now the adapter is starting without any issues and I can see the states of my robot in objects. This is now the log: ` roborock.0 2023-11-26 10:55:14.486 warn Failed to map rooms. You need to name your rooms via the mobile app on your phone.

roborock.0 2023-11-26 10:55:14.255 error Failed to execute get_status on robot xx undefined

roborock.0 2023-11-26 10:55:14.232 error Failed to execute get_status on robot xx undefined

roborock.0 2023-11-26 10:54:15.561 warn State "roborock.0.Devices.xx.cleaningInfo.Records.0.cleaned_area" has no existing object, this might lead to an error in future versions

roborock.0 2023-11-26 10:54:14.386 warn Failed to map rooms. You need to name your rooms via the mobile app on your phone.

roborock.0 2023-11-26 10:54:14.060 error Failed to execute get_status on robot xx undefined

roborock.0 2023-11-26 10:54:14.011 error Failed to execute get_status on robot xx undefined

roborock.0 2023-11-26 10:51:30.411 info MQTT initialized

roborock.0 2023-11-26 10:51:29.409 info starting. Version 0.4.4 (non-npm: copystring/ioBroker.roborock#dev) in /opt/iobroker/node_modules/iobroker.roborock, node: v18.18.2, js-controller: 5.0.16`

But my robot is totally new, I need to set up the maps, so this seems fine. I'll test more the next days, the rest of the day I'll be away from home.

copystring commented 11 months ago

OK. This was actually my bad. VS Code modified the files after copying them and I did not notice. Sorry about that. I fixed all the issues. If you load the dev again, the errors and warnings in your logs should be fixed.

saint-hh commented 11 months ago

No need to be sorry - thank you for building this adapter and all the effort you are putting into this! Great, I’ll extensively test it next week! Have a nice weekend!

saint-hh commented 11 months ago

Tested and already implemented into my scripts: start cleaning and returning to dock. So the most important things (for me) are already working. :)

The log is fine, except for this message, I get frequently:

roborock.0 2023-11-26 20:19:41.692 error Failed to execute get_status on robot XX undefined

saint-hh commented 11 months ago

Looking good, all data is working and updated frequently. The map can be used as well: IMG_2293

Maybe for the Wiki (deviceStatus.state): {"1":"Unbekannt","2":"inaktiv, lädt nicht","3":"inaktiv / idle","5":"Reinigt","6":"Zurück zum Dock","7":"Ferrnsteuerung","8":"Lädt","10":"Pause","11":"Punktreinigung","12":"Fehler","16":"Fahrt zum Ziel","17":"Zonenreinigung","18":"Raumreinigung","22":"Staubbehälter leeren","23":"Mopp waschen","26":"fahre Mopp waschen","29":"Karte erstellen"}

No. 29 is creating the map.

The before mentioned error message still kicks in every minute.

But in general: what a difference between my old Roomba and this Roborock! The Roomba was stupidly bumping into everything, going zickzack without any plan and usually got stuck somewhere. Now we just have to leave the doors open and let the Roborock do its magic. I already love this little guy.

saint-hh commented 11 months ago

So for the moment everything is working fine, I cannot find any issues.

Except for this error message, which is flooding my log - 4 times every minute: roborock.0 2023-11-29 09:01:34.816 error Failed to execute get_status on robot XX undefined

Any idea about this?

copystring commented 11 months ago

So for the moment everything is working fine, I cannot find any issues.

Except for this error message, which is flooding my log - 4 times every minute: roborock.0 2023-11-29 09:01:34.816 error Failed to execute get_status on robot XX undefined

Any idea about this?

Not sure. Maybe I'll know more if you provide a new debug log.

saint-hh commented 11 months ago

Yes sure, here you are: ioBroker_Roborock_Q8_Max_log.txt

copystring commented 11 months ago

Mein Errorlogging ist kacke. Habs angepasst. Bitte die dev neu laden und ein neues log hier anhängen. Dann kann ich genauer gucken.

saint-hh commented 11 months ago

Alles klar, danke! Nun sagt er auch, was ihm denn fehlt:

2023-11-30 08:58:12.470 - error: roborock.0 (177650) Failed to execute get_status on robot XX Unsupported attribute: in_warmup of get_status with value 0.

2023-11-30 08:58:12.518 - error: roborock.0 (177650) Failed to execute get_status on robot XX Unsupported attribute: common_status of get_status with value 0.

Keine Ahnung ob _inwarmup etwas damit zu tun hat, aber der Q8 sagt auch immer nach dem Startbefehl, er müsse sich kurz aufwärmen - und fährt dann los.

Und das gesamte Debug Log: ioBroker_Roborock_Q8_Max_log_2.txt

saint-hh commented 11 months ago

Hmm. Nachdem der Q8 im Idle und nicht vom Adapter erreichbar war, habe ich ihn via App eine Punktreinigung machen lassen, damit er aufwacht. Nur leider reagiert der Q8 auch danach nicht mehr auf Kommandos, wie _appstart, _appcharge oder _findme Die werden auf true gesetzt und bleiben auch auf true - vorher wurden sie ausgeführt und sofort auf false zurückgesetzt. Daten werden ansonsten aktualisiert, ich sehe z.B. das er gerade lädt und auch seinen Akkustand. Irgendeine Idee was da falsch ist?

saint-hh commented 11 months ago

Alles klar, danke! Nun sagt er auch, was ihm denn fehlt:

2023-11-30 08:58:12.470 - error: roborock.0 (177650) Failed to execute get_status on robot XX Unsupported attribute: in_warmup of get_status with value 0.

2023-11-30 08:58:12.518 - error: roborock.0 (177650) Failed to execute get_status on robot XX Unsupported attribute: common_status of get_status with value 0.

Keine Ahnung ob _inwarmup etwas damit zu tun hat, aber der Q8 sagt auch immer nach dem Startbefehl, er müsse sich kurz aufwärmen - und fährt dann los.

Und das gesamte Debug Log: ioBroker_Roborock_Q8_Max_log_2.txt

Nach der Aktualisierung der Dev hatte ich den Q8 auch noch nicht fahren lassen, sondern einfach auf die Fehlermeldung gewartet.

saint-hh commented 11 months ago

Gerade habe ich ein update im Hostsystem eingespielt und entsprechend den Server komplett neu gestartet.

Auffällig hierbei: _appstart und _appcharge stehen nach dem Start auf true. Ansonsten ist das Verhalten unverändert - der Adapter kann den Q8 nicht starten / zum Dock fahren lassen / suchen.

Aktuelles Log nach dem Neustart:

ioBroker_Roborock_Q8_Max_log_3.txt

copystring commented 11 months ago

Richtig. In der aktuellen dev ist ein breaking change. Befehle brauchen ab sofort ack = true

saint-hh commented 11 months ago

Richtig. In der aktuellen dev ist ein breaking change. Befehle brauchen ab sofort ack = true

Danke, passt!

saint-hh commented 10 months ago

In der _opt/iobroker/node/modules/iobroker.roborock/lib/genSpecs/gen8/q8max/robot.js unter const deviceStatus dies eingefügt:

    in_warmup: {
        type: "number",
        name: "In Warmup",
        write: false,
    },
    common_status: {
        type: "number",
        name: "Common Status",
        write: false,
    },

beseitigt die Error.

copystring commented 10 months ago

Das hatte ich gar nicht mehr auf dem Schirm. Ich füge das später zu den Dateien hinzu oder du machst ein pr. Das kann ich am Handy bestätigen

saint-hh commented 10 months ago

PR ist erstellt. https://github.com/copystring/ioBroker.roborock/pull/447 Gerade weiter getestet, sieht soweit gut aus. Nur noch gelegentliche Warnings: warn Failed to execute get_map_v1 on robot XX locating

Denke aber das ist OK? Nochmal auf längere Sicht gucken, aber ich denke damit haben wir es dann. :)

copystring commented 10 months ago

PR ist akzeptiert. Die Warnungen sind OK. Der Saugroboter meldet das, wenn die Position auf der Karte bzw. im Haus oder der Wohnung gesucht wird

saint-hh commented 10 months ago

Die Dev gleich eingespielt, Ruhe im Log und es scheint alles zu laufen wie es soll. Ich denke damit haben wir es, du kannst den Q8 raushauen und in die supported Liste aufnehmen. Ich mache dann das Ticket hier dicht, sollte noch was auftauchen mache ich ein neues Ticket auf.

Tausend Dank nochmals für deine Arbeit!