Hello I am owner of a YG400A-W smoke detector and new to the forum.
I have flashed the device with OpenBK7231T/OpenBeken release 1.17.553.
A few facts:
1) I don't get any MQTT message when device is sleeping and real smoke is detected (THE PROBLEM), however the buzzer goes off as expected.
2) I get MQTT message when device is sleeping and I press the led button
Here is the configuration I have imported:
Here is the autoexec.bat I am currently using:
Here is the MQTT log when device wakes up after one hour of deep sleep (no smoke present):
When there is smoke the buzzer fires, blue and red leds blinks, but no mqtt activity is present (the device does not wake up?)
Has someone been successful in testing the device in a very standard use-case, that is the device is in deep sleep and real smoke is detected? May I get your directions for further troubleshooting this case?
Thanks you very much for your help
I have flashed the device with OpenBK7231T/OpenBeken release 1.17.553.
A few facts:
1) I don't get any MQTT message when device is sleeping and real smoke is detected (THE PROBLEM), however the buzzer goes off as expected.
2) I get MQTT message when device is sleeping and I press the led button
Here is the configuration I have imported:
{
"vendor": "Tuya",
"bDetailed": "0",
"name": "WiFi Smoke Detector",
"chip": "BK7231N",
"board": "CBU",
"pins": {
"9": "dInput_n;2",
"15": "dInput_n;1",
"17": "WifiLED_n;0",
"23": "BAT_ADC;0",
"26": "BAT_Relay_n;0",
"28": "Btn;0"
},
"keywords": [
"TuyaMCU",
"YG400A",
"YG400A-W"
],
"image": "https://obrazki.elektroda.pl/4865009600_1671093592.jpg",
"wiki": "https://www.elektroda.com/rtvforum/topic3941698.html"
}
Here is the autoexec.bat I am currently using:
Battery_Setup 2000 3000 2 2400 4096
//measure batt every 2s
Battery_cycle 2
mqtt_broadcastInterval 1
mqtt_broadcastItemsPerSec 5
addEventHandler OnHold 10 SafeMode 5
setChannelLabel 1 Smoke
setChannelLabel 2 Tamper
again1:
delay_s 1
if $CH2!=1 then goto again1
delay_s 10
goto again
again:
delay_s 1
if $CH1!=1 then goto again
delay_s 10
// Goto sleep for 1h
PinDeepSleep 3600
Here is the MQTT log when device wakes up after one hour of deep sleep (no smoke present):
homeassistant/connected online
homeassistant/0/get 1
homeassistant/0/get 0
homeassistant/voltage/get 2557
homeassistant/battery/get 55
homeassistant/0/get 1
homeassistant/0/get 0
homeassistant/voltage/get 2566
homeassistant/battery/get 56
homeassistant/0/get 1
homeassistant/0/get 0
homeassistant/voltage/get 2547
homeassistant/battery/get 54
homeassistant/0/get 1
homeassistant/0/get 0
homeassistant/voltage/get 2540
homeassistant/battery/get 54
homeassistant/0/get 1
homeassistant/0/get 0
homeassistant/voltage/get 2546
homeassistant/battery/get 54
homeassistant/connected offline
When there is smoke the buzzer fires, blue and red leds blinks, but no mqtt activity is present (the device does not wake up?)
Has someone been successful in testing the device in a very standard use-case, that is the device is in deep sleep and real smoke is detected? May I get your directions for further troubleshooting this case?
Thanks you very much for your help