logo elektroda
logo elektroda
X
logo elektroda

[BK7231N CB2S] Moes 2CH Dimmer WIFI Tuya - WM-105B-M openBeken Tasmota

przemsi_ele 468 0
ADVERTISEMENT
  • #1 21549820
    przemsi_ele
    Level 11  
    Podmiana z Tuya na OpenBeken i Tasmota w MOES 2CH WiFi WM-105B-M WIFI prawdopodobnie mniejszy brat WM-105B
    W środku CB2S (Tuya fwv. 3.1.17) i TuyaMCU HT66F3195 (MCU fw v 2.3.0)



    Moes Smart Dimmer Module WM-105B-M with visible terminal markings and technical specifications.
    MOES 2CH WiFi controller module with visible CB2S module on PCB, showing model label, screw terminals, and electronic components. Close-up of the MOES WM-105B-M module PCB with visible SMD components and circuit traces. CB2S module with model name and serial number on a blue background, visible solder pads. CB2S module desoldered from PCB, visible traces and connection pins. CB2S module with QR code label and HT66F3195 chip on a PCB in a MOES 2CH WiFi device. MOES 2CH WiFi WM-105B-M module PCB with visible elements: CB2S module, capacitors, and relay. Small green printed circuit board with electronic components and a black buzzer.

    Do flashowania oczywiście wylutowałem CB2S z TuyaMCU:
    dump tuya:
    
       "dxom14": [
          {
             "mode": "rw",
             "property": {
                "type": "bool"
             },
             "id": 1,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 10,
                "max": 1000,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 2,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 10,
                "max": 1000,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 3,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "range": [
                   "led",
                   "incandescent",
                   "halogen"
                ],
                "type": "enum"
             },
             "id": 4,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 10,
                "max": 1000,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 5,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 0,
                "max": 86400,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 6,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "type": "bool"
             },
             "id": 7,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 10,
                "max": 1000,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 8,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 10,
                "max": 1000,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 9,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "range": [
                   "led",
                   "incandescent",
                   "halogen"
                ],
                "type": "enum"
             },
             "id": 10,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 10,
                "max": 1000,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 11,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 0,
                "max": 86400,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 12,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "range": [
                   "off",
                   "on",
                   "memory"
                ],
                "type": "enum"
             },
             "id": 14,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "min": 5,
                "max": 15,
                "scale": 0,
                "step": 1,
                "type": "value"
             },
             "id": 31,
             "type": "obj"
          },
          {
             "mode": "rw",
             "property": {
                "range": [
                   "flip",
                   "sync",
                   "button"
                ],
                "type": "enum"
             },
             "id": 47,
             "type": "obj"
          }
    


    tuya dpId:

    dpId 1 on/off
    dpId 2 dimmer: [ 10 - 1000 ]
    dpId 3 Minimum brightness1 >= 10
    dpId 4 Type of light source1
    dpId 5 Maximum brightness1 <= 1000
    dpId 6 Countdown1: [s]
    
    dpId 7 on/off
    dpId 8 dimmer : [ 10 - 1000 ]
    dpId 9 Minimum brightness2 >= 10     
    dpId 10 Type of light source2
    dpId 11 Maximum brightness2 <=1000
    dpId 12 Countdown2: [s]
    
    dpId 14 Power-on Status Setting : [ 0 - Power-on OFF, 1 - Power-on ON , 2- Power-on Memory ]
    dpId 31 Dimming Gradient Time : [ 5-15s ]
    dpId 47 Switch Type: [ Button, Sync, Flip ] [ 0- sync ??? wtf, 1-toggle ,2-button ]


    flash + analiza TuyaMCUAnalyzer:

    Close-up of an ESP development board programmer connected to an electronic module with a blue PCB.

    testy:

    Electronic module with connected gas sensor on a blue service mat.
    Smart Dimmer Module controller with a connected ESP-02S Wi-Fi module and removed yellow case on a blue background.

    Screen:

    Control panel for two light dimmers with brightness, timer, and lamp type settings.
    Control panel for configuring dimmer channels and button settings in an IoT device.
    Control panel of a BK7231N device with various configuration and diagnostics options.

    {
      "vendor": "Moes",
      "bDetailed": "0",
      "name": "Two Channel Smart Dimmer Module",
      "model": "MS-105B-M",
      "chip": "BK7231N",
      "board": "CB2S",
      "pins": {},
      "tags": [
        "TuyaMCU",
        "HT66F3195",
        "baud 9600"
      ],
      "image": "https://obrazki.elektroda.pl/3748350200_1747309356.png",
      "wiki": "https://www.elektroda.com/rtvforum/topic4122045.html"
    }


    autoexec.bat
    
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 9600
    tuyaMcu_defWiFiState 4
    startDriver NTP
    ntp_timeZoneOfs 2
    ntp_setServer  153.19.250.123 
    
    
    
    tuyaMcu_setDimmerRange 200 1000
    setChannelType 1 toggle
    setChannelLabel 1 "Dimmer 1"
    setChannelType 2 toggle
    setChannelLabel 2 "Dimmer 2"
    setChannelType 3 dimmer
    setChannelLabel 3 "1 Brightness" 
    setChannelType 4 dimmer
    setChannelLabel 4 "2 Brightness"
    
    setChannelType 5 Textfield
    setChannelLabel 5 "1 timer in seconds. Set 0 to cancel,"
    setChannelType 6 Textfield
    setChannelLabel 6 "2 timer in seconds. Set 0 to cancel,"
    
    setChannelType 11 OffOnRemember
    setChannelLabel 11 "Power-On State"
    
    
    setChannelType 8 Textfield
    setChannelLabel 8 " Dimming Gradient Time : [ 5-15s ]"
    
    setChannelType 9 Textfield
    setChannelLabel 9 " Type of light Dimmer1 [ 0 - Led, 1 - Incandescent(żarówka), 2 - Halogen ]"
    setChannelType 10 Textfield
    setChannelLabel 10 " Type of light Dimmer2 [ 0 - Led, 1 - Incandescent(żarówka), 2 - Halogen ]"
    // min max 
    //ch1
    setChannelType 17 Textfield
    setChannelLabel 17 " CH1 Dimmer_min [ >= 10 ]"
    setChannelType 18 Textfield
    setChannelLabel 18 " CH2 Dimmer_max [ <= 1000 ]"
    //ch2
    setChannelType 19 Textfield
    setChannelLabel 19 "  CH2 Dimmer_min [ >= 10 ]"
    setChannelType 20 Textfield
    setChannelLabel 20 "  CH2 Dimmer_max [ <= 1000 ]"
    
    
    startDriver httpButtons
    
    //Switch Type dpId=47 
    alias switchtype1 uartsendhex 55AA000600052F040001003E
    setButtonEnabled 1 1
    setButtonLabel 1 "Switch button type to sync ?? wtf"
    setButtonCommand 1 "switchtype1"
    setButtonColor 1 "#DC0077"
    
    alias switchtype2 uartsendhex 55AA000600052F040001013F
    setButtonEnabled 2 1
    setButtonLabel 2 "Switch button type to toggle"
    setButtonCommand 2 "switchtype2"
    setButtonColor 2 "#DC0077"
    
    alias switchtype3 uartsendhex 55AA000600052F0400010240
    setButtonEnabled 3 1
    setButtonLabel 3 "Switch button type to Button"
    setButtonCommand 3 "switchtype3"
    setButtonColor 3 "#DC0077"
    //                       dpId    element number
    linkTuyaMCUOutputToChannel 1 bool 1
    linkTuyaMCUOutputToChannel 7 bool 2
    //dimmer
    linkTuyaMCUOutputToChannel 2 val 3
    linkTuyaMCUOutputToChannel 8 val 4
    // timery
    linkTuyaMCUOutputToChannel 6 val 5
    linkTuyaMCUOutputToChannel 12 val 6
    // type of light
    linkTuyaMCUOutputToChannel 4 val 9
    linkTuyaMCUOutputToChannel 10 val 10
    // power on state
    linkTuyaMCUOutputToChannel 14 enum 11
    // min max ch1
    linkTuyaMCUOutputToChannel 3 val 17
    linkTuyaMCUOutputToChannel 5 val 18
    // min max ch2
    linkTuyaMCUOutputToChannel 9 val 19
    linkTuyaMCUOutputToChannel 11 val 20
    


    Tasmota po przeszczepie na ESP-02 też działa, jak podrobie to postaram się wrzucić.
    Do zrobienia pozostaje:
    1. zmiana przełączania typu źródła światła , tak jak enum OnOffMemory czy LowMedHi
    2. zmiana przełączania typu przycisku zewnętrznego, tak jak enum OnOffMemory czy LowMedHi
    3. ustawienie brightness_min i brightness_max albo w jeden pasek (slider) z ruchomym początkiem i końcem, lub w dwa osobne slidery, jak to było poruszane gdzieś przez @p.kaczmarek2 , nie wiem jak to ogarnąć więc zrobiłem na typie Textfield.
    4. może ewentualnie countdown time też obsługiwać za pomocą slidera.

    Za błędy i niedociągnięcia z góry przepraszam :)
  • ADVERTISEMENT
ADVERTISEMENT