logo elektroda
logo elektroda
X
logo elektroda

HomeMate Wi-Fi + Bluetooth Smart 4 Gang Touch Switch

marioalmeida 
Product information
Tuya 4 CH touch switch for Roma fitting for Indian homes, it has CB3S chip (BK7231N)

https://amzn.eu/d/3K8uk6I


Technical Specs
TuyaMCU: T1616-N TH 2720E (ATTINY1616)
Darlington transistor array ULN2003A
Relay: 5A 230V x 4
Power Module: HLK-PM01L

This switch consists of 3 board, soldered with long header pins,
Top board is the controller board, top side is with the touch buttons, and on the other side it has CB3S and TuyaMCU, after that, is the relay board and then the power board.

Total dpId 12

0 Object { dpName: "Switch 1", dpId: 1 }
1 Object { dpName: "Switch 2", dpId: 2 }
2 Object { dpName: "Switch 3", dpId: 3 }
3 Object { dpName: "Delay-off Schedule", dpId: 19 }
4 Object { dpName: "Switch 4", dpId: 4 }
5 Object { dpName: "Timer 1", dpId: 7 }
6 Object { dpName: "Timer 2", dpId: 8 }
7 Object { dpName: "Test Bit", dpId: 24 }
8 Object { dpName: "Timer 3", dpId: 9 }
9 Object { dpName: "Timer 4", dpId: 10 }
10  Object { dpName: "Master Switch", dpId: 13 }
11  Object { dpName: "Memory Status", dpId: 14 }

Teardown



Prepare for firmware upload

download the latest firmware from https://github.com/openshwprojects/OpenBK7231T_App/releases/

Create autoexec.bat file with below content

startDriver TuyaMCU

setChannelType 1 toggle
setChannelType 2 toggle
setChannelType 3 toggle
setChannelType 4 toggle
setChannelType 13 toggle

setChannelType 7 TextField
setChannelType 8 TextField
setChannelType 9 TextField
setChannelType 10 TextField

linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 1 2
linkTuyaMCUOutputToChannel 3 1 3
linkTuyaMCUOutputToChannel 4 1 4
linkTuyaMCUOutputToChannel 7 2 7
linkTuyaMCUOutputToChannel 8 2 8
linkTuyaMCUOutputToChannel 9 2 9
linkTuyaMCUOutputToChannel 10 2 10
linkTuyaMCUOutputToChannel 13 1 13


After upload is done. open http://192.168.4.1/app, go to Filesystem and drop the autoexec.bat file in the "drop file(s) here" box, reboot the device, change the host-name, connect to the network, configure MQTT and start using the device with you home automation system.

Added after 7 [hours] 8 [minutes]:

@pkaczmarek2 how to configure the below 2 dbId?
{ dpName: "Delay-off Schedule", dpId: 19 }
{ dpName: "Memory Status", dpId: 14 }

About Author
marioalmeida wrote 47 posts with rating 23 . Been with us since 2022 year.

Comments

parmarshailendra47 20 Apr 2023 12:13

after flashing and finishing the config. toggles are visible but relays are not working. when pressed shoing below in log. but nothing happens to relay. Info:MQTT:Channel has changed! Publishing 1 to... [Read more]

marioalmeida 22 Apr 2023 09:23

when you press the touch button, do you see normal functions? Note:- OBK firmware will interact with the Tuya MCU and not directly with the relays. if there is any issue with the firmware, the touch... [Read more]

parmarshailendra47 22 Apr 2023 09:41

Yes , all touch button is working normal and operate relay when pressed. [Read more]

marioalmeida 23 Apr 2023 14:56

Can you attached the device autoexec file? [Read more]

parmarshailendra47 10 May 2023 07:06

This is the content of autoexec.bat tuyaMcu_setBaudRate 115200 startDriver TuyaMCU setChannelType 1 toggle setChannelType 2 toggle setChannelType 3 toggle setChannelType 4 toggle setChannelType... [Read more]

DCG 04 Sep 2023 22:53

Hey team, any further help in this device ? I have flashed OpenBK7231N via Tuya cloud cutter and now stuck... @parmarshailendra47 any luck with this device ? [Read more]

DCG 06 Sep 2023 21:50

Update - Switch is working fine and able to integrate with Home Assistant aswell :) I just went thru the details in the OP again and followed the "autoexec.bat" instructions. -- Open Web App --... [Read more]

DCG 07 Sep 2023 15:42

@pkaczmarek2 I have a quick query regarding this device Everything is perfectly working, I have noticed that the small Wifi Led on the switch keeps blinking even though its connected to Wifi.. Is there... [Read more]

p.kaczmarek2 08 Sep 2023 02:04

If you have a TuyaMCU device, and it has a LED blinking, it means you need to either: - connect to MQTT so OBK reports it's "connected to cloud" to TuyaMCU - or add following line to autoexec.bat: ... [Read more]

DCG 08 Sep 2023 07:08

Yes once connected to MQTT issue has been resolved, no more led blinking. [Read more]

p.kaczmarek2 08 Sep 2023 08:25

If you want to totally disable led blinking, no matter the MQTT state, add the following line to autoexec.bat script: tuyaMcu_defWiFiState 4 See the list of available WiFi states in TuyaMCU: ... [Read more]

latocheski 08 Sep 2023 23:52

Hello! I set this property "tuyaMcu_defWiFiState 4" in my device which I recorded in my CB2S chip - BK7231N (autoexec.bat) but even so it keeps blinking. I tested other values but without success.... [Read more]

p.kaczmarek2 09 Sep 2023 00:24

But everything else is working? Or maybe you are missing baud setting and there is no communication at all? Disconnect power entirely from device and reconnect it. If I understand you correctly,... [Read more]

latocheski 09 Sep 2023 00:33

Sorry, i'll explain better: The device works fine, i can turn on in the web interface and MQTT, but can't turn off. Only button back to the "off" state, the device not. I need to touch on the physical... [Read more]

p.kaczmarek2 09 Sep 2023 00:36

This is very strange. Backup your config and try: startDriver TuyaMCU tuyaMcu_defWiFiState 4 setChannelType 1 toggle linkTuyaMCUOutputToChannel 1 1 1 The following code should allow you to... [Read more]

latocheski 09 Sep 2023 01:00

Unfortunately, same. https://obrazki.elektroda.pl/2421022200_1694213073_thumb.jpg [Read more]

p.kaczmarek2 09 Sep 2023 08:42

Now, do the following steps: 1. open Web App -> Log 2. Disconnect all power from device 3. Clear log 4. Connect power to the device 5. Wait for it to connect to WiFi 6. Press the physical buttons... [Read more]

latocheski 09 Sep 2023 15:10

Ok, the first boot: I switched the physical button more than 10 times but apparently there is no log Info:MAIN:Main_Init_Before_Delay Info:CFG:####### Boot Count 123 ####### Warn:CFG:CFG_InitAndLoad:... [Read more]

p.kaczmarek2 22 Sep 2023 08:20

dpID 14 describes the state of the device after power up. So, for example, if you lose power in the house, what happens when power comes back. dpID 14 has 3 options: - 0 , means "off by default" - 1,... [Read more]