Unkown tuya chip

tuya energy monitor plug board: cb2s



Esphome code

substitutions:
  devicename: tuya20a # ${devicename}
  voltage_divider: "806.1586102719033"
  current_resistor: "0.001067391066279705"
  current_multiply: "0.4406190321602622"

esphome:
  name: tuya20a
  friendly_name: tuya-20a

bk72xx:
    board: cb2s
    framework:
      version: dev
      options:
        LT_AUTO_DOWNLOAD_REBOOT: 0


status_led:
  pin: P8                          # P8 WifiLED //Синий светодиод

binary_sensor:
  - platform: gpio
    id: buttontuya20a
    name: Button $devicename
    pin:
      number: P10                  #  кнопка P10 Btn (канал 1)
      mode: INPUT_PULLUP
      inverted: true
    on_press:
      - switch.toggle: relay


  - platform: status
    name: "$devicename Status" 

switch:
  - platform: gpio
    id: relay
    name: "${devicename} Relay"
    pin: P26                        # P26 Рел (канал 1)


  - platform: restart
    name: "${devicename} Restart"


##########################################################

sensor:
  - platform: hlw8012
    model: BL0937
    current_resistor: ${current_resistor}
    voltage_divider: ${voltage_divider}
    sel_pin:
      number: P24               #  P24 BL0937SEL
      inverted: True
    cf_pin: 
      number: P7               
      inverted: True            # P7 BL0937CF
    cf1_pin: 
      number: P6                
      inverted: True            # P6 BL0937CF1
    current:
      name: "${devicename} Current"
      accuracy_decimals: 1
      filters:
        - multiply: ${current_multiply}
    voltage:
      name: "${devicename} Voltage"
      #accuracy_decimals: 0
    power:
      name: "${devicename} Power"
      filters:
        # Multiplication factor from W to kW is 0.001
        - multiply: 0.001
      unit_of_measurement: kW
    energy:
      name: "${devicename} Energy"
      filters:
        # Multiplication factor from Wh to kWh is 0.001
        - multiply: 0.001
      unit_of_measurement: kWh
    update_interval: 8s
    #voltage_divider: 1538

###########################################################
  - platform: wifi_signal
    name: "$devicename WiFi Signal"
    update_interval: 60s

  - platform: uptime
    name: ${devicename} Uptime Sensor
    id: tuya20a_sensor
    update_interval: 30s
###########################################################

text_sensor:
  - platform: libretiny
    version:
      name: LibreTiny Version $devicename 
  
  
  - platform: version
    name: "${devicename} ESPHome Version"
 
    
  - platform: wifi_info
    ip_address:
      name: "IP ${devicename}"
    ssid: 
      name: "${devicename} ssid" 


  - platform: debug
    reset_reason:
      name: "${devicename} Reset Reason"

Hello,

So after a lot of search and finding i manage to flash Open Beken on Zmai 90 and is work nice:

To succesfully flash need to desolder RN8209 and after this all is clear:

If you saw in this picture RN8209 is exactly near my solder cable , and template for Open Beken is like this:

{
  "vendor": "Tuya",
  "bDetailed": "0",
  "name": "Full Device Name Here",
  "model": "enter short model name here",
  "chip": "BK7231N",
  "board": "TODO",
  "flags": "0",
  "keywords": [
    "TODO",
    "TODO",
    "TODO"
  ],
  "pins": {
    "6": "WifiLED_n;0",
    "7": "Btn;0",
    "14": "BridgeREV;0",
    "16": "BridgeFWD;0",
    "26": "LED_n;0"
  },
  "command": "backlog startDriver Bridge; startDriver RN8209; PowerSave 1; startDriver NTP; ntp_setServer 93.190.144.3; ntp_timeZoneOfs +2; SetupEnergyStats 1 60 60;",
  "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
  "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
}

And this is command to start when boot or restart:

backlog startDriver Bridge; startDriver RN8209; PowerSave 1; startDriver NTP; ntp_setServer 93.190.144.3; ntp_timeZoneOfs +2; SetupEnergyStats 1 60 60;

Thanks

How did you open this plug? did you break?

Can someone please help me here? Can these be flashed with Tasmota?
I have 4 curtain switches like these.

Thank you!



It’s an ESP02 so shouldn’t be an issue to flash with either Tasmota or ESPhome

1 Like

Found another Version of MOES Smart Switch Modules: WM-104B-M

It is very tiny:
40x40 mm and comes with a railmount kit (also screwable).

But it contains also an CB2S…

I ordered some WT32c3-01n:

for replacement.

Hopefully this will works.
Not sure about the powermeter. We will see.

Some more details:

You can flash with esphome now, lots of progress for beken chip since the last 2 years. Unless you need to flash tasmota