jimmywarting / wemo-client

JavaScript client library for controlling and subscribing to Wemo Devices
MIT License
132 stars 40 forks source link

Subscription error: ECONNRESET throwing unhandled #32

Closed dircm closed 8 years ago

dircm commented 8 years ago

Getting unhandled error from events.js after installing 0.8.0::

Triggering when light turns on.

wemo-client Subscription error: ECONNRESET - Device: uuid:Lightswitch-1_0-221530K1301390, Service: urn:Belkin:service:basicevent:1 +26ms
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at exports._errnoException (util.js:870:11)
    at TCP.onread (net.js:544:26)
pi@raspberrypi:~/HAP-NodeJS $ 
timonreinhard commented 8 years ago

You need to attach an error event listener to the client: wemo.client(deviceInfo).on('error', function(err) { … })

nfarina commented 7 years ago

Just got bitten by this - might be nice to include this in the README sample code!

timonreinhard commented 7 years ago

Thanks for your feedback. With 612cacf the README has been updated accordingly.