logo elektroda
logo elektroda
X
logo elektroda

HASS/OpenBK MQTT lost packets: can I add QoS or heartbeat state sync?

brazoayeye 339 1
ADVERTISEMENT
  • Periodic state refresh needed for HASS sync

    #1 21911572
    brazoayeye
    Level 4  
    Posts: 20
    I have a problem with HASS and OpenBK because sometimes MQTT packets are lost and HASS remains with a different state than OpenBK.

    HASS automations don't send again the signal because the behaviour is optimistic, OpenBK doesn't send an update regarding the status because it isn't changed.

    Is there a way to implement a sort of QoS or a heartbeat from OpenBK that updates HASS about the status every xx minutes?

    Thanks
    Which MQTT broker are you using, and what are your current MQTT settings for this device/topic (especially QoS, retain, and any persistent session/clean session setting)?
    mosquitto, default in HASS.
    I enabled 'Flag 7 - [MQTT] [Debug] Always set Retain flag to all published values' to avoid undefined message on OpenBK reboot
    I also enabled 'Flag 35 - [HASS] Deactivate avty_t flag when publishing to HASS (permit to keep value). You must restart HASS discovery for change to take effect.'
    What exact OpenBK device/firmware version and Home Assistant MQTT entity/config are you using, and do you already have any periodic telemetry/state refresh/availability option enabled?
    Built on May 3 2026 13:32:48 version 1.18.288
    Short name: deumidificatore, Chipset BK7231N
  • ADVERTISEMENT
  • Heartbeat and offline detection for MQTT state sync

    #2 21943024
    brazoayeye
    Level 4  
    Posts: 20
    I'm still having problems because with my setup I noticed two different problems:

    1. If a device goes offline I can't understand it from hass, entity remains on or off as they were.
    2. If a packet is lost hass is optimistic, the device does not switch the state but hass marks it as changed. Hass automations don't send updates, and I must fix it manually.

    Is there a way to set up a heartbeat (~30 mins) to update hass regarding real state of sensors?
    And is there a way to detect when a device is offline using mqtt?

    Thanks.
ADVERTISEMENT