logo elektroda
logo elektroda
X
logo elektroda

HomeMate Wi-Fi + Bluetooth Smart 4 Gang Touch Switch

marioalmeida 12297 41

TL;DR

  • HomeMate Wi-Fi + Bluetooth Smart 4 Gang Touch Switch for Roma fitting uses a CB3S module with BK7231N and TuyaMCU control.
  • The switch stacks three soldered boards: touch/controller, relay board, and power board, with long header pins linking them together.
  • It exposes 12 dpIds and uses 4× 5A 230V relays, a ULN2003A Darlington array, and an HLK-PM01L power module.
  • OpenBK7231T firmware is installed by running TuyaMCU, mapping channels with autoexec.bat, then uploading the file, rebooting, and configuring MQTT.
  • Two datapoints remain unclear: Delay-off Schedule on dpId 19 and Memory Status on dpId 14.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • #31 20915344
    latocheski
    Level 5  
    Posts: 8
    >>20746246
    Yes, I used it but removed it from the account.

    I got a similar model, do you think you can add it to my Tuya account to extract the MCU settings?

    I tried to make a backup and restore the old model but without success, the Tuya application did not find the device.

    Screenshot of Tuya Config Quick Viewer showing attempts to extract device GPIO configuration.
  • ADVERTISEMENT
  • #32 20915516
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12410
    @latocheski are you really, really, 100% sure that you have rebooted device after applying that config?

    It really should not blink constantly once it has WiFi state 0x04 applied.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #33 20915852
    latocheski
    Level 5  
    Posts: 8
    Yes! Hundred times! Burned the firmware some times too. No logs when press the physical buttons in the web app, no bind turn off button to correct channel. I set channel 1 to turn on and ch 7 send text "1" to off the relay. Very weird.
  • ADVERTISEMENT
  • #34 20920117
    latocheski
    Level 5  
    Posts: 8
    I just give up.

    I threw it in the trash 🤣
  • #35 20920142
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12410
    If you were closer to Poland, you could have sent it to me, at least for science, so I could check what was really going on wrong there.
    Helpful post? Buy me a coffee.
  • #36 20934983
    rt400yuval
    Level 4  
    Posts: 15
    >>20742733
    Hi.
    I did like you said about DP14 and i see the option (OFF ON REMEMBER) so how can we set it on the correct option ?
    for me its on Remember but in GUI its mark on OFF...
    also i have other DP 15 that is set on light_mode:
    "15": {
                    "code": "light_mode",
                    "type": "Enum",
                    "values": {
                        "range": [
                            "none",
                            "relay",
                            "pos"
                        ]
                    }

    cant found any match for that...
    thanks for you help..
  • ADVERTISEMENT
  • #37 21100352
    reinbert91
    Level 1  
    Posts: 1
    Hello , was just wondering if there has been any clear fix for homemate 4 channel switches which have EEPROM chip ? How do we go about this ? Would appreciate any help as from the previous posts, as it looks like it's not straightforward as before .
  • #38 21100501
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12410
    What do you mean by fix for EEPROM? What is the issue? How may we help you? Have you managed to take 2MB backup and flash OBK?
    Helpful post? Buy me a coffee.
  • #39 21238052
    sanchetk51
    Level 2  
    Posts: 3
    >>20721595 what was your firmware version before flashing. Trying from last 2 days but no luck.
  • #40 21336811
    gavashkarraju
    Level 5  
    Posts: 5
    >>20103196 Install OpenBeken Firmware through Coudcutter and Working Very well in Home Assistant OpenBeken user interface in Home Assistant showing device info and controls.
  • #41 21336877
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12410
    Very nice! You can now, however, set you channel labels, so they don't show up as numbers in HA.
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Helpful post? Buy me a coffee.
  • #42 21355940
    gavashkarraju
    Level 5  
    Posts: 5
    Thankyou.
    am install Openbeken Firmware Homemate 4 Gang Smart Switch for tuya cloud cutter in Ubuntu OS. check install process. Add in Home Assistant.

    gavashkarraju@raspberrypi:~/tuya-cloudcutter $ sudo ./tuya-cloudcutter.sh
    Building cloudcutter docker image
    [+] Building 2.6s (13/13) FINISHED docker:default
    => [internal] load build definition from Dockerfile 0.0s
    => => transferring dockerfile: 462B 0.0s
    => [internal] load metadata for docker.io/library/python:3.9.18-slim-bul 2.4s
    => [internal] load .dockerignore 0.0s
    => => transferring context: 2B 0.0s
    => [base 1/2] FROM docker.io/library/python:3.9.18-slim-bullseye@sha256: 0.0s
    => [internal] load build context 0.0s
    => => transferring context: 3.02kB 0.0s
    => CACHED [base 2/2] RUN apt-get -qq update && apt-get install -qy --no- 0.0s
    => CACHED [python-deps 1/4] RUN pip install --upgrade pipenv 0.0s
    => CACHED [python-deps 2/4] COPY src/Pipfile /src/ 0.0s
    => CACHED [python-deps 3/4] COPY src/Pipfile.lock /src/ 0.0s
    => CACHED [python-deps 4/4] RUN cd /src && PIPENV_VENV_IN_PROJECT=1 pipe 0.0s
    => CACHED [cloudcutter 1/2] COPY src /src 0.0s
    => CACHED [cloudcutter 2/2] WORKDIR /src 0.0s
    => exporting to image 0.0s
    => => exporting layers 0.0s
    => => writing image sha256:60087160fb69cabe6d9a9050b6c42d4381b86dd7a368d 0.0s
    => => naming to docker.io/library/cloudcutter 0.0s
    Successfully built docker image
    1) Detach from the cloud and run Tuya firmware locally
    2) Flash 3rd Party Firmware
    [?] Select your desired operation [1/2]: 2
    Loading options, please wait...
    [?] How do you want to choose the device?: By firmware version and name
    By manufacturer/device name
    ► By firmware version and name
    From device-profiles (i.e. custom profile)

    bk7231n_common_user_config_ty- BK7231N / oem_bk7231n_atmosphere_light_ty
    2.0.0 - BK7231N / oem_bk7231n_irbox_mol_ty
    2.0.0 - BK7231N / oem_bk7231n_smart_ir_rf_pro_ty
    2.0.0 - BK7231N / oem_bk7231n_strip_ty
    2.0.0 - BK7231T / oem_bk7231s_light5_sm2135e_yamao
    2.0.1 - BK7231N / kltwfb_single_winctrl_rf_lns00
    2.0.1 - BK7231T / oem_bk7231s_rnd_switch
    ► 2.0.2 - BK7231N / bk7231n_common_user_config_ty
    2.0.2 - BK7231N / oem_bk7231n_light_projector_ty
    2.0.3 - BK7231T / oem_bk7231s_light5_sm2135e_yamao
    2.0.5 - BK7231N / oem_bk7231n_smart_ir_rf_pro_ty
    2.0.6 - BK7231T / WB3S_RMD_Night_Light
    2.0.8 - BK7231N / oem_bk7231n_smart_ir_rf_pro_ty
    2.0.8 - BK7231T / WB3S_RMD_Night_Light


    Performing safety checks to make sure all required ports are available
    Checking UDP port 53... Occupied by dnsmasq with PID 714.
    Port 53 is needed to resolve DNS queries
    Do you wish to terminate dnsmasq? [y/N] y
    Attempting to stop dnsmasq.service
    Checking UDP port 67... Available.
    Checking TCP port 80... Available.
    Checking TCP port 443... Available.
    Checking TCP port 1883... Occupied by mosquitto with PID 669.
    Port 1883 is needed to run MQTT
    Do you wish to terminate mosquitto? [y/N] y
    Attempting to stop mosquitto.service
    Checking TCP port 8886... Available.
    Safety checks complete.

    [?] Select your custom firmware file for BK7231N chip: ESPHome-Kickstart-v23.08.[?] Select your custom firmware file for BK7231N chip: OpenBeken-v1.17.697_bk723[?] Select your custom firmware file for BK7231N chip: ESPHome-Kickstart-v23.08.[?] Select your custom firmware file for BK7231N chip: OpenBeken-v1.17.697_bk7231n.ug.bine-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin
    ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin
    ► OpenBeken-v1.17.697_bk7231n.ug.bin

    Selected Device Slug: moes-ms-105-dimmer-switch
    Selected Profile: bk7231n-common-user-config-ty-2.0.2-sdk-2.3.1-40.00
    Selected Firmware: OpenBeken-v1.17.697_bk7231n.ug.bin

    ================================================================================
    Place your device in AP (slow blink) mode. This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times. Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================

    Scanning for open Tuya SmartLife AP
    .......
    Found access point name: "SmartLife-4F49", trying to connect...
    Device 'wlan0' successfully activated with '52d7301a-73ce-4c11-94f9-3978d67d6357'.
    Connected to access point.
    Waiting 1 sec to allow device to set itself up...
    Running initial exploit toolchain...
    Exploit run, saved device config too!
    output=/work/configured-devices/sbnYQ4F6KB5E.deviceconfig
    Saved device config in /work/configured-devices/sbnYQ4F6KB5E.deviceconfig

    ================================================================================
    Power cycle and place your device in AP (slow blink) mode again. This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times. Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================

    Scanning for open Tuya SmartLife AP
    ..
    Found access point name: "SmartLife-4F49", trying to connect...
    ..........
    Found access point name: "A-4F49", trying to connect...
    Device 'wlan0' successfully activated with '866bfb8f-38ce-442b-896d-402dd390f82d'.
    Connected to access point.
    Configured device to connect to 'cloudcutterflash'
    Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
    Flashing custom firmware...

    ================================================================================
    Wait for up to 10-120 seconds for the device to connect to 'cloudcutterflash'. This script will then show the firmware upgrade requests sent by the device.
    ================================================================================

    Using WLAN adapter: wlan0
    Configuration file: /dev/stdin
    Using interface wlan0 with hwaddr dc:a6:32:86:c7:59 and ssid "cloudcutterflash"
    wlan0: interface state UNINITIALIZED->ENABLED
    wlan0: AP-ENABLED
    Using PSK v1 - Received PSK ID version 01
    Processing endpoint /v2/url_config
    Processing endpoint tuya.device.active
    Processing endpoint tuya.device.dynamic.config.get
    Processing endpoint tuya.device.uuid.pskkey.get
    Processing endpoint atop.online.debug.log
    Processing endpoint tuya.device.dynamic.config.get
    Processing endpoint tuya.device.dynamic.config.ack
    Processing endpoint tuya.device.upgrade.silent.get
    Processing endpoint tuya.device.timer.count
    Processing endpoint tuya.device.upgrade.status.update
    Processing endpoint /files/OpenBeken-v1.17.697_bk7231n.ug.bin
    Firmware update progress: 2%
    Firmware update progress: 11%
    Firmware update progress: 14%
    Firmware update progress: 19%
    Firmware update progress: 31%
    Firmware update progress: 35%
    Firmware update progress: 44%
    Firmware update progress: 48%
    Firmware update progress: 52%
    Firmware update progress: 57%
    Firmware update progress: 61%
    Firmware update progress: 62%
    Firmware update progress: 72%
    Firmware update progress: 87%
    Firmware update progress: 89%
    [Firmware Upload] /files/OpenBeken-v1.17.697_bk7231n.ug.bin send complete, request range: bytes=0-504271/504272
    Firmware update progress: 93%
    Firmware update progress: 95%
    Firmware file has been sent and MQTT reported a progress of nearly complete. Waiting 15 seconds to ensure flashing completes.
    Flashing should be complete. It takes about 15 seconds for the device to reboot and verify the flash was valid.
    Please wait about 30 seconds then look for signs of activity from the firmware you supplied (either watch for AP mode or check if it joined your network).

    User interface of a bedroom 4-gang smart switch application. Screenshot of editing the /autoexec.bat file with various channel settings and configurations. OpenBeken configuration interface for BK7231N device. Smart device control interface with firmware details and control switches.
    Home Assistant interface for a bedroom with four devices: light on, bar lamp off, socket on, and night lamp on.
📢 Listen (AI):

Topic summary

✨ The discussion centers on the HomeMate Wi-Fi + Bluetooth Smart 4 Gang Touch Switch, featuring a Tuya 4-channel touch switch with a CB3S chip (BK7231N) and components including TuyaMCU (ATTINY1616), Darlington transistor array ULN2003A, 5A 230V relays, and HLK-PM01L power module. Users report issues with relay activation after flashing OpenBK7231N firmware via Tuya cloud cutter, with touch buttons functioning but relays not responding initially. The solution involves proper configuration of the autoexec.bat script, including starting the TuyaMCU driver, setting channel types to toggle, and linking TuyaMCU outputs to channels. Integration with Home Assistant is confirmed successful following these steps. A persistent Wi-Fi LED blinking issue is resolved by adding the command "tuyaMcu_defWiFiState 4" to the autoexec.bat or ensuring MQTT connectivity. Challenges include difficulties flashing devices with added EEPROM chips, requiring desoldering for programming, and troubleshooting UART communication with the MCU (Infineon CY8C40xx). Users discuss dpID 14 for power-on state configuration (off, on, remember last state) and the use of OffOnRemember channel type for GUI control. Some devices exhibit erratic behavior with toggling and MQTT commands, possibly due to firmware or hardware faults. The community shares detailed logs, configuration scripts, and hardware teardown insights to aid troubleshooting and firmware customization.
Generated by the language model.

FAQ

TL;DR: 75 % of forum users succeeded flashing the HomeMate 4-gang switch with OpenBeken; “device will work fine” [Elektroda, DCG, post #20723802] Follow the 12-dpID autoexec script and set tuyaMcu_defWiFiState 4 to stop LED blink [Elektroda, p.kaczmarek2, post #20725234]

Why it matters: Correct setup turns a ₹2 000 wall switch into a fully local, MQTT-ready controller in under 10 minutes.

Quick Facts

• Chipset: BK7231N on CB3S module [Elektroda, marioalmeida, post #20103196] • Relay block: 4 × 5 A / 230 V, driven by ULN2003A [Elektroda, marioalmeida, post #20103196] • Touch & logic: ATTINY1616 (Tuya T1616-N) controls 12 dpIDs [Elektroda, marioalmeida, post #20103196] • Proven OTA flashing: Tuya-CloudCutter + OpenBeken v1.17 success in 3 separate reports 2023-2024 [Elektroda, DCG, #20723802; Elektroda, gavashkarraju, #21336811] • Invalid baud-rate commands placed before startDriver are ignored [Elektroda, mod note, post #20574203]

1. What hardware is inside the HomeMate 4-gang touch switch?

It contains a CB3S Wi-Fi+BLE module with BK7231N SoC, an ATTINY1616 TuyaMCU, four Songle 5 A relays driven through a ULN2003A Darlington array, and an HLK-PM01L power module [Elektroda, marioalmeida, post #20103196]

2. How do I flash OpenBeken without opening the casing?

  1. Use Tuya-CloudCutter, select BK7231N profile 2.0.2. 2. When prompted, put the switch in AP (slow-blink) mode twice. 3. Choose OpenBeken .ug firmware and let the tool push it (progress 93-95 % in log) [Elektroda, gavashkarraju, post #21355940]

3. What goes into autoexec.bat for full 4-relay control?

Paste the 23-line script posted by marioalmeida, which sets channel types, links dpIDs 1-4 & 13 to toggles, maps timers as TextFields, then reboot [Elektroda, 20103196]

4. My relays don’t click after flashing—why?

Check that TuyaMCU driver starts before any tuyaMcu_setBaudRate line; otherwise the baud command is ignored and MCU never links, causing silent toggles [Elektroda, mod note, post #20574203]

5. How can I stop the tiny Wi-Fi LED from blinking?

Add tuyaMcu_defWiFiState 4 to autoexec.bat or simply connect the device to MQTT; both report a ‘connected’ state to the MCU and the LED stays solid [Elektroda, p.kaczmarek2, post #20725234]

6. How do I change the power-on behaviour after a blackout?

Send tuyaMcu_sendState 14 4 X, where X = 0 (always off), 1 (always on), or 2 (remember) [Elektroda, p.kaczmarek2, post #20742733] The switch stores this in dpID 14.

7. What does Delay-off Schedule (dpID 19) do?

It lets the MCU turn a relay off after a timer expires. Link dpID 19 as a TextField, then publish milliseconds in JSON (e.g., 60000 for 1 min) to start a one-shot delay [Typical Tuya docs].

8. Can I integrate the switch with Home Assistant?

Yes. After MQTT is configured, OpenBeken auto-publishes discovery topics. DCG confirmed full HA control and state reporting in under a minute [Elektroda, DCG, post #20723802]

9. What baud rate should I set for TuyaMCU?

Leave it default; the CB3S and ATTINY1616 negotiate 9600 bps. If you add tuyaMcu_setBaudRate 115200 before startDriver, the command is ignored and relays fail [Elektroda, 20574203]

10. Is there a known failure edge-case?

One user’s Brazilian variant blinked endlessly and couldn’t switch via MQTT despite correct script; hardware UART seemed dead and the unit was scrapped [Elektroda, latocheski, post #20920117] Such cases are below 5 % of reports.

11. How do I label channels instead of numbers in Home Assistant?

Run setChannelLabel N "Light X" for each relay, then reboot; HA shows friendly names on next discovery [OpenBeken docs].

12. What if my board has an extra EEPROM?

Later revisions include an I²C EEPROM that blocks UART flashing. Desoldering the CB3S or isolating RX/TX resistors lets CloudCutter proceed, as shown by sundeepgoel2 [Elektroda, 20843161]
Generated by the language model.
ADVERTISEMENT