# Newb: debugging connectivity

**URL:** https://discourse.nodered.org/t/newb-debugging-connectivity/79715
**Category:** General
**Created:** [10 July 2023 20:57 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715 "2023-07-10T20:57:00Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![jsprenkle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jsprenkle/32/81249_2.png) [@jsprenkle](https://discourse.nodered.org/u/jsprenkle)
#### Post date: [10 July 2023 20:57 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/1 "2023-07-10T20:57:00Z")

</div>

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

Thanks!

---

<div class="post-metadata">

### Author: ![jsprenkle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jsprenkle/32/81249_2.png) [@jsprenkle](https://discourse.nodered.org/u/jsprenkle)
#### Post date: [10 July 2023 21:09 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/2 "2023-07-10T21:09:24Z")

</div>

I just found something in a system log

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

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [10 July 2023 22:09 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/3 "2023-07-10T22:09:59Z")

</div>

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.

regards

Craig

---

<div class="post-metadata">

### Author: ![jsprenkle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jsprenkle/32/81249_2.png) [@jsprenkle](https://discourse.nodered.org/u/jsprenkle)
#### Post date: [10 July 2023 23:47 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/4 "2023-07-10T23:47:19Z")

</div>

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 ☹

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [11 July 2023 01:02 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/5 "2023-07-11T01:02:02Z")

</div>

> [@jsprenkle](#):
>
> sonoff basic switch

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

---

<div class="post-metadata">

### Author: ![jsprenkle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jsprenkle/32/81249_2.png) [@jsprenkle](https://discourse.nodered.org/u/jsprenkle)
#### Post date: [11 July 2023 01:39 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/6 "2023-07-11T01:39:04Z")

</div>

[[SONOFF S31/S31LITE - Power Usage Monitor Plug Wifi Smart Socket](https://sonoff.tech/product/smart-plugs/s31-s31lite/)]([https://S31](https://S31) Light)

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [11 July 2023 02:12 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/7 "2023-07-11T02:12:01Z")

</div>

Not sure if this may be of some help ?

> **[Offline Sonoff S31](https://community.home-assistant.io/t/offline-sonoff-s31/551290)**
>
> I’m new to HA so please be gentle … I have HA setup with Sonoff S31 switches as well as an S40. I’ve loaded Sonoff LAN and put in FW blocks to keep the switches from talking back to the eWelink portal. Initially setup it all works, except that...

Or seems easy to reflash with eg tasmota -

> **[SONOFF S31 | digiblurDIY](https://digiblur.com/wiki/devices/plugs/sonoff_s31/)**
>
> iTead SONOFF S31 Smart Power Monitoring Plug Template and Setup for TASMOTA and ESPHome

---

<div class="post-metadata">

### Author: ![jsprenkle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jsprenkle/32/81249_2.png) [@jsprenkle](https://discourse.nodered.org/u/jsprenkle)
#### Post date: [11 July 2023 03:27 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/8 "2023-07-11T03:27:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [11 July 2023 13:32 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/9 "2023-07-11T13:32:33Z")

</div>

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 😉

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

---

<div class="post-metadata">

### Author: ![jsprenkle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jsprenkle/32/81249_2.png) [@jsprenkle](https://discourse.nodered.org/u/jsprenkle)
#### Post date: [11 July 2023 13:45 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/10 "2023-07-11T13:45:02Z")

</div>

> [@Sean-McG](#):
>
> just be careful not to plug it in when flashing

fzzt! boom?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [9 September 2023 13:45 UTC](https://discourse.nodered.org/t/newb-debugging-connectivity/79715/11 "2023-09-09T13:45:36Z")

</div>

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