copystring / ioBroker.roborock

Roborock ioBroker Adapter
MIT License
43 stars 19 forks source link

The adapter is shut down when the Internet is down #580

Closed ArnoD15 closed 1 month ago

ArnoD15 commented 1 month ago

Describe the bug
Im LOG sind folgende Meldungen und Fehlermeldungen und Adapter wird neu gestartet. Ist seit gestern zweimal passiert. :

2024-07-18 09:24:05.038  - warn:  roborock.0 (28742) Unable to decode message for xxxxxxxxxxxxxxxxxxxxxx.  The the device is most likely offline. data:  {"version":"1.0","seq":64,"random":318846,"timestamp":1721287445,"protocol":500,"payload":{"type":"Buffer","data":[123,34,111,110,108,105,110,101,34,58,102,97,108,115,101,125]},"crc32":4236790353}
--
2024-07-18 09:24:05.606  - error:  roborock.0 (28742) 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().
2024-07-18 09:24:05.606  - error: roborock.0 (28742) unhandled promise rejection: connect ECONNREFUSED 192.168.1.86:58867
2024-07-18 09:24:05.607  - error: roborock.0 (28742) Error: connect ECONNREFUSED 192.168.1.86:58867
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16)
2024-07-18 09:24:05.607  - error: roborock.0 (28742) Exception-Code: ECONNREFUSED: connect ECONNREFUSED 192.168.1.86:58867
2024-07-18 09:24:05.687  - info: roborock.0 (28742) terminating
2024-07-18 09:24:05.688  - warn: roborock.0 (28742) Terminated (UNCAUGHT_EXCEPTION): Without reason
2024-07-18 09:24:08.059  - info: roborock.0 (28742) terminating
2024-07-18 09:24:08.066  - warn:  roborock.0 (28742) Unable to decode message for xxxxxxxxxxxxxxxxxxxxxx.  The the device is most likely offline. data:  {"version":"1.0","seq":62,"random":266847,"timestamp":1721287447,"protocol":500,"payload":{"type":"Buffer","data":[123,34,111,110,108,105,110,101,34,58,116,114,117,101,125]},"crc32":3888691013}
2024-07-18 09:24:08.820  - error:  host.iobroker Caught by controller[1]: 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:
2024-07-18 09:24:08.822  - error: host.iobroker Caught by controller[2]: Error: connect ECONNREFUSED 192.168.1.86:58867
2024-07-18 09:24:08.822  - error: host.iobroker Caught by controller[2]:     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16)
2024-07-18 09:24:08.822  - error: host.iobroker instance system.adapter.roborock.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2024-07-18 09:24:08.823  - info: host.iobroker Restart adapter system.adapter.roborock.0 because enabled
2024-07-18 09:24:39.674  - info: host.iobroker instance system.adapter.roborock.0 in version "0.6.6" started with pid 15883

Versions:

Roborock S7 MaxV

ArnoD15 commented 1 month ago

Wird nicht besser.

grafik

Letzter Eintrag im LOG:

2024-07-23 22:31:02.782  - info:  roborock.0 (14305) starting. Version 0.6.6 in  /opt/iobroker/node_modules/iobroker.roborock, node: v20.15.1,  js-controller: 6.0.8
2024-07-23 22:31:02.810  - info: roborock.0 (14305) Starting adapter. This might take a few minutes depending on your setup. Please wait.
2024-07-23 22:31:08.244  - error:  roborock.0 (14305) 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().
2024-07-23 22:31:08.245  - error: roborock.0 (14305) unhandled promise rejection: connect ENETUNREACH 10.0.0.1:443
2024-07-23 22:31:08.245  - error: roborock.0 (14305) Error: connect ENETUNREACH 10.0.0.1:443
at Function.AxiosError.from (/opt/iobroker/node_modules/axios/lib/core/AxiosError.js:89:14)
at RedirectableRequest.handleRequestError (/opt/iobroker/node_modules/axios/lib/adapters/http.js:610:25)
at RedirectableRequest.emit (node:events:519:28)
at RedirectableRequest.emit (node:domain:488:12)
at ClientRequest.eventHandlers. (/opt/iobroker/node_modules/follow-redirects/index.js:38:24)
at ClientRequest.emit (node:events:531:35)
at ClientRequest.emit (node:domain:488:12)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:519:28)
at TLSSocket.emit (node:domain:488:12)
at Axios.request (/opt/iobroker/node_modules/axios/lib/core/Axios.js:45:41)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Roborock.getUserData (/opt/iobroker/node_modules/iobroker.roborock/main.js:258:20)
at Roborock.onReady (/opt/iobroker/node_modules/iobroker.roborock/main.js:112:20)
2024-07-23 22:31:08.246  - error: roborock.0 (14305) Exception-Code: ENETUNREACH: connect ENETUNREACH 10.0.0.1:443
2024-07-23 22:31:08.298  - info: roborock.0 (14305) terminating
2024-07-23 22:31:08.300  - warn: roborock.0 (14305) Terminated (UNCAUGHT_EXCEPTION): Without reason
2024-07-23 22:31:08.802  - info: roborock.0 (14305) terminating
2024-07-23 22:31:08.918  - error:  host.iobroker 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:
2024-07-23 22:31:08.918  - error: host.iobroker Caught by controller[0]: Error: connect ENETUNREACH 10.0.0.1:443
2024-07-23 22:31:08.918  - error:  host.iobroker Caught by controller[0]:     at Function.AxiosError.from  (/opt/iobroker/node_modules/axios/lib/core/AxiosError.js:89:14)
2024-07-23 22:31:08.918  - error:  host.iobroker Caught by controller[0]:     at  RedirectableRequest.handleRequestError  (/opt/iobroker/node_modules/axios/lib/adapters/http.js:610:25)
2024-07-23 22:31:08.918  - error: host.iobroker Caught by controller[0]:     at RedirectableRequest.emit (node:events:519:28)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at RedirectableRequest.emit (node:domain:488:12)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at ClientRequest.eventHandlers. (/opt/iobroker/node_modules/follow-redirects/index.js:38:24)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at ClientRequest.emit (node:events:531:35)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at ClientRequest.emit (node:domain:488:12)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at TLSSocket.socketErrorListener (node:_http_client:500:9)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at TLSSocket.emit (node:events:519:28)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at TLSSocket.emit (node:domain:488:12)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at Axios.request (/opt/iobroker/node_modules/axios/lib/core/Axios.js:45:41)
2024-07-23 22:31:08.919  - error: host.iobroker Caught by controller[0]:     at processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-07-23 22:31:08.919  - error:  host.iobroker Caught by controller[0]:     at Roborock.getUserData  (/opt/iobroker/node_modules/iobroker.roborock/main.js:258:20)
2024-07-23 22:31:08.920  - error: host.iobroker Caught by controller[0]:     at Roborock.onReady (/opt/iobroker/node_modules/iobroker.roborock/main.js:112:20)
2024-07-23 22:31:08.920  - error: host.iobroker instance system.adapter.roborock.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2024-07-23 22:31:08.920  - info: host.iobroker Restart adapter system.adapter.roborock.0 because enabled
2024-07-23 22:31:09.606  - warn: tibberlink.0 (817) Error on Tibber feed: connect ENETUNREACH 10.0.0.1:443
2024-07-23 22:31:32.759  - info: reolink.0 (932) Changed state: EmailNotification
2024-07-23 22:31:39.591  - warn: tibberlink.0 (817) Error on Tibber feed: Connection timeout
2024-07-23 22:31:40.202  - info: host.iobroker instance system.adapter.roborock.0 in version "0.6.6" started with pid 14373
2024-07-23 22:31:46.740  - info:  roborock.0 (14373) starting. Version 0.6.6 in  /opt/iobroker/node_modules/iobroker.roborock, node: v20.15.1,  js-controller: 6.0.8
2024-07-23 22:31:46.767  - info: roborock.0 (14373) Starting adapter. This might take a few minutes depending on your setup. Please wait.
2024-07-23 22:31:47.253  - error:  roborock.0 (14373) 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().
2024-07-23 22:31:47.256  - error: roborock.0 (14373) unhandled promise rejection: connect ENETUNREACH 10.0.0.1:443
2024-07-23 22:31:47.258  - error: roborock.0 (14373) Error: connect ENETUNREACH 10.0.0.1:443
at Function.AxiosError.from (/opt/iobroker/node_modules/axios/lib/core/AxiosError.js:89:14)
at RedirectableRequest.handleRequestError (/opt/iobroker/node_modules/axios/lib/adapters/http.js:610:25)
at RedirectableRequest.emit (node:events:519:28)
at RedirectableRequest.emit (node:domain:488:12)
at ClientRequest.eventHandlers. (/opt/iobroker/node_modules/follow-redirects/index.js:38:24)
at ClientRequest.emit (node:events:531:35)
at ClientRequest.emit (node:domain:488:12)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:519:28)
at TLSSocket.emit (node:domain:488:12)
at Axios.request (/opt/iobroker/node_modules/axios/lib/core/Axios.js:45:41)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Roborock.getUserData (/opt/iobroker/node_modules/iobroker.roborock/main.js:258:20)
at Roborock.onReady (/opt/iobroker/node_modules/iobroker.roborock/main.js:112:20)
2024-07-23 22:31:47.260  - error: roborock.0 (14373) Exception-Code: ENETUNREACH: connect ENETUNREACH 10.0.0.1:443
2024-07-23 22:31:47.672  - info: roborock.0 (14373) terminating
2024-07-23 22:31:47.675  - warn: roborock.0 (14373) Terminated (UNCAUGHT_EXCEPTION): Without reason
2024-07-23 22:31:48.177  - info: roborock.0 (14373) terminating
copystring commented 1 month ago

Hi, hast du Netzwerk oder Internetprobleme? Der Adapter für Tibber zeigt ebenfalls Fehler. Könnte die Fehler im Roborockadapter natürlich abfangen, damit dieser nicht mehr abstürzt, aber das eigentliche Problem ist entweder ein Netzwerk/Internetproblem, oder die IP-Adresse von Saugroboter hat sich bei dir geändert und deshalb wird die Verbindung dazu abgelehnt.

Das ist ziemlich klar hier zu sehen:

2024-07-23 22:31:08.246 - error: roborock.0 (14305) Exception-Code: ENETUNREACH: connect ENETUNREACH 10.0.0.1:443 ... 2024-07-23 22:31:09.606 - warn: tibberlink.0 (817) Error on Tibber feed: connect ENETUNREACH 10.0.0.1:443

Ich denke, du solltest das mal prüfen.

copystring commented 1 month ago

Guck mal, ob die dev https://github.com/copystring/ioBroker.roborock/tree/dev bei dir besser läuft, aber wie gesagt, es ist dennoch ein Netzwerkproblem, welches du prüfen müsstest.

ArnoD15 commented 1 month ago

copystring, danke für die Optimierungen, werde ich heute gleich mal testen. Die IP Adresse für den Saugroboter ist fest vergeben und ändert sich nicht. Vodafone hat anscheinend aktuell Probleme mit dem Internet Anschluss und mehrmals am Tag Verbindungsabbrüche. Deswegen sollte aber der Adapter nicht beendet werden sondern maximal eine Warnung ausgeben. Auch bei der W-Lan Verbindung wird der Saugroboter nicht immer erreichbar sein.

ArnoD15 commented 1 month ago

Gerade getestet, leider mit dem gleichen Ergebnis, der Adapter wird beendet, sobald die Internetverbindung abbricht.


2024-07-25 17:18:31.812  - info: host.iobroker "system.adapter.roborock.0" enabled
--
2024-07-25 17:18:33.279  - info:  host.iobroker instance system.adapter.roborock.0 in version "0.6.5"  (non-npm: copystring/ioBroker.roborock#dev) started with pid 3647
2024-07-25 17:18:42.480  - info:  roborock.0 (3647) starting. Version 0.6.5 (non-npm:  copystring/ioBroker.roborock#dev) in  /opt/iobroker/node_modules/iobroker.roborock, node: v20.16.0,  js-controller: 6.0.9
2024-07-25 17:18:42.547  - info: roborock.0 (3647) Starting adapter. This might take a few minutes depending on your setup. Please wait.
2024-07-25 17:18:43.795  - info: roborock.0 (3647) MQTT initialized
2024-07-25 17:19:37.061  - info: roborock.0 (3647) Starting adapter finished. Lets go!!!!!!!
2024-07-25 17:21:14.791  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:15.791  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:15.843  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:16.843  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:16.848  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:17.848  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:17.857  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:18.858  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:18.864  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:19.865  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:19.884  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:20.884  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:20.891  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:21.891  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:21.896  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:22.897  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:22.902  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:23.902  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:23.912  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:24.912  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:24.918  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:25.918  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:25.932  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:26.932  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:26.938  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:27.938  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:27.943  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:28.944  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:28.949  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:29.950  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:29.959  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:30.958  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:30.963  - warn: roborock.0 (3647) MQTT connection close.
2024-07-25 17:21:31.044  - error:  roborock.0 (3647) 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().
2024-07-25 17:21:31.045  - error: roborock.0 (3647) unhandled promise rejection: connect ECONNREFUSED 192.168.1.86:58867
2024-07-25 17:21:31.045  - error: roborock.0 (3647) Error: connect ECONNREFUSED 192.168.1.86:58867
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)
2024-07-25 17:21:31.045  - error: roborock.0 (3647) Exception-Code: ECONNREFUSED: connect ECONNREFUSED 192.168.1.86:58867
2024-07-25 17:21:31.081  - info: roborock.0 (3647) terminating
2024-07-25 17:21:31.083  - warn: roborock.0 (3647) Terminated (UNCAUGHT_EXCEPTION): Without reason
2024-07-25 17:21:31.584  - info: roborock.0 (3647) terminating
2024-07-25 17:21:31.964  - warn: roborock.0 (3647) MQTT connection reconnect.
2024-07-25 17:21:32.206  - error:  host.iobroker Caught by controller[1]: 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:
2024-07-25 17:21:32.208  - error: host.iobroker Caught by controller[2]: Error: connect ECONNREFUSED 192.168.1.86:58867
2024-07-25 17:21:32.210  - error: host.iobroker Caught by controller[2]:     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)
2024-07-25 17:21:32.210  - error: host.iobroker instance system.adapter.roborock.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2024-07-25 17:21:32.211  - info: host.iobroker Restart adapter system.adapter.roborock.0 because enabled
2024-07-25 17:21:34.221  - warn:  tibberlink.0 (760) A feed was disconnected. I try to reconnect with  incremental delay -  Tibber error text: Disconnected from Tibber feed.
2024-07-25 17:21:36.227  - warn: tibberlink.0 (760) Error on Tibber feed: connect ENETUNREACH 10.0.0.1:443
2024-07-25 17:21:37.224  - warn: tibberlink.0 (760) Error on Tibber feed: connect ENETUNREACH 10.0.0.1:443
2024-07-25 17:21:40.227  - warn: tibberlink.0 (760) Error on Tibber feed: connect ENETUNREACH 10.0.0.1:443
2024-07-25 17:21:46.125  - warn: javascript.0 (481) script.js.common.Sonstige: Timer1 Restart Router gestartet
2024-07-25 17:21:48.242  - warn: tibberlink.0 (760) Error on Tibber feed: connect ENETUNREACH 10.0.0.1:443
2024-07-25 17:22:03.686  - info:  host.iobroker instance system.adapter.roborock.0 in version "0.6.5"  (non-npm: copystring/ioBroker.roborock#dev) started with pid 3879
2024-07-25 17:22:04.246  - warn: tibberlink.0 (760) Error on Tibber feed: connect ENETUNREACH 10.0.0.1:443
2024-07-25 17:22:11.277  - info:  roborock.0 (3879) starting. Version 0.6.5 (non-npm:  copystring/ioBroker.roborock#dev) in  /opt/iobroker/node_modules/iobroker.roborock, node: v20.16.0,  js-controller: 6.0.9
2024-07-25 17:22:11.305  - info: roborock.0 (3879) Starting adapter. This might take a few minutes depending on your setup. Please wait.
2024-07-25 17:22:12.207  - info: roborock.0 (3879) Method "deleteState" is deprecated and will be removed in js-controller 7, use "delObject" instead
2024-07-25 17:22:12.209  - info: roborock.0 (3879) Method "deleteState" is deprecated and will be removed in js-controller 7, use "delObject" instead
2024-07-25 17:22:12.210  - error: roborock.0 (3879) Error! Failed to login. Maybe wrong username or password?
2024-07-25 17:22:12.211  - error:  roborock.0 (3879) Failed to login. Most likely wrong token! Deleting  HomeData and UserData. Try again! TypeError: Cannot read properties of  undefined (reading 'token')
2024-07-25 17:22:12.260  - info: roborock.0 (3879) Method "deleteState" is deprecated and will be removed in js-controller 7, use "delObject" instead
2024-07-25 17:22:12.261  - info: roborock.0 (3879) Method "deleteState" is deprecated and will be removed in js-controller 7, use "delObject" instead
2024-07-25 17:22:12.267  - error:  roborock.0 (3879) 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().
2024-07-25 17:22:12.269  - error: roborock.0 (3879) unhandled promise rejection: Cannot read properties of undefined (reading 'rriot')
2024-07-25 17:22:12.270  - error: roborock.0 (3879) TypeError: Cannot read properties of undefined (reading 'rriot')
at Roborock.onReady (/opt/iobroker/node_modules/iobroker.roborock/main.js:127:26)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-07-25 17:22:12.271  - error: roborock.0 (3879) Cannot read properties of undefined (reading 'rriot')
2024-07-25 17:22:12.291  - info: roborock.0 (3879) terminating
2024-07-25 17:22:12.292  - warn: roborock.0 (3879) Terminated (UNCAUGHT_EXCEPTION): Without reason
2024-07-25 17:22:12.794  - info: roborock.0 (3879) terminating
2024-07-25 17:22:12.899  - error:  host.iobroker 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:
2024-07-25 17:22:12.899  - error: host.iobroker Caught by controller[1]: TypeError: Cannot read properties of undefined (reading 'rriot')
2024-07-25 17:22:12.900  - error: host.iobroker Caught by controller[1]:     at Roborock.onReady (/opt/iobroker/node_modules/iobroker.roborock/main.js:127:26)
2024-07-25 17:22:12.900  - error: host.iobroker Caught by controller[1]:     at processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-07-25 17:22:12.900  - error: host.iobroker instance system.adapter.roborock.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
copystring commented 1 month ago

Magst du mal die neue dev testen? Die kannst du hier finden: https://github.com/copystring/ioBroker.roborock/tree/dev In meinem Test taucht damit der Fehler nicht mehr auf.

ArnoD15 commented 1 month ago

Habe gerade die dev Version getestet und der Adapter wird nicht mehr beendet :-) Mann könnte jetzt natürlich noch die Warnungen reduzieren, da das Log File nach 15 min. bereits 42 KB groß ist, aber das ist jetzt Feintuning und Prio 100. Danke für diese Optimierung.

copystring commented 1 month ago

Ich könnte den Intervall des Neuverbindens von 1 Sekunde zu 60 Sekunden erhöhen. Was hälst du davon?

ArnoD15 commented 1 month ago

Das ist doch eine gute Idee. :+1:

copystring commented 1 month ago

Ist eingebaut. Dann läuft ja alles :) Danke für deine Mithilfe.