logo elektroda
logo elektroda
X
logo elektroda

OpenBK Configuration for Battery Efficiency in Wired Water Leakage Sensors

mistikdonbass 1029 4
ADVERTISEMENT
  • #1 20801705
    mistikdonbass
    Level 4  
    Hello. I have two types of water leakage sensors that operate on batteries.

    I flashed a wired sensor on OpenBK a long time ago, but the battery runs out very quickly. My knowledge was not enough to configure it correctly so that it would go into energy-saving mode.
    I read on the forum that this mode is still in development. Please tell me how things are going with this now?

    I'm not sure if I set the settings correctly, but I got it to be triggered by a short circuit and give an alert.
    Battery-operated water leak sensor with a wired component. Open water leak sensor showing electronics and battery. Screenshot of a sensor configuration interface with pin settings.
  • ADVERTISEMENT
  • #2 20809572
    mistikdonbass
    Level 4  

    Comrades, I need your help!
    I flashed the water leakage sensor.
    White water leak detector with red text Water Leak Detector on top. View of an electronic component on a white background. Round circuit board with various electronic components, including a CB3S module.
    flasher gave me the following information:
    Spoiler:
    {
    "bt_pin":"24",
    "status_led_pin":"26",
    "rstcnt":"3",
    "nxtalm_t":"5",
    "basic_pin_pin":"8",
    "bt_lv":"0",
    "bz_pin_pin":"7",
    "net_t":"180",
    "samp_type":"1",
    "bz_pin_lv":"1",
    "basic_st":"1",
    "basic_pin_lv":"1",
    "alarm_type":"0",
    "samp_sw_pin":"14",
    "max_V":"3000",
    "min_V":"2600",
    "sound_pin":"6",
    "samp_sw_lv":"1",
    "beep_t":"10",
    "status_led_lv":"1",
    "samp_pin":"23",
    "crc":"66",
    "}hfAgw_di{abi":"0",
    "id":"null",
    "swv":"1.1.6",
    "bv":"40.00",
    "pv":"2.2",
    "lpv":"3.3",
    "pk":"key4cngfa3qtqsk7",
    "firmk":"key4cngfa3qtqsk7",
    "cadv":"1.0.3",
    "cdv":"1.0.0",
    "dev_swv":"1.1.6",
    "s_id":"null",
    "dtp":"0",
    "sync":"0",
    "attr_num":"0",
    "mst_tp_0":"0",
    "mst_ver_0":"null",
    "mst_tp_1":"0",
    "mst_ver_1":"null",
    "mst_tp_2":"0",
    "mst_ver_2":"null",
    "mst_tp_3":"0",
    "mst_ver_3":"null }3~Awf_start_mdll",
    "md":"0",
    "random":"0",
    "wfb64":"1",
    "stat":"0",
    "token":"null",
    "region":"null",
    "reg_key":"null",
    "dns_prio":"030Atls_ca_cnt0' 0AAgw_wsm{nc_tp",
    "ssid":"null",
    "passwd":"null",
    "psk_key":"oGwBbj0dtWWF6wdDLwBbt7emdSa4z8Rvlb5nF",
    "auth_key":"Lup8lkJGWDwe3r0CGRWo8llAaXXFgZgj",
    "ap_ssid":"SmartLife",
    "ap_passwd":"null",
    "country_code":"CN",
    "bt_mac":"null",
    "bt_hid":"null",
    "prod_test":"false",
    "fac_pin":"y7vyey0eomagtl9l }dAgw_ai{key",
    "lckey":"null",
    "h_url":"null",
    "h_ip":"null",
    "hs_url":"null",
    "hs_ip":"null",
    "hs_psk":"null",
    "hs_psk_ip":"null",
    "mqs_url":"null",
    "mqs_ip":"null",
    "mq_url":"null",
    "mq_ip":"null",
    "ai_sp":"null",
    "ai_sp_ip":"null",
    "mq_psk":"null",
    "mq_psk_ip":"null",
    "time_z":"null",
    "s_time_z":"null",
    "wx_app_id":"null",
    "wx_uuid":"null",
    "dy_tls_m":"0",
    "cloud_cap":"0",
    "psk21_key":"null }0Ais_stride0{abi",
    "type":"obj",
    "mode":"ro",
    "property":"{range",
    "{trigger":"direct",
    "max":"100",
    "scale":"0",
    "step":"1"
    }

    and
    Spoiler:
    Device configuration, as extracted from Tuya:
    - Button (channel 0) on P24 +
    - Status LED on P26 +
    - PIR sensor on P8
    - Battery Relay on P14 +
    - Battery Max Voltage: 3000
    - Battery Min Voltage: 2600
    - Battery ADC on P23 +
    Device seems to use Battery Driver.


    Help me put this in the device.
    It's not possible to import through the import tab.

    Now I have it configured like this:

    Screenshot of a device configuration interface listing ports and values.

    Но я по прежнему не понимаю куда нужно добавить:
    - Battery Max Voltage: 3000
    - Battery Min Voltage: 2600
    And how to set up energy saving mode
  • ADVERTISEMENT
  • #3 20810679
    mistikdonbass
    Level 4  

    By trial method, there is such a configuration.
    Screenshot of sensor configuration settings.
    The sensor falls asleep and wakes up when the contacts close.
    When it falls asleep, it does not transmit any information via MQTT even after some time.
    How to monitor battery charge?
    I also can't figure out the battery voltage.
    The battery has a voltage of 2.91v, but in the web interface of the sensor, it is 3,315 mV, which is much more.
    I also don't understand Home Assistant, the sensor displays the status as "on", and when the sensor is triggered, it says "off".
  • ADVERTISEMENT
  • #4 20969236
    markiespark
    Level 4  
    For the inverted problem in Home Assistant, you could try ticking 'Flag 42 [DoorSensor] Invert state'.
    It should now be the right way round in the Sensor card in the MQTT device screen in HA.

    However, this worked for me with a sensor without a built in alarm. As yours has a beeper, it may well sound continuously in which case maybe changing Pin 7 'Rel' to 'Rel_n' in addition to enabling Flag 42 might do it.
  • #5 20969659
    mistikdonbass
    Level 4  

    I know for this. This add-on inverts the activation button, but the sensor remains unchanged.
ADVERTISEMENT