node-red-contrib-miio-roborock icon indicating copy to clipboard operation
node-red-contrib-miio-roborock copied to clipboard

Connection timeout makes node-red crashing

Open 0rsa opened this issue 3 years ago • 3 comments

Debian Buster Node-red 1.2.9 node-red-contrib-miio-roborock 2.2.2 nodejs 14.6.0 or 15.12.0 (I tried with both)

Node-red crashes randomly when there is a timeout with roborock

Encountered an error while controlling device Error(2) was: Call to device timed out Could not get status: Error: Call to device timed out at Timeout.retry [as _onTimeout] (/root/.node-red/node_modules/node-red-contrib-miio-roborock/node_modules/miio/lib/network.js:487:18) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) { code: 'timeout' } 28 Mar 22:21:29 - [info] [miio-roborock-server:S7] Miio Roborock: Initialized Encountered an error while controlling device Error(2) was: Call to device timed out Could not get status: Error: Call to device timed out at Timeout.retry [as _onTimeout] (/root/.node-red/node_modules/node-red-contrib-miio-roborock/node_modules/miio/lib/network.js:487:18) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) { code: 'timeout' } Encountered an error while controlling device Error(2) was: Call to device timed out Could not get status: Error: Call to device timed out at Timeout.retry [as _onTimeout] (/root/.node-red/node_modules/node-red-contrib-miio-roborock/node_modules/miio/lib/network.js:487:18) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) { code: 'timeout' } 28 Mar 22:22:07 - [warn] [miio-roborock-server:S7] Miio Roborock Error: Could not connect to device, token might be wrong 28 Mar 22:22:07 - [warn] [miio-roborock-server:S7] Miio Roborock Error: Could not connect to device, token might be wrong 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: Error: Could not connect to device, token might be wrong at /root/.node-red/node_modules/node-red-contrib-miio-roborock/node_modules/miio/lib/network.js:324:16 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: Error: Could not connect to device, token might be wrong at /root/.node-red/node_modules/node-red-contrib-miio-roborock/node_modules/miio/lib/network.js:324:16

0rsa avatar Mar 29 '21 05:03 0rsa

Looks like #19

becmar39 avatar Apr 05 '21 19:04 becmar39

I removed this library to recover a reliable installation. I saw that this library has a "miio" dependency, which has not been updated for 3 years. I now uses exec nodes which call python miio, which is still actively updated.

0rsa avatar Apr 06 '21 03:04 0rsa

Please, test this version

[email protected]

andreypopov avatar Nov 12 '21 09:11 andreypopov