WLED Random Turn On

@ogiewon .... i had no idea about the router best practices. I will definately try them. AFA Alexa, no they are not shared, so i can rule that out.

I changed a setting in WLED today and will see results tonight. Then will start looking into my router.

Thanks

1 Like

Seeing how you are trying anything at this point, I had issues with my WLED devices when the mDNS setting was populated. You might try clearing it out and seeing if it help? Mine would randomly reboot or cause noise over the strip that looked like data corruption but clearing that field fixed all issues.

1 Like

mDNS was already turned off. Thanks.

@ogiewon, could you provide a bit more clarification on the router setup. Last night's attempt was fruitless, so I will try your suggestion tonight.

My router doesnt have a zigbee setting. My hub setting currently is:


Is this where you want me change the channel?

Also, my hub is directly connected to router. Where do i change the wifi channel you recommended?

Thanks for your help.

1 Like

What 2.4 GHz WiFi channels is your router using? And is the channel width 20 MHz or 40 MHz?

If you look at @ogiewon's diagram, it reveals how 2.4 GHz WiFi can interfere with zigbee. So for example, if you use zigbee channel 11 (as indicated by your screenshot), you would be better off using WiFi channels 6 or 11.

The Rax80 2.4ghz is 40mhz but will switch to 20mhz with high traffic.

I've changed the wifi channel from auto to 6 as suggested. I'll report back tomorrow to see if it works.

It still seems like a driver issue to me, though. If i disable all WLED devices in HE before i go to bed, there are no restarts during the night.

Thanks for your help.

From your description that seems to be the case. You might wish to ask others who use these devices, like @stephen_nutt, which driver they use. And a screen shots describing configuration of the WLED device itself.

I agree it does seem that way since disabling the device made it stop. However, need overnight debug logs. If there are no scheduled jobs then the driver should not be sending anything to the device. If the device sends some sort of check in overnight and the driver responds with something it should show up in debug logs. When I skimmed the driver code the debug logging looked pretty extensive.

If the driver is not sending anything to the device, then I do not see how it could be a driver issue, or how disabling it would have actually fixed it.

@jtp10181, i wish i had them to send you, but all Wled device logs are empty. I tried reinstalling them a couple days ago and initially the logs responded, but then stopped. There is also nothing in the hub logs for the devices during overnight.

Im using esp8266, if that makes a difference.

I really appreciate all the help here. Thanks.

First go to the device page and confirm that the logging is still enabled, some drivers will shut it off automatically but I did not see that code in the driver you posted. You can check scheduled jobs after logging is turned on to see if it created a task to shut it back off later.

Then try turning the device on / off from the device page. Then check the logs again. If logging is on then surly something would have been logged for that simple test.

This is just to confirm that logging is working.

2 Likes

Loggjng was already enabled.

After switching the strip on and off a few times, the only thing populated was the Events tab which showed the command being executed.

Logs tab is empty. No scheduled tasks.

First try re-saving the settings to be sure it is enabled (and not just visually showing).

Then also check the full logs by going to logs on the left sidebar. You can even open it in a new tab and have live logs open while you do the test.

UPDATE: I looked at the code again, and it uses a fire-and-forget method. So when you run the ON command it just fires out the message to the device, and also at the same time updates the state assuming it will work. It never actually verifies the command worked from what I can see. There is NO debug logging in this chain either....

Looking further, this driver looks like a work in progress.

If you want to try and insert a debug line around here we could see what the heck it is doing I think.

image

Something like this should do the trick.

log.debug "sendEthernetPost: ${params}"

I don't think any private info will be revealed with those logs.

Ok....as soon as i resaved the Prefernces, logs started working. Hubs logs showing the same.

On/Off only showing up in Events. No scheduled jobs.

Yes, see my update above. Its not the logs "started working" again, its that this driver is not as great in the logging department as I originally thought. Only certain things get logged, like a refresh should for example. But not on/off.

Edited the driver as suggested. Saved driver and returned to device. Pressed Off....logs generating new stuff (3 at 1pm):

Ok that should do the trick then.
Now we wait. If the driver sends ANYTHING to the device, it should be logged I think. The other code which was sending had debug logs in the data response handler already.

Lol, yup for sure. We'll see what happens tonight. Thanks so much for your help.

Kind regards.

@jtp10181 - Is there any sort of reconnect logic in the driver? Just curious if the driver tries to reestablish communications if it is lost, and if that logic might somehow be responsible to the bahvior being seen? In my experience, ESP8266 devices typically do not have a very good antenna, and are more prone to WiFi disconnect/reconnect issues. Just another hypothesis. :thinking:

1 Like

It does not appear to establish any sort of persistent connection with the device. It only sends out httpGet or httpPut (async) on demand as needed. If the scheduled refresh is turned off it should doing absolutely nothing in the middle of the night.

2 Likes

Thanks for looking!

1 Like

So, I've just had one device come on spontaneously. That has never happened during the day.

There is nothing in the logs showing this occurred. In fact, the device page is showing it as 'off'. But if i press off, it turns off.

I looked in WLED app. Looks like uptime was reset at about that time. I have app configured to NOT 'turn on after power-up/reset' though.

And it just did it again, while is was posting!!!