andreypopov / node-red-contrib-miio-roborock

Xioami Roborock node-red nodes
Apache License 2.0
32 stars 12 forks source link

"TypeError: Cannot read property 'call' of undefined" Roborock V1 Vacuum #30

Open WhiteLionATX opened 3 years ago

WhiteLionATX commented 3 years ago

I know there is no official support for Roborock Vacuum. But it worked fine for a long time. 6 Month ago my Roborock switched off (battery) . Now I renewed the battery and hoped that it will continue working with this plugin... but It doesn´t. I removed the plugin from node red and reinstalled it. After a fresh installation it worked for 2 commands and stopped now again with error: "TypeError: Cannot read property 'call' of undefined". - I am using the example node for testing. Any idea on that ?

EDIT: Console out:

31 Mar 17:29:16 - [error] [miio-roborock-command:171a5e5f.03438a] TypeError: Cannot read property 'call' of undefined
andreypopov commented 3 years ago

how many vacuums do you use? try to install 2.0.7 version

WhiteLionATX commented 3 years ago

Thanx for your fast answer. I only own one cleaner and there is only this one entry for it configured in the properties. I installed V2.0.7 and it doesn´t seem to help. Here is the console output on V2.0.7:

1 Apr 17:31:50 - [warn] [miio-roborock-server:Vacuum] Miio Roborock Error: Could not connect to device, handshake timeout
(node:25625) UnhandledPromiseRejectionWarning: Error: Could not connect to device, handshake timeout
    at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/home/pi/.node-red/node_modules/miio/lib/network.js:427:17)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:25625) UnhandledPromiseRejectionWarning: 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(). (rejection id: 1)
(node:25625) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

1 Apr 17:32:31 - [error] [miio-roborock-command:171a5e5f.03438a] TypeError: Cannot read property 'call' of undefined
1 Apr 17:32:33 - [error] [miio-roborock-command:171a5e5f.03438a] TypeError: Cannot read property 'call' of undefined
1 Apr 17:32:35 - [error] [miio-roborock-command:171a5e5f.03438a] TypeError: Cannot read property 'call' of undefined
1 Apr 17:35:52 - [error] [miio-roborock-command:171a5e5f.03438a] TypeError: Cannot read property 'call' of undefined

Controlling the cleaner by app works while the plugin shows errors and doesn´t work.

EDIT: I am not sure why but now it seems to work with V2.0.7. Maybe it has to do with connection issues. I will test and report back later.

PinkyFooFoo commented 3 years ago

I also experienced this error and updated to v2.2.2. I can confirm, that this issue is fixed in that Version.

Kiwifranky commented 3 years ago

I also get this problem with 2.2.4.

I have two robots (S50 and S6MaxV) Both where responding to commands when I tried it first. Later I wanted to finish the flow and added Alexa nodes and started tinkering. From that moment on I do only get this respond, whatever I am trying.

Rebooting the raspi helped...

WhiteLionATX commented 2 years ago

I can confirm that it stopped working when going to 2.2.4 I downgraded to 2.2.2 and everything works fin again. Try: npm install node-red-contrib-miio-roborock@2.2.2

tnoppa commented 1 year ago

Got the same error with 2.3.4, nodered running in docker, restart cleared the issue.

frogale commented 1 year ago

Thanks for this thread.. Restart of node-red helped with this error.. I am using 2.3.4 and two Xiaomi Vacuums..