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