WiFi module: CB3S
Additional MCU: CX32L003F8
Sensor type: optical smoke detector
Added after 2 [minutes]:
same chips as on https://www.elektroda.com/rtvforum/topic3978070.html but PCB layout and maybe sensor look different
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamp.kaczmarek2 wrote:Thanks, it looks like a TuyaMCU device.
p.kaczmarek2 wrote:Have you tried to capture the TuyaMCU packets?
{
"code": "smoke_sensor_status",
"dp_id": 1,
"type": "Enum",
"values": "{"range":["alarm","normal"]}"
},
{
"code": "smoke_sensor_value",
"dp_id": 2,
"type": "Integer",
"values": "{"unit":"","min":0,"max":100,"scale":1,"step":1}"
},
{
"code": "battery_state",
"dp_id": 14,
"type": "Enum",
"values": "{"range":["low","middle","high"]}"
},
{
"code": "battery_percentage",
"dp_id": 15,
"type": "Integer",
"values": "{"unit":"%","min":0,"max":100,"scale":0,"step":1}"
},
startDriver TuyaMCU
startDriver tmSensor
// may be needed, depends on device, some also use 9600
tuyaMCU_setBaudRate 115200
// smoke detect, 0-100 value, dpID 2
setChannelLabel 2 Smoke
setChannelType 2 ReadOnly
linkTuyaMCUOutputToChannel 2 val 2
// Battery state enumeration, dpID 14
setChannelLabel 14 Battery
setChannelType 14 LowMidHigh
linkTuyaMCUOutputToChannel 14 enum 14
// Battery state, 1-100 % value, dpID 15
setChannelLabel 15 BatteryPercent
setChannelType 15 ReadOnly
linkTuyaMCUOutputToChannel 15 val 15
p.kaczmarek2 wrote:I would not recommend this approach. You should use our OBK automatic HASS Discovery in conjunction with a proper autoexec.bat config.
@wtv you should start with this, however I don't know if baud rate setting is correct, maybe you need to comment it out:startDriver TuyaMCU startDriver tmSensor // may be needed, depends on device, some also use 9600 tuyaMCU_setBaudRate 115200 // smoke detect, 0-100 value, dpID 2 setChannelLabel 2 Smoke setChannelType 2 ReadOnly linkTuyaMCUOutputToChannel 2 val 2 // Battery state enumeration, dpID 14 setChannelLabel 14 Battery setChannelType 14 LowMidHigh linkTuyaMCUOutputToChannel 14 enum 14 // Battery state, 1-100 % value, dpID 15 setChannelLabel 15 BatteryPercent setChannelType 15 ReadOnly linkTuyaMCUOutputToChannel 15 val 15
You can modify this config to include more dpIDs, please look up channel types on our docs.
See more at:
https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
startDriver TuyaMCU
startDriver tmSensor
tuyaMCU_setBaudRate 9600
// smoke sensor value, Int value, dpID 2
setChannelLabel 2 Smoke
setChannelType 2 SmokePercent
linkTuyaMCUOutputToChannel 2 val 2
// Battery state lo-mid-hi, dpID 14
setChannelLabel 14 Battery
setChannelType 14 ReadOnlyLowMidHigh
linkTuyaMCUOutputToChannel 14 enum 14
// Battery state, 0-100 % value, dpID 15
setChannelLabel 15 BatteryPercent
setChannelType 15 BatteryPercent
linkTuyaMCUOutputToChannel 15 val 15
TL;DR: For owners of this CB3S smoke detector, 9600 baud is the working baseline, and one expert conclusion was: "this device can be marked as working." Capture TuyaMCU UART before flashing, keep the detector powered from its 9V battery contacts, and map dpID 2/14/15 in OpenBK7231T for smoke and battery reporting to Home Assistant. [#21436840]
Why it matters: This thread shows the exact conditions needed to make a battery-powered Tuya smoke alarm usable with OpenBK7231T instead of guessing at wiring, power, and dpID mapping.
| Option | What it replaces | Reported result in this thread | Main limitation |
|---|---|---|---|
| OpenBK7231T | CB3S Wi-Fi module firmware | Confirmed working at 9600 baud with smoke and battery entities | Needs correct autoexec.bat and battery-style power behavior |
| ESPHome | Wi-Fi-side integration/logging | UART logs captured, but HA use was described as ineffective | Device may stay in low-power mode |
| Tasmota | Wi-Fi module firmware only | Same TuyaMCU model as OBK conceptually | Still depends on original MCU and dpID discovery |
Key insight: The onboard MCU, not the Wi-Fi module, controls when CB3S powers up. If you force 3.3V onto the module, TuyaMCU transactions may never start at the right time.
startDriver TuyaMCU, startDriver tmSensor, tuyaMCU_setBaudRate 9600, then map dpID 2 as smoke percent, dpID 14 as battery enum, and dpID 15 as battery percentage. One confirmed config used SmokePercent, ReadOnlyLowMidHigh, and BatteryPercent channel types, and it worked in Home Assistant. [#21436840]0.0 on all configured sensors after creating autoexec.bat, while another later confirmed the same type worked at 9600 baud on a similar board. That points to a board-version difference, wiring issue, or missed TX2 logging, not proof that the detector family is unsupported. [#20807426]1 all the time, so it was not needed for useful HA reporting. The same post also suggested dpID 16 might be a siren-silencer toggle, but it was not confirmed as required for basic operation. [#21436840]C8:47:8C:00:00:00, and the direct reply says RF can be easily restored if you have the backup. Without that dump, re-pairing and Tuya cloud behavior may remain broken, so backing up flash before experiments is the safe path. [#20807459]linkTuyaMCUOutputToChannel. The thread gives the exact parameter order: [dpId] [varType] [channelID] [bDPCache] [mult] [bInverse]. For inversion, set dpCache to 0, multiplier to 1, and bInverse to 1. That tells the driver to invert the value before saving it to the channel. [#21694358]