libretiny-eu / libretiny

PlatformIO development platform for IoT modules
http://docs.libretiny.eu/
MIT License
419 stars 62 forks source link

Wifi disconnecting and not coming back up #196

Open lmcd opened 1 year ago

lmcd commented 1 year ago

I'm working with ESPHome on an RGB bulb - and if I interact with the bulb for a bit, scrubbing through colours etc, the connection will eventually drop and not come back up without a power cycle.

Sometimes I get about 20 seconds out of it, sometimes a few minutes, but will always eventually disconnect.

I can run a continuous effect on the bulb and trigger a disconnect, and the effect will continue running, so I think this confirms it hasn't crashed or anything.

Unfortunately I can't debug over serial as the UART pads are inaccessible. I flashed the device with tuya-cloudcutter.

The chip is a bk7231n based. Specifically it's a CB2L: https://developer.tuya.com/en/docs/iot/cb2l-module-datasheet?id=Kai2eku1m3pyl

lmcd commented 1 year ago

Also worth noting that I was using these bulbs for months with the stock Tuya firmware, and never experienced any connectivity issues.

lmcd commented 1 year ago

I have noticed this is only occurring when when the logger is active via esphome run If I ctrl+c after an esphome run, the bulb will never go down. If I leave the logger running, it'll last a minute or two before requiring a power cycle.

alexkramer98 commented 11 months ago

Same problem here. Tried max_power settings all the way down to 0.2, current for all channels to 10ma, turning off the logger. Facing these issues in both bk7231n and bk7231t RGB bulbs (Action LSC). In my testing, only two of four bulbs seem to face these issues. It takes about 5-60 minutes before they disconnect.

Sometimes the bulb seems to randomly reboot (light turning off and on again), but this seems to have improved by setting max_power to <0.8.

alexkramer98 commented 11 months ago

Update: looks like it's a wifi issue. Some lights that have <=2/5 bars of wifi randomly disconnect. Some never get back online. The 2.4Ghz wifi channels are very crowded where I live, so maybe that has something to do with it.

Never experienced this issue using the stock Tuya firmware (or other devices) though (same location). Solved by placing an additional wifi access point closer to the disconnecting bulbs.

coltc50 commented 11 months ago

I had the same experience and fixed it also with a additional access point but I wish it get fixed from the ground...