TYWE2S (Brilliant Bahama DC Fan) dropout issues

Hi all,

I have a number of Brilliant Bahama DC fans which run a TYWE2s. See https://community.home-assistant.io/t/brilliant-bahama-smart-dc-ceiling-fan-australia/241662
I havent been able to spend as much time as I wanted until recently trying to integrate these more robustly.

I am seeing all units connect, can integrate and control via HA no issue. What I am struggling with is shutdowns of the TYWE2S. All units go offline, at random timing intervals from 1 min to 1 hr after connection.
I have attempted both Tasmota (v10.0 and 11.0) and ESPhome.
Tasmota key settings: Module54 etc (this is working based on HA integration), Setoption60 0, Sleep 0, Setoption41 30 (to rule out network arp issues) and setoption127 1.

ESPHome config:

esphome:
  name: mainbed-fan

esp8266:
  board: esp01_1m

web_server:
  port: 80
  
# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:

tuya:

uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 9600

ota:
  password: "xxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  power_save_mode: none

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Mainbed-Fan Fallback Hotspot"
    password: "xxxxxxx"

captive_portal:

fan:
  - platform: "tuya"
    name: "MainBedFan"
    switch_datapoint: 1
    speed_datapoint: 3
    direction_datapoint: 4
    speed_count: 5

light:
  - platform: "tuya"
    name: "MainBedLight"
    switch_datapoint: 9

On loss of connection, the only way to reconnect the units I have found is via a 30 second power cycle.
The losses will occur with the fans operating or not.
I have even replaced one of the TYWE2S chips on the fan I felt this was occuring on most often, without luck.
Does anyone have any suggestions??

Not any suggestions on how to fix this, but I made the same experience. The ESP was gone quicker or more likely when the ceiling fan was actually on - while off the ESP was still communicating for days or sometimes weeks. I also tried ESPHome and Tasmota but that didn’t make any big difference.

Unfortuntaly my device died in a recent lightning strike, so I can’t do any more testing.

It would really be interesting to hear from anyone who has not flashed this unit and uses one of the Tuya integrations.

Thanks. Glad im not alone on this.
I came across this today (https://github.com/esphome/issues/issues/1237. I am running a TPLINK EAP Omada mesh here, and was using 20/40Mhz previously. I have changed this to 20Mhz width without luck again.

The above shows random losses prior to going offline solid which is interesting also.
The short interval disconnections are occuring every minute exactly.

Further to the above.
As a trial programmed a new tywe2s with the common (renamed only) esphome instance.
I am seeing the same regular disconnect with the chip programmes, and powered via serial 3.3V supply.

Plenty of updates I thought I would share in case others have the same or similar problems.

  1. Set static IP via esphome
    Set fast_connect: on also.
    Trialled as bare chip overnight with 100% uptime.
    Installed and ran for around an hour. Then experienced solid drop outs. Noted drop outs occured at similar times, but not the same, across all units.

  2. Noted on other forums etc of people having issues with wifi channel width. Set all APs to 20Mhz and locked 2.4Ghz ssids to channel 6. No major improvement here.

  3. disabled mDNS on all units. Noted potentially some minor improvements in stability, but still experience high speed / high load / higher temp related issues on longer runs.

  4. noted data bit high on datapoint 2 (unused). Trialled ignoring datapoint 2 on one unit, with ignoring datapoint 5, 6, 7, 8 on other units. All units failed after time, but stability of ignoring datapoint 2 was much greater and this ran longer than all other units at the same speed etc.

  5. Given all units failed after time, particuarly on higher load, and modules were physically warm when removed, looked to lower chip temp as possible problem lowered output power of wifi and disabled reboot_timeout to rule out basis of shutdown. No major improvement here.

  6. recompiled esphome with esp8285 module rather than esp01_1m module defined. Since compiling and installed ota, all units have been operating without drop out including extended run. I understand operating freq, storage etc appear to be the same on these modules, but this had definately been a major improvement. No solid drop outs, some minor wifi drops on one unit (network issue) which self resolved. Updated esphome yaml below.

esphome:
  name: mainbed-fan

esp8266:
  board: esp8285
  framework:
    version: latest
    
web_server:
  port: 80
  
# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  reboot_timeout: 0s

tuya:
  ignore_mcu_update_on_datapoints: 2

uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 9600

ota:
  password: *****

wifi:
  ssid: *****
  password: *****
  power_save_mode: light
  fast_connect: on
  reboot_timeout: 0s
  output_power: 15dB
  manual_ip:
    static_ip: *.*.*.*
    gateway: *.*.*.*
    subnet: *.*.*.*
    dns1: *.*.*.*
    dns2: *.*.*.*
  ap:
    ssid: "Mainbed-Fan Fallback Hotspot"
    password: *****

mdns:
  disabled: true
  
captive_portal:

fan:
  - platform: "tuya"
    name: "MainBedFan"
    switch_datapoint: 1
    speed_datapoint: 3
    direction_datapoint: 4
    speed_count: 5

light:
  - platform: "tuya"
    name: "MainBedLight"
    switch_datapoint: 9