SRGBmods / plugins

Repo for SignalRGB Plugins
0 stars 4 forks source link

Issue with WLED bulb losing WiFi connection #1

Closed zwamdurkel closed 6 days ago

zwamdurkel commented 6 months ago

I have a problem with this WLED plugin. When using signalRGB, my Athom 15W WLED bulb will randomly lose its wifi connection, and I am no longer able to access it using the WLED app on my phone. I noticed the bulb got very hot and traced the problem back to this signalRGB plugin.

This is the code that causes my problem

if(currentTime - this.lastUpdate >= (Math.floor(Math.random() * 10000) + 50000)) {
    this.lastUpdate = currentTime;
    this.getDeviceInfo();
}

I changed the 50000 to 1000000 and since this change, I've no longer had this issue. (Note: I do not think this should be the permanent fix)

Granted, I have not studied the exact workings of the code, but as far as I understand, the plugin will fetch the COMPLETE device data every couple of minutes. I cannot see why this should be necessary, especially if I have already set up all my devices. There should be an option to stop discovery/continously fetching complete device data.

Please fix this. I've already "solved" it for myself, but I imagine other people experience the same issue, without knowing why.

FeuerSturm commented 6 days ago

Fetching device data every once in a while is required for updating the connection strength indicator and to detect offline devices. I am using Athom bulbs myself as well and never encountered any issues even when running the whole day.

I'll think about adding an option to disable device updates though.