wemo-client icon indicating copy to clipboard operation
wemo-client copied to clipboard

Examples crash with Error: addMembership EHOSTUNREACH

Open m-altmeyer opened this issue 8 years ago • 6 comments

First of all thank you so much for this great work! I just bought an Insight switch and wanted to try out your API but was not able to get the examples running. I tried 'insight.js' but always got the following error when calling wemo.discover(...):

Error: addMembership EHOSTUNREACH
    at exports._errnoException (util.js:1026:11)
    at Socket.addMembership (dgram.js:508:11)
    at addMembership ([***]\wemo-test\node_modules\node
-ssdp\lib\index.js:177:19)
    at Socket.onSocketListening ([***]\wemo-test\node_m
odules\node-ssdp\lib\index.js:173:5)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at startListening (dgram.js:121:10)
    at dgram.js:228:7
    at _combinedTickCallback (internal/process/next_tick.js:77:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

The insight switch is in the same network as the PC running the example. Moreover I am able to control the switch using the official Wemo App. Do you have any idea what might cause this issue?

Thank you so much and all the best, Max

m-altmeyer avatar Nov 19 '16 19:11 m-altmeyer

Seems related to node-ssdp. Which OS are you running?

timonreinhard avatar Nov 19 '16 19:11 timonreinhard

I am running on Windows 10

m-altmeyer avatar Nov 19 '16 19:11 m-altmeyer

Can you please try upgrading node-ssdp to the latest 2.9.0 (e.g. by bumping the version in package.json and then running npm update)? If that still doesn't help, I suppose you create an issue for node-ssdp.

timonreinhard avatar Nov 19 '16 19:11 timonreinhard

Thank you for your fast reply. I updated to 2.9.0 but still get the same error. I'll raise an issue at node-ssdp and I think this one can be closed.

m-altmeyer avatar Nov 19 '16 19:11 m-altmeyer

Requires diversario/node-ssdp#66

timonreinhard avatar Nov 23 '16 11:11 timonreinhard

If you're on Windows, you'll almost certainly need to install IIS. I had the same issue, and this fixed it. You can find a brief guide on installing it here.

Tip of the hat to Fullstack React authors, whose book I remembered saying something to this effect.

jeffrey-cochran avatar Jun 27 '17 14:06 jeffrey-cochran