Newb: debugging connectivity

Good afternoon,
I've setup node-red on a raspberry pi3b+ and I'm learning how to use it.
I have a sonoff basic switch, and installed "node-red-contrib-sonoff-lan-mode : sonoff-lan-listener"
It shows "disconnected" in the editor and I'm trying to figure out why.

The sonoff app works fine with the device.
The command line on the pi shows the ip address and that it's connected via the wireless adapter.
I configured node-red using that IP and the default port.
The pi iptables firewall is set for default allow.

Is there a way to get an exception trace or something similar from the flow editor window?
The only other thing I can think of would be to install postman and try to talk to it manually


I just found something in a system log

[sonoff-lan-control:Sonoff] Error: WebSocket is not open: readyState 0 (CONNECTING)

I think you will find most of the people on the forum flash the sonoff devices with an alternate firmware to break them away from the cloud - the most popular being tasmota and esphome.



I was hoping to avoid cracking the really well secured case to flash it with Tasmota, and they advertise a local lan only API.

Unfortunately I think it doesn't work for me because the device I purchased isn't one that has that option. It doesn't respond because there's nothing listening :frowning:

I'm not sure what that is can you post a link to the device ?

[SONOFF S31/S31LITE - Power Usage Monitor Plug Wifi Smart Socket](https://S31 Light)

Not sure if this may be of some help ?

Or seems easy to reflash with eg tasmota -

1 Like

I see a lot of references to HomeAssistant while searching, but I've only got NodeRed.
Thanks for the reference though.

I think I'll have to flash it. I've flashed tasmota on a bare esp32 board so I have some experience with it.
I read about ESPeasy. I'll check out ESPHome too.

HA post caught my eye as it talks about a similar issue with offline mode.

I have all my smart devices running Tasmota, it does everything I need and is constantly updated with new features. I can't speak for the other options as after trying a few options several years ago I decided to stick with Tasmota :wink:

The guide I posted shows the process very well (just be careful not to plug it in when flashing !!)

1 Like

fzzt! boom?


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