logo elektroda
logo elektroda
X
logo elektroda

SNT961W CO+CH4 Gas Sensor with TYWE3S (ESP8266). TuyaMCU Reboot Loop.

lynxchat 12 0
ADVERTISEMENT
  • #1 21753691
    lynxchat
    Level 1  
    Good afternoon!
    I bought a CO CH4 (gas) sensor for my boiler room a while ago.
    Here's the link to AliExpress.
    https://aliexpress.ru/item/1005009156680185.html

    The marking inside is SNT961W.
    Chip TYWE3S (ESP8266 2MB)

    I flashed the OpenBK, but after activating the TuyaMCU in autoexec, the sensor blinks blue twice, then purple, and beeps, repeating indefinitely. I think the TuyaMCU chip itself is rebooting. ESP works without rebooting.
    The same thing happened when I tried to restore the original firmware without filling all the bytes with zeros first.
    The logs that were running at that moment only show 2 dpID.
    You can see it in the screenshot.

    What do you recommend?

    I collected the dpID information from the original firmware.

    {"18":"Auto-Detect",
    "19":"Auto-Detect Result",
    "20":"Preheat",
    "21":"Fault Alarm",
    "24":"Silence",
    "25":"Gas Detection State",
    "26":"Detected Gas",
    "29":"Alarm state",
    "34":"CO state",
    "35":"CO value",
    "101":"Alarm push interval",
    "102":"Alarm push times",
    "103":"CO Warning",
    "104":"Button alarm",
    "105":"Gas warning"}

    self_checking Boolean
    "{true,false}"

    checking_result Enum
    {
    "range": [
    "checking",
    "check_success",
    "check_failure",
    "others"
    ]
    }

    preheat Boolean
    "{true,false}"

    muffling Boolean
    "{true,false}"

    gas_sensor_state Enum
    {
    "range": [
    "alarm",
    "normal"
    ]
    }

    gas_sensor_value Integer
    {
    "unit": "",
    "min": 0,
    "max": 10000,
    "scale": 1,
    "step": 1
    }

    alarm_state Enum
    {
    "range": [
    "alarm_sound",
    "alarm_light",
    "alarm_sound_light",
    "normal"
    ]
    }

    co_state Enum
    {
    "range": [
    "alarm",
    "normal"
    ]
    }

    co_value Integer
    {
    "min": 0,
    "max": 1000,
    "scale": 1,
    "step": 1
    }
    SNT961W CO+CH4 Gas Sensor with TYWE3S (ESP8266). TuyaMCU Reboot Loop.
    SNT961W CO+CH4 Gas Sensor with TYWE3S (ESP8266). TuyaMCU Reboot Loop.
    Printed circuit board with electronic components and connected wires
    AI: Which exact version of OpenBK did you flash, and could you share your configuration settings (especially any changes made before enabling TuyaMCU)?
    Last versoin on github for ESP8266 chip
    AI: How are you activating TuyaMCU in your autoexec—could you provide the specific commands or configuration steps you used?

    // Start TuyaMCu driver
    startDriver TuyaMCU

    // Set baud (as key was 9600)
    tuyaMCU_setBaudRate 9600

    // If using MQTT comment out tuyaMcu_defWiFiState 4
    // waitFor MQTTState 1
    tuyaMcu_defWiFiState 4

    // Mappings [dpID] [varType] [tgChannel]

    // CO - map dpID 35, type var(2) to Ch 1
    setChannelLabel 1 "CO value"
    setChannelType 1 ReadOnly
    linkTuyaMCUOutputToChannel 35 2 1

    // co_state - map dpID 34, type enum(4) to Ch 2
    setChannelLabel 2 "CO state (1 Alarm, 0 Normal)"
    setChannelType 2 ReadOnly
    linkTuyaMCUOutputToChannel 34 4 2

    // Detected Gas" dpID 26, type var(2) to Ch 1
    setChannelLabel 3 "Gas value"
    setChannelType 3 ReadOnly
    linkTuyaMCUOutputToChannel 26 2 1

    // Gas Detection State - map dpID 25, type enum(4) to Ch 2
    setChannelLabel 4 "Gas detection state (1 Alarm, 0 Normal)"
    setChannelType 4 ReadOnly
    linkTuyaMCUOutputToChannel 25 4 2
  • ADVERTISEMENT
ADVERTISEMENT