node-red-contrib-miio-roborock
node-red-contrib-miio-roborock copied to clipboard
Connection timeout makes node-red crashing
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
Looks like #19
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.