logo elektroda
logo elektroda
X
logo elektroda

Tuya Water Sensor WiFi DY-SQ400B Flashing, Configuration for OBK Esphome/Tasmota style firmware

io2345 6450 110
ADVERTISEMENT
  • #61 21085477
    io2345
    Level 7  
    As expected, battery values did not change during five days. So, device does not wake up until triggered by sensor (which, hopefully, never happens)

    One more thing: The status, that the sensor sends via MQTT to the data point
    mqtt.0.Wassersensor1.0.get
    is "0" as long, as the sensor isn't activated by high water, and "1", if it is.
    But when I press the hardware button on the device, the status changes to "100". How can I avoid that misbehaviour?
  • ADVERTISEMENT
  • #62 21085908
    p.kaczmarek2
    Moderator Smart Home
    We will add wakeup on timer for battery reporting next, but first, how can status be 100?
    What is your current config?
    Do you have button on the same channel as the water sensor?
    Try putting Btn on some other channel, I guess...
    Helpful post? Buy me a coffee.
  • #63 21086071
    io2345
    Level 7  
    Config is unchanged:
     "pins": {
        "7": "PWM;5",
        "8": "DoorSnsrWSleep_nPup;0",
        "14": "BAT_Relay;1",
        "23": "BAT_ADC;1",
        "24": "Btn;1",
        "26": "LED;5"
      },
      "command": "DSEdge 0",


    autoexec.bat
    Battery_Setup 2500 3700 1.85 2400 4096
    Battery_cycle 20
    delay_s 2
    // if detected
    if $CH0==1 then setChannel 5 80
    // loop
    again:
    delay_s 1
    if $CH0==1 then DSTime clear
    goto again


    You mean, I should change it to something like
    "24": "Btn;2",
    right?

    Hinzugefügt nach 3 [Stunden] 9 [Minuten]:

    Currently the hardware button seems to toogle between the values 0 and 100 (transmitted by MQTT). It doesn't affect the countdown while it is running back from 60 to 0.
    But, when the device is sleeping, the button can be used to wake the device up.

    Also, I found, that every some seconds the value 1 is transmitted, just after the line "Info:MQTT:Channel has changed!" appears in the log. I've been wondering already, why my scripts sends much more than one mail, while high water level is signaled.

    See attached the log of one minute. Device was wakened by button, and button was pressed some times while device was counting down. Sometimes short press, sometimes long press - makes no difference.

    Info:MAIN:Time 59, idle 182615/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 60, idle 187548/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-55,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 61, idle 187048/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MQTT:Publishing val 1 to Wassersensor1/1/get retain=0
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:Publishing val 0 to Wassersensor1/1/get retain=0
    Info:MQTT:Publishing val 3390 to Wassersensor1/voltage/get retain=0
    Info:MQTT:Publishing val 74 to Wassersensor1/battery/get retain=0
    Info:DRV:DRV_BATTERY : battery voltage : 3390.703125 and percentage 74.225257%
    Info:MAIN:Time 62, idle 185779/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 63, idle 169759/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 64, idle 183759/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 65, idle 194016/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 66, idle 183979/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 67, idle 183310/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 68, idle 184598/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnInitialPressDown
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 69, idle 186561/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 key_short_press
    Info:MQTT:Publishing val 1 to Wassersensor1/led_enableAll/get retain=0
    Info:MQTT:Publishing val 100 to Wassersensor1/led_dimmer/get retain=0
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 70, idle 180170/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-56,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 71, idle 184488/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 72, idle 182977/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 73, idle 187575/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 74, idle 184956/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 75, idle 181946/s, free 65056, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 76, idle 187336/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 77, idle 187605/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 78, idle 185891/s, free 73664, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 195 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 34 changes count.
    Error:CMD:no file early.bat err -2
    Info:MAIN:Started DoorSensor.
    Info:MAIN:Started Battery.
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:GEN:24 Button_OnInitialPressDown
    Info:GEN:24 key_short_press
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:ssid:WiFiAccessPoint key:Passphrase
    Info:MAIN:Using SSID [WiFiAccessPoint]
    Info:MAIN:Using Pass [Passphrase]
    Info:MQTT:MQTT_RegisterCallback called for bT Wassersensor1/ subT Wassersensor1/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/Wassersensor1/ subT cmnd/Wassersensor1/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT Wassersensor1/ subT Wassersensor1/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:CMD:Battery Setup : Min 2500.000000 Max 3700.000000 Vref 2400.000000 adcbits 4096.000000 vdivider 1.850000
    Info:CMD:Battery Cycle : Measurement will run every 20 seconds
    Info:MAIN:Time 1, idle 259498/s, free 74512, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:DRV:DRV_BATTERY : battery voltage : 3403.710937 and percentage 75.309249%
    Info:MAIN:Time 2, idle 189117/s, free 74424, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 63287/s, free 72344, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 0/s, free 72344, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 5, idle 0/s, free 72344, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 6, idle 113650/s, free 71792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:Time 7, idle 177922/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 8, idle 189887/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 9, idle 189773/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 10, idle 190760/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:Time 11, idle 188312/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 12, idle 189890/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 13, idle 189639/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 14, idle 189811/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 15, idle 188132/s, free 73888, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_AUTH_FAILED - 3
    Info:MAIN:Time 16, idle 185225/s, free 72472, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 17, idle 187095/s, free 72472, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 18, idle 181960/s, free 71192, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_userName mqtt
    mqtt_pass mqtt
    mqtt_clientID Wassersensor1
    mqtt_host 192.168.0.149:1883
    Info:MAIN:Time 19, idle 170309/s, free 73640, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to Wassersensor1/+/set
    Info:MQTT:mqtt_subscribed to bekens_n/+/set
    Info:MQTT:mqtt_subscribed to cmnd/Wassersensor1/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    Info:MQTT:mqtt_subscribed to Wassersensor1/+/get
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 20, idle 183095/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-54,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 21, idle 184770/s, free 73448, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MQTT:Publishing val 1 to Wassersensor1/1/get retain=0
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:Publishing val 0 to Wassersensor1/1/get retain=0
    Info:MQTT:Publishing val 3401 to Wassersensor1/voltage/get retain=0
    Info:MQTT:Publishing val 75 to Wassersensor1/battery/get retain=0
    Info:DRV:DRV_BATTERY : battery voltage : 3401.542968 and percentage 75.128578%
    Info:MAIN:Time 22, idle 185764/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 23, idle 167335/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 24, idle 184211/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 25, idle 185040/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 26, idle 186058/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 27, idle 191733/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnInitialPressDown
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 28, idle 195766/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 key_short_press
    Info:MQTT:Publishing val 0 to Wassersensor1/led_enableAll/get retain=0
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 29, idle 187290/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 30, idle 188841/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-55,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 31, idle 177731/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 32, idle 186404/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 33, idle 188717/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 34, idle 185732/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 35, idle 194955/s, free 73448, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 36, idle 189493/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 37, idle 194234/s, free 73448, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 38, idle 183893/s, free 73448, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 39, idle 186700/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 40, idle 185821/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-56,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:GEN:24 Button_OnInitialPressDown
    Info:GEN:24 key_short_press
    Info:MQTT:Publishing val 1 to Wassersensor1/led_enableAll/get retain=0
    Info:MQTT:Publishing val 100 to Wassersensor1/led_dimmer/get retain=0
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 41, idle 177268/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MQTT:Publishing val 1 to Wassersensor1/1/get retain=0
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:Publishing val 0 to Wassersensor1/1/get retain=0
    Info:MQTT:Publishing val 3399 to Wassersensor1/voltage/get retain=0
    Info:MQTT:Publishing val 74 to Wassersensor1/battery/get retain=0
    Info:DRV:DRV_BATTERY : battery voltage : 3399.375000 and percentage 74.947914%
    Info:MAIN:Time 42, idle 189507/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 43, idle 168528/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 44, idle 186501/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 45, idle 188562/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 46, idle 185197/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 47, idle 185987/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 48, idle 186007/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnInitialPressDown
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 49, idle 182141/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnLongPressHoldStart
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 50, idle 189247/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-55,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:GEN:24 Button_OnLongPressHold
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 51, idle 185923/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 52, idle 182512/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 53, idle 194891/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 54, idle 185983/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 55, idle 185056/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnInitialPressDown
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 56, idle 190180/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnLongPressHoldStart
    Info:GEN:24 Button_OnLongPressHold
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 57, idle 190491/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnLongPressHold
    Info:GEN:24 Button_OnLongPressHold
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 58, idle 182398/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnLongPressHold
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 59, idle 186558/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 60, idle 189324/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-56,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 61, idle 180347/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MQTT:Publishing val 1 to Wassersensor1/1/get retain=0
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:Publishing val 0 to Wassersensor1/1/get retain=0
    Info:MQTT:Publishing val 3386 to Wassersensor1/voltage/get retain=0
    Info:MQTT:Publishing val 73 to Wassersensor1/battery/get retain=0
    Info:DRV:DRV_BATTERY : battery voltage : 3386.367187 and percentage 73.863929%
    Info:MAIN:Time 62, idle 189356/s, free 73400, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 63, idle 171866/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 64, idle 187107/s, free 73448, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 65, idle 185088/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 66, idle 188186/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 67, idle 184076/s, free 73448, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 68, idle 186266/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 69, idle 182557/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 70, idle 187006/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-57,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 71, idle 184217/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 72, idle 185764/s, free 73464, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 73, idle 184627/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 74, idle 186418/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 75, idle 186290/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnInitialPressDown
    Info:GEN:24 key_short_press
    Info:MQTT:Publishing val 0 to Wassersensor1/led_enableAll/get retain=0
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 76, idle 183547/s, free 73232, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 77, idle 186086/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 78, idle 196244/s, free 73680, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    
    
  • #64 21086332
    p.kaczmarek2
    Moderator Smart Home
    The behaviour you've described indicates that the LED driver tries to do some things.

    Please change the Btn role to Btn_ScriptOnly, then save pins, reboot and retry. Let me know if behaviour has changed.

    Script only button will still wake device but will not have automatic interactions.
    Helpful post? Buy me a coffee.
  • #65 21086361
    io2345
    Level 7  
    You are the king - it's working ok now:

    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 198 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 35 changes count.
    Error:CMD:no file early.bat err -2
    Info:MAIN:Started DoorSensor.
    Info:MAIN:Started Battery.
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:GEN:24 Button_OnInitialPressDown
    Info:GEN:24 key_short_press
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:ssid:WiFiAccessPoint key:Passphrase
    Info:MAIN:Using SSID [WiFiAccessPoint]
    Info:MAIN:Using Pass [Passphrase]
    Info:MQTT:MQTT_RegisterCallback called for bT Wassersensor1/ subT Wassersensor1/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/Wassersensor1/ subT cmnd/Wassersensor1/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT Wassersensor1/ subT Wassersensor1/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:CMD:Battery Setup : Min 2500.000000 Max 3700.000000 Vref 2400.000000 adcbits 4096.000000 vdivider 1.850000
    Info:CMD:Battery Cycle : Measurement will run every 20 seconds
    Info:MAIN:Time 1, idle 263423/s, free 74688, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:DRV:DRV_BATTERY : battery voltage : 3386.367187 and percentage 73.863929%
    Info:MAIN:Time 2, idle 189553/s, free 74600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 60771/s, free 72520, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 0/s, free 72520, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 5, idle 0/s, free 72520, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 6, idle 113850/s, free 71968, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:Time 7, idle 177749/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 8, idle 189902/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 9, idle 189566/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 10, idle 191908/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:Time 11, idle 188332/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 12, idle 189585/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 13, idle 190723/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 14, idle 189982/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 15, idle 188482/s, free 74064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_AUTH_FAILED - 3
    Info:MAIN:Time 16, idle 185878/s, free 72648, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 17, idle 187393/s, free 72648, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 18, idle 184026/s, free 71440, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_userName mqtt
    mqtt_pass mqtt
    mqtt_clientID Wassersensor1
    mqtt_host 192.168.0.149:1883
    Info:MAIN:Time 19, idle 174146/s, free 73816, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to Wassersensor1/+/set
    Info:MQTT:mqtt_subscribed to bekens_n/+/set
    Info:MQTT:mqtt_subscribed to cmnd/Wassersensor1/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    Info:MQTT:mqtt_subscribed to Wassersensor1/+/get
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 20, idle 184309/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-55,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:CMD:[WebApp Cmd 'loglevel 3' Result] OK
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 21, idle 185166/s, free 73624, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MQTT:Publishing val 1 to Wassersensor1/1/get retain=0
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:Publishing val 0 to Wassersensor1/1/get retain=0
    Info:MQTT:Publishing val 3382 to Wassersensor1/voltage/get retain=0
    Info:MQTT:Publishing val 73 to Wassersensor1/battery/get retain=0
    Info:DRV:DRV_BATTERY : battery voltage : 3382.031250 and percentage 73.502609%
    Info:MAIN:Time 22, idle 192533/s, free 73616, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 23, idle 170370/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 24, idle 189388/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 25, idle 187292/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 26, idle 186735/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 27, idle 185494/s, free 73640, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 28, idle 185772/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 29, idle 188083/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 30, idle 187480/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-56,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 31, idle 184536/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 32, idle 186106/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 33, idle 188048/s, free 73624, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 34, idle 188012/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 35, idle 199460/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 36, idle 187646/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 37, idle 180110/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 38, idle 186430/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 39, idle 186567/s, free 73624, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnInitialPressDown
    Info:GEN:24 key_short_press
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 40, idle 200870/s, free 73624, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-54,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 41, idle 180611/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MQTT:Publishing val 1 to Wassersensor1/1/get retain=0
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:Publishing val 0 to Wassersensor1/1/get retain=0
    Info:MQTT:Publishing val 3385 to Wassersensor1/voltage/get retain=0
    Info:MQTT:Publishing val 73 to Wassersensor1/battery/get retain=0
    Info:DRV:DRV_BATTERY : battery voltage : 3385.283203 and percentage 73.773597%
    Info:MAIN:Time 42, idle 188583/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 43, idle 172407/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 44, idle 186823/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 45, idle 186281/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 46, idle 186377/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnInitialPressDown
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 47, idle 185489/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnLongPressHoldStart
    Info:GEN:24 Button_OnLongPressHold
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 48, idle 184082/s, free 73624, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 49, idle 184892/s, free 73640, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 50, idle 188539/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-54,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 51, idle 183006/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 52, idle 197304/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 53, idle 187614/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 54, idle 188603/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 55, idle 200762/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 56, idle 180165/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 57, idle 195220/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 58, idle 192976/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 59, idle 183424/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 60, idle 189427/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-54,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 61, idle 181128/s, free 73624, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:DRV:DRV_BATTERY : Measure Battery volt en perc
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MQTT:Publishing val 1 to Wassersensor1/1/get retain=0
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:Publishing val 0 to Wassersensor1/1/get retain=0
    Info:MQTT:Publishing val 3382 to Wassersensor1/voltage/get retain=0
    Info:MQTT:Publishing val 73 to Wassersensor1/battery/get retain=0
    Info:DRV:DRV_BATTERY : battery voltage : 3382.031250 and percentage 73.502609%
    Info:MAIN:Time 62, idle 191364/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 63, idle 172943/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 64, idle 187784/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 65, idle 190522/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 66, idle 187785/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnInitialPressDown
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 67, idle 186896/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:24 Button_OnLongPressHoldStart
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 68, idle 186744/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 69, idle 182078/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 70, idle 189566/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.154 gate=192.168.0.1 mask=255.255.255.0 mac=d8:d6:68:2f:f8:65
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-54,ssid=WiFiAccessPoint,bssid=50:e6:36:35:f5:b8,channel=1,cipher_type:CCMP
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 71, idle 188663/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 72, idle 189380/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 73, idle 185619/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 74, idle 185891/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 75, idle 183782/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 76, idle 185023/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 77, idle 185819/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to Wassersensor1/0/get retain=0
    Info:MAIN:Time 78, idle 184306/s, free 73856, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    



    @divadiow : the latest config for github would be now
    {
    "vendor": "Tuya",
    "bDetailed": "0",
    "name": "Floor sitting Water Leak Flood Sensor Alarm",
    "model": "DY-SQ400B",
    "chip": "BK7231N",
    "board": "CB3S",
    "flags": "8",
    "keywords": [
    "CR123A",
    "battery",
    "buzzer",
    "detector"
    
    ],
    "pins": {
    "7": "PWM;5",
    "8": "DoorSnsrWSleep_nPup;0",
    "14": "BAT_Relay;1",
    "23": "BAT_ADC;1",
    "24": "Btn_ScriptOnly;1",
    "26": "LED;5"
    },
    "command": "DSEdge 0",
    "image": "https://obrazki.elektroda.pl/6240569600_1714757661.jpg",
    "wiki": "https://www.elektroda.com/rtvforum/topic4052199.html"
    }
  • #66 21086373
    p.kaczmarek2
    Moderator Smart Home
    Very well. So now the last part missing is that automatic wake up every, I don't know, let's say 12h, configurable, to report battery?
    Helpful post? Buy me a coffee.
  • #67 21086534
    io2345
    Level 7  

    Configurable is nice, of course. Yet, for me, it wouldn't be important - I would be glad with a check once every day.
  • #68 21089484
    io2345
    Level 7  
    >>21086373
    Any news on this issue (wake up from DeepSleep at least once a day to provide battery values via MQTT)?
  • #69 21089513
    p.kaczmarek2
    Moderator Smart Home
    Thank you for reminding me!

    I don't have ability to check it on hardware, but I am happy to add this feature for you in a... well, tested only in simulator form:
    https://github.com/openshwprojects/OpenBK7231...mmit/f850ccdd0ef8e075021ab6b5688542791976b849
    So now, the DSTime command has optional second argument, the auto wake up time in seconds:
    - by default it's 0 (it means disabled)
    - if you don't pass second argument, it's not changed
    - if you pass it, it will be set, of course you need to do it in autoexec.bat, as the setting is not saved

    So the usage is now:
    
    DSTime 100 6000
    

    This means that awake time will be set to 100 and the automatic wakeup will be set 6000 seconds, which is 60 * 100, 100 minutes

    Please update once a build is ready and check this feature, start with some wake up time like 2 minutes just to be sure if it works, and report back.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #70 21089552
    io2345
    Level 7  

    Nice!
    Where can I find out about a new release? Is the firmware check in the device's WebApp-page working again?
  • #71 21089652
    p.kaczmarek2
    Moderator Smart Home
    I think the new releases system is now working again correctly.
    Helpful post? Buy me a coffee.
  • #72 21091186
    io2345
    Level 7  
    >>21089513
    Works fine!
    I had to put the command in the first line of autoexec.bat
    My first try was in the last line, but that didn't work.
  • ADVERTISEMENT
  • #74 21094924
    io2345
    Level 7  
    Alright, let's try different channels.
    Currently these three are on channel 1

    "14": "BAT_Relay;1",
    "23": "BAT_ADC;1",
    "24": "Btn_ScriptOnly;1",

    other channels in use are 0 (for the sensor) and 5 (for LED and Buzzer).
    What should I try? Different channels for all of the above three - like this?:

    "14": "BAT_Relay;1",
    "23": "BAT_ADC;2",
    "24": "Btn_ScriptOnly;3",
  • #76 21095369
    io2345
    Level 7  
    OK. Let me check it at least a day or two with these settings just to be sure.

    One thing that I still don't understand: If I press the hardware button, the alarm starts. Why? The button shouldn't have anything to do with the sensor, right?

    Currently the settings are:
    {
    "vendor": "Tuya",
    "bDetailed": "0",
    "name": "Floor sitting Water Leak Flood Sensor Alarm",
    "model": "DY-SQ400B",
    "chip": "BK7231N",
    "board": "CB3S",
    "flags": "8",
    "keywords": [
    "CR123A",
    "battery",
    "buzzer",
    "detector"
    
    ],
    "pins": {
    "7": "PWM;5",
    "8": "DoorSnsrWSleep_nPup;0",
    "14": "BAT_Relay;1",
    "23": "BAT_ADC;2",
    "24": "Btn_ScriptOnly;1",
    "26": "LED;5"
    },
    "command": "DSEdge 0",
    "image": "https://obrazki.elektroda.pl/6240569600_1714757661.jpg",
    "wiki": "https://www.elektroda.com/rtvforum/topic4052199.html"
    }


    and the autoexec.bat
    DSTime 60 50000
    Battery_Setup 2900 3700 1.94
    Battery_cycle 20
    setChannel 5 80
    delay_s 2
    // if detected
    if $CH0==1 then setChannel 5 80
    // loop
    again:
    delay_s 1
    if $CH0==1 then DSTime clear
    goto again
  • #77 21095429
    divadiow
    Level 34  
    hmm. interesting. as far as I can tell it looks like your LED and buzzer (both on channel 5) should sound/light when channel 0 changes to state 1. I don't see how the button comes into it if it's btn_scriptonly
  • #78 21095454
    p.kaczmarek2
    Moderator Smart Home
    You have setchannel 5 80 twice in the script. Once in the if conditional and second time few lines above
    Helpful post? Buy me a coffee.
  • #79 21095615
    io2345
    Level 7  

    Right, but that was intentionally. Because if I remove the above line, the device does not make a sound nor light up the LED under high water condition.
    But it does send value "1" to channel 0 and also does restart the DS-Countdown. Just no local warning.
  • ADVERTISEMENT
  • #80 21095624
    p.kaczmarek2
    Moderator Smart Home
    io2345 wrote:
    Because if I remove the above line, the device does not make a sound nor light up the LED under high water condition.

    Then you're saying that this line is not working?
    
    // if detected
    if $CH0==1 then setChannel 5 80
    



    If this is not working, then we can try different approach.
    1. remove
     setChannel 5 80

    2. remove
     // if detected
    if $CH0==1 then setChannel 5 80

    3. finally, add:
    
    // anytime that channel 0 becomes 1, sound the alarm
    addChangeHandler Channel0 == 1 setChannel 5 80
    


    The change handler may be better than if because if just checks once, and change handler is persistant.
    Helpful post? Buy me a coffee.
  • #81 21095640
    io2345
    Level 7  
    Working fine now, as expected. Congratulation!

    So, the final version for autoexec.bat is now:
    STime 60 50000
    Battery_Setup 2900 3700 1.94
    Battery_cycle 20
    delay_s 2
    // anytime that channel 0 becomes 1, sound the alarm
    addChangeHandler Channel0 == 1 setChannel 5 80
    // loop
    again:
    delay_s 1
    if $CH0==1 then DSTime clear
    goto again


    and for device configuration
    {
    "vendor": "Tuya",
    "bDetailed": "0",
    "name": "Floor sitting Water Leak Flood Sensor Alarm",
    "model": "DY-SQ400B",
    "chip": "BK7231N",
    "board": "CB3S",
    "flags": "8",
    "keywords": [
    "CR123A",
    "battery",
    "buzzer",
    "detector"
    
    ],
     "pins": {
        "7": "PWM;5",
        "8": "DoorSnsrWSleep_nPup;0",
        "14": "BAT_Relay;1",
        "23": "BAT_ADC;2",
        "24": "Btn_ScriptOnly;1",
        "26": "LED;5"
    },
    "command": "DSEdge 0",
    "image": "https://obrazki.elektroda.pl/6240569600_1714757661.jpg",
    "wiki": "https://www.elektroda.com/rtvforum/topic4052199.html"
    }
  • #82 21095671
    p.kaczmarek2
    Moderator Smart Home
    That's good to hear! Now, are we planning to add any more things to your script? I can help more, anytime you want.
    Helpful post? Buy me a coffee.
  • #84 21337597
    samoswall
    Level 5  
    Good day to all!
    I also decided to change the Tuya firmware and flashed this water leak sensor to openshwprojects.
    The firmware was successfully installed and configured, but I have problems:
    1. I still haven't found the answer, where should I insert the configuration code?
    2. Also did not find where to insert the autoexec.bat code?
    Now the sensor does not react to water (it does not wake up according to mqtt data), when you press the button, it wakes up and the web interface is available for 60 seconds.
    Tell me how to set it up.
  • #85 21339745
    io2345
    Level 7  
    >>21337597 samoswall, the config code has to be inserted on the webpage -> Import -> Enter template here.

    For the autoexec.bat: Go the Filesystem -> List Filesystem. Does it show a file with the name "autoexec.bat"? If not, go to "Create File" and create a file of that name. Now you can fill the File editor on the right side of the same page.

    The webpage itself can be reached from the device's main-page where it says "Launch Web Application".
  • #86 21340354
    samoswall
    Level 5  
    >>21339745
    Thanks for the answer!
    With a template and autoexec.bat figured it out, but I still can't get it to work properly:
    It does not respond to the closure of flood contacts;
    installed in autoexec.bat connection time is 3600 seconds - does not wake up.
    I don't understand what I'm doing wrong?
    OpenBK7231N user interface with door sensor and battery status information. Screen for importing configuration from an OBK template. Screenshot of an IoT device configuration interface displaying device information. Screenshot of the autoexec.bat file editor in the LittleFS filesystem on Tasmota.
  • #88 21344443
    p.kaczmarek2
    Moderator Smart Home
    DSEdge is indeed required on some devices, you can figure out the correct setting by experimenting. Just make sure to also configure one of the pins as Button first, so it can be used as alternate wakeup method if the door contact (or water sensor, etc) wakeup fails.
    Helpful post? Buy me a coffee.
  • #89 21380770
    samoswall
    Level 5  
    I managed to get this water leak sensor to work properly with this autoexec.bat
    
    DSEdge 0
    Battery_Setup 2900 3850 1.94
    Battery_cycle 20
    delay_s 2
    STime 60 600
    again:
    delay_s 1
    if $CH0==1 then DSTime clear
    if $CH0==1 then setChannel 5 80
    goto again
    

    There is only 1 question left:
    Why doesn't the sensor wake up every 600 seconds (string STime 60,600) and send data via mqtt?
    When you wake up from sleep by pressing or closing the contacts, the mqtt data is sent. (flag 10 is set)
  • #90 21380844
    io2345
    Level 7  
    >>21380770
    Your solution might be in #72
    I think it depends on the order of the commands

Topic summary

The discussion revolves around the Tuya WiFi Water Sensor DY-SQ400B, focusing on its flashing and configuration for OBK (OpenBeken) and Tasmota firmware. Users explore the device's components, including the CB3S Com-Board and the CR123A 3V battery. Initial inquiries about the device's chip and UART connections lead to suggestions for capturing data using TuyaMCU. As users attempt to flash the device, they encounter issues with UART communication and configuration settings. The conversation includes troubleshooting steps, firmware backup procedures, and the implementation of deep sleep functionality to optimize battery life. Users share their experiences with MQTT integration and alarm configurations, ultimately achieving a working setup for water detection and alerting.
Summary generated by the language model.
ADVERTISEMENT