Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnhandledPromiseRejectionWarning / No Response #3

Closed
raulfunkie opened this issue Aug 10, 2019 · 6 comments · Fixed by #7
Closed

UnhandledPromiseRejectionWarning / No Response #3

raulfunkie opened this issue Aug 10, 2019 · 6 comments · Fixed by #7

Comments

@raulfunkie
Copy link

raulfunkie commented Aug 10, 2019

Getting this error while running homebridge in debug mode to see what's making it not recognize the Robovac as a device. The "devices" show on Home App (Switch to Find and Fan for Vacuum) but they're always on a "No Response" status.

Error

TuyAPI Connecting to 192.168.6.248... +2ms
[8/10/2019, 7:38:40 AM] [LGtv] webOS - TV state: On
(node:1988) UnhandledPromiseRejectionWarning: Error: connection timed out
    at Socket.<anonymous> (/usr/lib/node_modules/homebridge-eufy-robovac/dist/index.js:1:23283)
    at Object.onceWrapper (events.js:291:20)
    at Socket.emit (events.js:203:13)
    at Socket._onTimeout (net.js:434:8)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
(node:1988) 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: 2)
  TuyAPI Socket closed: 192.168.6.248 +5s
Disconnected!
(node:1988) UnhandledPromiseRejectionWarning: Error: connection timed out
    at Socket.<anonymous> (/usr/lib/node_modules/homebridge-eufy-robovac/dist/index.js:1:23283)
    at Object.onceWrapper (events.js:291:20)
    at Socket.emit (events.js:203:13)
    at Socket._onTimeout (net.js:434:8)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
(node:1988) 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: 3)

Config File

	{
      "accessory": "Eufy RoboVac",
      "name": "Robotina",
      "ip": "192.168.6.248",
      "deviceId": "60608308ecfabc982fba",
      "localKey": "b32c7a55c9f1f301"
    }

I've set a reservation for the vacuum on my router to have this specific IP and I got the keys using the guide provided by mitchellrj using adb and logcat.

Any ideas on what could be happening?

@raulfunkie
Copy link
Author

raulfunkie commented Aug 10, 2019

Update 1

I found that I made a mistake using the wrong IP address (it should've been 192.168.7.248 not '6').

I updated that on my config.json:

	{
      "accessory": "Eufy RoboVac",
      "name": "Robotina",
      "ip": "192.168.7.248",
      "deviceId": "60608308ecfabc982fba",
      "localKey": "b32c7a55c9f1f301"
    }

and I'm now getting this error:

  TuyAPI Socket connected. +84ms
Connected!
  TuyAPI GET Payload: +1ms
  TuyAPI { gwId: '60608308ecfabc982fba', devId: '60608308ecfabc982fba' } +1ms
  TuyAPI Error event from socket. 192.168.7.248 Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:183:27) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
} +3ms
{}
  TuyAPI Socket closed: 192.168.7.248 +2ms
Disconnected!
  TuyAPI Socket closed: 192.168.7.248 +0ms
Disconnected!
  TuyAPI Socket connected. +1s
Connected!
  TuyAPI GET Payload: +1ms
  TuyAPI { gwId: '60608308ecfabc982fba', devId: '60608308ecfabc982fba' } +0ms
  TuyAPI Error event from socket. 192.168.7.248 Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:183:27) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
} +4ms
{}
  TuyAPI Socket closed: 192.168.7.248 +2ms
Disconnected!

@jeromeof
Copy link

jeromeof commented Sep 7, 2019

I am also getting this exception:

homebridge_1 | (node:408) UnhandledPromiseRejectionWarning: Error: find() timed out. Is the device powered on and the ID or IP correct?
homebridge_1 | at s (/homebridge/node_modules/homebridge-eufy-robovac/dist/index.js:1:25846)
homebridge_1 | at Timeout.setTimeout [as _onTimeout] (/homebridge/node_modules/homebridge-eufy-robovac/dist/index.js:1:26478)
homebridge_1 | at ontimeout (timers.js:436:11)
homebridge_1 | at tryOnTimeout (timers.js:300:5)
homebridge_1 | at listOnTimeout (timers.js:263:5)
homebridge_1 | at Timer.processTimers (timers.js:223:10)
homebridge_1 | (node:408) 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)
homebridge_1 | (node:408) [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.

But I have both the correct IP address and the localKey values (from the JSON captured payload). My RoboVac is 30c and I believe I have the latest firmware. 1.1.3 Wifi and 1.1.4 MCU according to the RoboVac app.

I also tried eufy-robovac project demo and unfortunately it does not work. So is this code still working for people with the latest Eufy firmware updates?

@jeromeof
Copy link

jeromeof commented Sep 7, 2019

OK, it looks like there was a update which broken this code but the python based eufy_robovac project seems to have fix it in this branch

https://github.com/mitchellrj/eufy_robovac/tree/tuya_3_3

There demo code here works with my Robovac 30c

@crazywako
Copy link

crazywako commented Sep 22, 2019

@jeromeof

OK, it looks like there was a update which broken this code but the python based eufy_robovac project seems to have fix it in this branch

https://github.com/mitchellrj/eufy_robovac/tree/tuya_3_3

There demo code here works with my Robovac 30c

Did you get this working on Homebridge? Cause I couldn't get it working and I have the same exact error ( Error: find() timed out. Is the device powered on and the ID or IP correct?)

EDIT: found a solution. I did build eufy-robovac myself and moved it to homebridge-eufy-robovac/node_modules/eufy-robovac.

If someone has the same problem you can replace homebridge-eufy-robovac/dist/index.js with this: https://pastebin.com/evYiCzqb

@raulfunkie
Copy link
Author

@crazywako would you mind sharing your whole homebridge-eufy-robovac folder? I can't get it to work. I replaced the file mentioned above but still no dice on the Home app. :(

@apexad
Copy link
Owner

apexad commented May 21, 2020

@crazywako Mind doing a pull request or sharing your changes to either https://github.com/joshstrange/homebridge-eufy-robovac or https://github.com/joshstrange/eufy-robovac so that we can get this working without having to use a transpired index.js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants