Can't access Node-Red GUI after adding Sonoff devices to network

Things were going great until I got my first Sonoff devices today. I quickly learned that they don't play nice with 5 GHz networks. I have a dual band router so I changed my SSID and password on the 5GHz network and left the 2.4 GHz network untouched. This way I wouldn't have to reconfigure all my ESP devices in my system.

Things went smooth and everything got back on the network as expected. I was able to log into my 2 Raspberry Pi and desktop computer, all good.

But when I go to the Node-Red GUI and dashboard it says the server refused the connection.

When I fire up Node-Red from the Raspberry Pi command line I get the following error.

15 Mar 15:01:49 - [error] Error: listen EACCES: permission denied
    at Server.setupListenHandle [as _listen2] (node:net:1446:21)
    at listenInCluster (node:net:1511:12)
    at Server.listen (node:net:1599:7)
    at Server.listen (/home/pi/.node-red/node_modules/nodejs-websocket/Server.js:119:14)
    at Object.module.exports.createServer (/home/pi/.node-red/node_modules/simple-sonoff-server/sonoff.server.module.js:263:8)
    at new SonoffServer (/home/pi/.node-red/node_modules/node-red-contrib-sonoff-server/config-server/config-server.js:33:61)
    at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:90:27)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:180:44)
    at Object.start [as startFlows] (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:394:33)

I didn't change anything on the router aside from the password...

Looks like I might need to open up port 443?

Anyone know what might be going on?

I give my 5g wifi a different ssid, as they could still try to connect to the 5g devices if same ssid.

Yeah, they are different. And the Sonoff devices are showing up on the router.

Also, I'm running Apache on the same Pi as Node-Red and it's serving up web pages as usual.

One other detail.

The last thing I was doing in Node-red before the lockup was trying to configure a Sonoff Server. Note that one of the error messages mentions it specifically

 at Object.module.exports.createServer (/home/pi/.node-red/node_modules/simpl                                                                                             e-sonoff-server/sonoff.server.module.js:263:8)

Is there a way I can safely remove that module? Just navigate to that folder and clear it out?


Are you trying to connect via HTTPS?

No. But that error message seems to suggest that...

I seem to remember the sonoff nodejs server asks you to install fake certs.

OK, after looking at this a bit more I'm pretty sure it's the Sonoff server module causing problems. It was the last pallet I installed and the error message at NodeRed restart suggests it as well.

So since I can't get to it through the GUI I'll have to do it though a terminal.

Would it be safe to just navigate to where the folder is and delete everything? Or would this further trash things?


If you installed by pallette, then start node-red in safe mode and uninstall the pallette item. Or or from command, in the node red folder run
npm remove simple-sonoff-server then stop and restart node-red, or is it node-red-contrib-simple-sonoff-server

Just deleting it will not remove it, as it is in the package json, so npm will install it again.

1 Like

OK, i removed the sonoff server directory and it works! I'm glad that happend before sundown :wink:

As @E1cid said, if you just deleted the folder then the next time you do anything with npm it will helpfully re-install it for you. You must uninstall it, either from within Manage Palette in node-red or via the command line.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.