AlakhaiVaynard / homebridge-vesync

Homebridge plugin for vesync WiFi Power Outlets
11 stars 11 forks source link

Error: getaddrinfo EAI_AGAIN server1.vesync.com:4007 #9

Open mikepaxton opened 5 years ago

mikepaxton commented 5 years ago

Running Homebridge on a Raspberry Pi 3B+ with the latest version of Raspbian: 4.14.79-v7+ Nobejs version: v8.16.0 Homebridge has been working for some time now but today I noticed none of my Vesync devices were working in the Home app. Upon further checking using "pm2 monit homebridge" I noticed there seems to be an issue with a DNS resolution. This is the specific error that Homebridge continually throughs.

{ Error: getaddrinfo EAI_AGAIN server1.vesync.com:4007 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) homebridge > errno: 'EAI_AGAIN', homebridge > code: 'EAI_AGAIN', homebridge > syscall: 'getaddrinfo', homebridge > hostname: 'server1.vesync.com', homebridge > host: 'server1.vesync.com', homebridge > port: '4007' }

I thought I maybe having and issue with my installation of Raspbian so I installed Homebridge on a new Pi and found it was having the same issue. I thought maybe it was an issue with vesync's servers but I'm able to use their app on my iPhone to turn the devices on and off. At this point I'm not sure what else to try?

cryptobrian commented 5 years ago

Same with me. Everything worked perfectly until today.

[VesyncPlug] DeviceDiscovery invoked (node:696) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND server1.vesync.com server1.vesync.com:4007 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:58:26) (node:696) 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) [6/3/2019, 9:07:53 PM] [VesyncPlug] DeviceDiscovery invoked (node:696) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND server1.vesync.com server1.vesync.com:4007 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:58:26) (node:696) 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)

pvanessen commented 5 years ago

Same issue here.

tjenvy commented 5 years ago

Same

running on macOS El Capitan

jason-klein commented 5 years ago

Same. Also running Homebridge 0.4.50 on a Raspberry Pi 3B+ with the latest version of Raspbian.

I began seeing these same errors in homebridge.log on 06/03/2019 5PM UTC. I am still seeing these errors when I try to control devices as of 06/04 3:30AM UTC.

(node:3666) UnhandledPromiseRejectionWarning: Error: getaddrinfo EAI_AGAIN server1.vesync.com server1.vesync.com:4007
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
(node:3666) 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: 55)

The VeSync API hostname "server1.vesync.com" used by the homebridge-vesync plugin is not resolving to an IP address. You can confirm by attempting to resolve the hostname manually. There is no response.

dig +short server1.vesync.com

In comparison, the VeSync API hostname used by the pyvesync and vesync-python Python packages resolves fine:

dig +short smartapi.vesync.com
vesyncappapi-1834200178.us-east-1.elb.amazonaws.com.
18.215.128.157
34.199.243.149
35.171.38.237
54.85.103.105
54.86.239.110

I just confirmed that the latest pyvesync Python code is able to monitor and control each of my Etekcity Plugs.

I am hoping this is just a temporary outage. I am concerned that the VeSync API may have changed, but cannot find the VeSync API docs to confirm. Can someone point me to the VeSync API docs?

Others are reporting that Alexa is no longer able to control their VeSync devices in the past few hours, so it is possible the Amazon Alexa integration relies on the same API. Sources: Twitter, Reddit

tjenvy commented 5 years ago

It also appears as long as this vesync is in the config.json no other connections work. My simplisafe, and tuya-lan never complete discovery. I removed the line entries in config.json and now may other accessories work. can still use the vesync app for the rest for now

tjenvy commented 5 years ago

appears to have been temporary, back online this morning.

jason-klein commented 5 years ago

Same. Back online again. Errors in homebridge.log stopped just before 06/04/2019 5AM UTC. It is now 06/04/2019 12PM UTC.

I can also resolve the VeSync API hostname that was previously not responding:

dig +short server1.vesync.com
54.165.236.125
54.196.86.188

I am working to migrate to locally controlled devices because of problems like this. I purchased these before I knew there were locally-controlled options. Good reminder that an internet outage or a vendor API outage prevents me from turning on/off a plug. The VeSync Plugs are going to move up on my list of devices to replace.

cryptobrian commented 5 years ago

Which local devices are you thinking about getting? I’ve also been thinking about migrating everything to local, but haven’t decided on what yet

jason-klein commented 5 years ago

Hey @cryptobrian - Moving off-topic conversation so we don't clutter this issue. See response here: https://github.com/jason-klein/discuss/issues/1