# WiFi events and strange going on's

**URL:** <https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673>\
**Category:** General\
**Created:** [27 June 2019 21:14 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673 "2019-06-27T21:14:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [27 June 2019 21:14 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/1 "2019-06-27T21:14:38Z")

</div>

Recently I have been having problems with a RPZ(W) and connections.

_Originally_ it was working nicely. Then one day it started _dropping off line_ for no reason.

Being headless, it was difficult to know what was happening. Alas a _power cycle_ was the only way to get it up again.

Then one day I looked at the logs as I noticed it going _AWOL_ / offline.

It was not much I could understand, but I carried on investigating.

What has thrown a spanner in the works is today/this morning.

Last night the RPZ was up and working.

All the machines use `MQTT` to talk to one another and if/when they are disconnected, they send a message.

That's all well and good.

So: Last night it was online, working.  
I powered down **this** machine, not it, not the `MQTT` server.  
This morning, I got up and looked at the `MQTT` logs.

Green one is the `MQTT host` and the grey one is the RPZ.

![Screenshot%20from%202019-06-28%2006-59-07](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b0b9db78e2c1e6453dfdea315d18ab0258ccc0a4.png) ![Screenshot%20from%202019-06-28%2007-08-11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d8432bd03834c02d7071baa3b5cb8da8280afb6f.png)

Now, ok, I'm confused too.  
Green one: 06:25:52 TelePi comms up. (RPZ)  
That is about when I turned on **this** machine. I saw the LED blink as I turned it on. (Or I think I did.)  
Grey one: 06:26:49 TelePi comms up.

That's nearly 1 minute later.

Why did I get that message? (Semi-rhetorical) If it (TelePi) was already _up_ why would it send that message again?

Alas the LOG file isn't turned on, so I can't look at the actual log. ☹ Drats.

But I'm curious to what is going on here and why.

The two machines are 2 m apart. It isn't like they are in different rooms with walls between then.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [27 June 2019 21:34 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/2 "2019-06-27T21:34:24Z")

</div>

Is this related to node-RED, or O/T?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 June 2019 00:23 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/3 "2019-06-28T00:23:52Z")

</div>

> [@Trying\_to\_learn](#):
>
> But I'm curious to what is going on here and why.

Check power supplies first.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2019 03:02 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/4 "2019-06-28T03:02:31Z")

</div>

Paul,

I was siply asking. for help with an outside view of what is happening.

TotallyInformation,

Thanks.

They are _official_ RPI power supplies.

The mystery deepens.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [28 June 2019 04:52 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/5 "2019-06-28T04:52:31Z")

</div>

Are there any other devices connected between the two machines, like a router or access point?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2019 07:11 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/6 "2019-06-28T07:11:45Z")

</div>

No. The green RPI is a WAP and the grey RPI is connected directly to it via wifi.

Though the reliability of the RPI WAP has been mentioned as somewhat questionable.  
ie: not 100% guaranteed.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [28 June 2019 07:24 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/7 "2019-06-28T07:24:57Z")

</div>

The antenna on a ZeroW is not very strong, and can be easily disrupted by external emr.

Although not specific to your case I always use an external antenna with a Zero.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2019 07:26 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/8 "2019-06-28T07:26:55Z")

</div>

Yes, I get that, but the two are only about 2 m apart. One piece of particle board between them which is a shelf.

I hope that isn't too much.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [28 June 2019 07:29 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/9 "2019-06-28T07:29:39Z")

</div>

I have two devices in the same room for instance and when the boss lady uses the microwave, throughput drops to essentially zero.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 June 2019 07:36 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/10 "2019-06-28T07:36:38Z")

</div>

> [@Trying\_to\_learn](#):
>
> Green one: 06:25:52 TelePi comms up. (RPZ)  
> That is about when I turned on **this** machine. I saw the LED blink as I turned it on. (Or I think I did.)  
> Grey one: 06:26:49 TelePi comms up.  
> That's nearly 1 minute later.  
> Why did I get that message? (Semi-rhetorical) If it (TelePi) was already _up_ why would it send that message again?

I don't see a green message timestamped 06:25:52

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2019 07:38 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/11 "2019-06-28T07:38:16Z")

</div>

My apologies. 06:26:52 I need to get my eyes checked.

I think it was 07:25 when I posted it and the optics weren't up to speed for the day.

😉

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 June 2019 07:41 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/12 "2019-06-28T07:41:13Z")

</div>

> [@Trying\_to\_learn](#):
>
> Yes, I get that, but the two are only about 2 m apart. One piece of particle board between them which is a shelf.

It is actually possible that the WiFi power setting on your router is too high. I've seen this before. If your router permits it, try changing the power output from auto to low.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [28 June 2019 07:45 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/13 "2019-06-28T07:45:59Z")

</div>

> [@TotallyInformation](#):
>
> It is actually possible that the WiFi power setting on your router is too high.

I think he has them directly connected.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2019 07:46 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/14 "2019-06-28T07:46:56Z")

</div>

No Bobo, they are connected by WiFi.

TotallyInformation:  
The WAP is a RPI 2B (?A)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 June 2019 07:59 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/15 "2019-06-28T07:59:40Z")

</div>

On the assumption that those are MQTT LWT messages an important note is that they are not generated by the pi that is connecting or disconnecting, they are _defined_ by the pi but _generated_ by the MQTT server. Also the wording you have used is incorrect, it should be something like "TelePi is connected to MQTT server" and "TelePi is disconnected from MQTT server".  
If a client is subscribed to the MQTT topic when the server sees that TelePi has connected or disconnected then it will send that message immediately, but if a client connects (or re-connects) at some time later then it will send it the message when it subscribes (assuming that you have said that the LWT messages are Retained). That is why the wording 'TelePi shutting down' may be misleading, if a client subscribes to the LWT topic minutes, hours, days or even years after TelePi disconnected then it would get that message immediately, even though TelePi might have disconnected ages ago.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2019 08:11 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/16 "2019-06-28T08:11:00Z")

</div>

Thanks Colin,

I only made the message under what I understood at the time.

My set up is that the LWT (and Birth certificates) are sent on EOM and SOM channels.  
Set up in/on the MQTT config node of the MQTT host.  
And on the RPZ Those messages are set for the connection....  
Hang on.

This is on TelePi:  
 ![Screenshot%20from%202019-06-28%2018-06-53](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/438348b302666059df01668a52c35213183ec88c.png)

So I know this isn't exactly correct with what is done, it helps me see what is going on - I think/hope.

The MQTT broker monitors the SOM and EOM channels and that is from where I got those messages.

The "grey" screen is TelePi (not the MQTT broker) and the "green" screen is the MQTT broker.  
I have TelePi also subscribed to SOM and EOM in a attempt to see all sides of what is going on.

So I am not sure I am doing the best thing to see what is happening, but I hope this shows me as best I can.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 June 2019 08:52 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/17 "2019-06-28T08:52:04Z")

</div>

> [@Trying\_to\_learn](#):
>
> The WAP is a RPI 2B (?A)

Sorry, I don't know how to set WiFi power on a Pi. However, as you are using a Pi rather than a dedicated WiFi AP, you need to make sure that the Pi isn't tripping over its own processes and so causing dropouts. I know you said it was only happening with the Pi Zero but it is theoretically possible that is because the Pi0 is more sensitive?

I've never used a Pi as an AP and wouldn't really want to as WiFi is far too sensitive to external issues anyway. Even professional level AP deployments are a black art and it seems that issues are often dealt with using the brute force of having more AP's & lowering each AP's transmission power.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2019 08:55 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/18 "2019-06-28T08:55:10Z")

</div>

Thanks.

Not 100% the RPZ(w). I have an Arduino connected too and it has a lot of fun connecting too.

But other people have said that it (a NodeMCU) is renound (? spelling) for dropouts.  
So it is a bit of a guessing game there.

But what you say could be worth considering.

Could you elaborate on what you mean:

> [@TotallyInformation](#):
>
> you need to make sure that the Pi isn't tripping over its own processes and so causing dropouts.

Again: Thanks.!  
Basic layout.

![RPI%20WAP](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e7682b34fef175039dcd6143d831890979fdecae.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 June 2019 09:08 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/19 "2019-06-28T09:08:00Z")

</div>

> [@Trying\_to\_learn](#):
>
> Could you elaborate on what you mean

What else is running on the WAP? Does it have CPU or I/O spikes? I'm no expert on Pi WiFi but this could, in theory cause the Pi to stop responding which _might_ cause a dropout?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2019 09:23 UTC](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673/20 "2019-06-28T09:23:32Z")

</div>

The WAP is not going to get too populated.

I have the Arduino - that will be constant.

And I just realised I **am an idiot**. The RPZ(w) doesn't connect to that WAP.

The RPZ connects to a REAL WAP - my _router/modem_ which has WAP.  
That way it is on my network.

Because the two WAPs seem to go up and down around the same time - which indicates they may be fighting on channels - I get them mixed up when talking about _the WAP_.

Oh, poop!

Ok, stepping back.  
Yes, with the first post of the two logs, TelePi sends/shows "comms up" at 06:26:49-52.  
TelePi is connected to the network via my modem's WAP. That is where all the computers connect.

The RPI WAP is for the Arduino (GPS) to connect for local time injection - when that gets working.

I got up and turned on **this** machine. (Nuc) and as I did it I noticed the LED blink on the RPZ.  
As it (the RPZ) had been playing games of locking up now and then and needing a power reset, I logged on to my network and looked at the two logs.

Seeing the message the TelePi had just sent a "comms up" message and nothing since 15:18:59 the previous day......

So I got confused. (Hits self on back of head as "wake up" message).

The other WAP is in another room with a brick wall between. (That's WAP (modem) to RPZ (TelePi))

So, the possibility of poor signal is actually now valid. Though a brick wall and a total linear distance of.....5m isn't that far.

But why would "TelePi" send a "comms up" message at about the same instance I turned on **this** computer?

I get that the other RPI (the green MQTT broker) would also see it. The message was sent.

Cringes in shame for making such a mistake.

[Next page](https://discourse.nodered.org/t/wifi-events-and-strange-going-ons/12673.md?page=2)
