Wemo throwing Error: connect ECONNREFUSED

523 views
Skip to first unread message

Ben Orchard

unread,
Feb 16, 2014, 2:49:42 PM2/16/14
to node...@googlegroups.com
Hello,

The Wemo node has been in and working fine for about 4 days.
This morning, it fails to work with the following error in the console;

16 Feb 11:40:57 - [warn] [wemo out:315b4f9b.cea4b] Error: connect ECONNREFUSED


I have rebooted my router, rebooted the Wemo, rebooted the Ubuntu PC that Node-RED is on, removed the Wemo Node and re-added it.
The Wemo works fine from the Android app.

I did not add or change any flows. Its simply a case of working last night, not working this morning.

Googling the error Econnrefussed shows a lot of generic Node.js errors. Hard to say which one applies heres.


Any thoughts?

Thanks.

Ben

Nicholas O'Leary

unread,
Feb 16, 2014, 3:46:08 PM2/16/14
to node...@googlegroups.com
ECONNREFUSED means the TCP connection to the IP address was refused - a generic error that doesn't reveal much more than that.

All I can suggest is checking whether the IP address of the wemo device has changed.

Nick


--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ben Orchard

unread,
Feb 16, 2014, 3:59:20 PM2/16/14
to node...@googlegroups.com
Hi Nick,

My router is running 'Tomato' firmware and I can check the 'oui', it confirms the MAC as Belkin.
I have then put that MAC as a reserved IP address, so it always remains the same.

I did this last week when I first set up the Wemo.

Will keep tinkering and let the group know if I find anything.

Ben.

Ben Orchard

unread,
Feb 17, 2014, 10:30:29 AM2/17/14
to node...@googlegroups.com
Short version; Its working again.

Long version; Sparing you the long ugly story of how we tracked it down, but it is a case of the IP remains fixed, but the port the Wemo listens on changes....

Nice summary of the problem here;

Tracking it down in Node-RED lead me to the file /node_modules/wemo/wemo.js
On line 6 the port number is hardcoded to 49154, my Wemo (overnight when it was working) had changed from this port number to 49153. Once I changed the port number in this file and restarted Node-RED, my Wemo started working again.

Sorry, Im more of a mash-up guy than coder, so I don't know how to properly fix this for everyone.

Cheers,


Ben.

Nicholas O'Leary

unread,
Feb 17, 2014, 3:48:20 PM2/17/14
to node...@googlegroups.com
This is an issue with the wemo npm module we depend on - it isn't something we can fix in node-red. I don't own a wemo, so I'm not really setup to play around with this.

If anyone in the community wants to poke around with this, please shout.

Nick

Andrew Lindsay

unread,
Feb 18, 2014, 2:36:34 AM2/18/14
to node...@googlegroups.com
Interesting. Could be why I sometimes get no response from my Wemo. Although it seems to go back to the port at sometime and started working without and updates to Node- Red flows.

Will see if I can have a dig around.

Cheers

Andrew

Ben Orchard

unread,
Feb 18, 2014, 1:59:55 PM2/18/14
to node...@googlegroups.com
If this article is anything to go by, Wemo could be changing at some stage in the future;

Michel Cousineau

unread,
Aug 30, 2015, 9:03:53 PM8/30/15
to Node-RED
Thanks Ben since i updated myy wemo Insight to the last firmware it change the port number for me too  from 49154 to 49153 you just save me one week of googeling with this post just want to tank you i use node-red to feed my cat so my cat thanks you too lol :0) 

so i edited the C:\nodejs\node_modules\wemo\wemo.js  line this.port = port || 49154;  To this.port = port || 49153; et Voila! 
M.
Reply all
Reply to author
Forward
0 new messages