logo elektroda
logo elektroda
X
logo elektroda

OpenBeken Devices Displaying Multiple Switch Toggle Icons upon Home Assistant Restart

DCG 1350 27
ADVERTISEMENT
  • #1 20731405
    DCG
    Level 6  

    Hi team,

    Every time when I restart Home Assistant, I have observed that all my Openbeken devices show multiple switch (energy) toggle icons, as seen in the below screenshots, this goes off and moves back to normal single switch toggle once I click on either one of the two toggles.

    Openbeken interface showing devices with toggle icons.

    Display of Openbeken devices with light switch and plug icons.

    How do I sort this?
  • ADVERTISEMENT
  • #2 20733488
    DCG
    Level 6  
    @p.kaczmarek2 any help on this pls ?
  • #3 20733563
    p.kaczmarek2
    Moderator Smart Home
    I haven't heard about this problem yet. Does it happen from the start or did it began to act that way recently?

    @DeDaMrAz , have you seen that?
    Helpful post? Buy me a coffee.
  • #4 20733572
    DCG
    Level 6  

    p.kaczmarek2 wrote:
    I haven't heard about this problem yet. Does it happen from the start or did it begin to act that way recently?

    @DeDaMrAz, have you seen that?


    I moved to Openken just 10 days ago and this issue is there from the beginning ... this shows up only after HA restart.

    It is not a deal breaker, but it's annoying.
  • ADVERTISEMENT
  • #6 20734148
    DCG
    Level 6  
    DeDaMrAz wrote:
    >>20733563

    Confirmed, but to be honest I thought it is a HA issue so I didn't look into it more.


    Sorry, I didn't get what you are telling? So this is a known issue?
  • #7 20734156
    DeDaMrAz
    Level 19  
    DCG wrote:
    sorry I didnt get what u are telling ? so this is a known issue ?


    More of a acknowledgement of what you are saying, but I also noticed it is changing the toggle on the HA restart and I thought it was the issue on HA side and haven't look into it beyond that. It will change back if you toggle it in HA probably and that is why I was disregarding that before.

    But we will look into it more carefully now as nobody mentioned it before.
  • #8 20734166
    DCG
    Level 6  

    DeDaMrAz wrote:
    DCG wrote:
    sorry I didn't get what you are telling? So this is a known issue?


    More of an acknowledgement of what you are saying, but I also noticed it is changing the toggle on the HA restart and I thought it was the issue on HA's side and haven't looked into it beyond that. It will change back if you toggle it in HA probably, and that is why I was disregarding that before.

    But we will look into it more carefully now as nobody mentioned it before.


    OK, take your time please. It's as of now not causing any issues in the setup.

    FYI - I have observed that this issue does not occur for switches which I have changed from Switch to Light (using Helper in HA - Change device type of a switch option)
  • #9 20734381
    MnM1
    Level 10  
    Yes I have seen this before.

    It only happens after Home Assistant is rebooted. If toggled (from with Home Assistant) it goes back to normal.

    I have some OBK devices and also some Zigbee devices showing this behavior so I think is not OBK that's causing this as all my zigbee devices are stock standard un-hacked and are showing this issue.
  • #10 20734447
    p.kaczmarek2
    Moderator Smart Home
    So it also affects Zigbee?

    I know how our HASS Discovery works but I am not sure what part of YAML could cause this. Any ideas?
    Helpful post? Buy me a coffee.
  • #11 20734451
    DCG
    Level 6  

    I am using many Zigbee devices on HA and never seen this issue. It's happening only on OBK devices for me.
  • #12 20734615
    MnM1
    Level 10  
    I did a HA reboot to verify as I noticed this many months ago and since I didn't pay any attention to it.
    It turns out that all my zigbee devices are OK and do not display this behavior.
    My OBK lights are OK too.
    My OBK power switches are the ones that behave like that.
  • ADVERTISEMENT
  • #13 20734882
    DeDaMrAz
    Level 19  

    @DCG and @mnm11

    Just trying to figure out what may be the problem, do you have any (and if so, which) flags active on affected devices?
  • #14 20734971
    p.kaczmarek2
    Moderator Smart Home
    The first thing to try would be to add OBK device via manual YAML and see if the problem still persists

    Added after 9 [hours] 21 [minutes]:

    Someone recently posted this in another thread:
    Code: YAML
    Log in, to see the code

    Maybe that could work as a temporary workaround here?
    Helpful post? Buy me a coffee.
  • #15 20735240
    DCG
    Level 6  

    DeDaMrAz wrote:

    @DCG and @mnm11

    Just trying to figure out what may be the problem, do you have any (and if so, which) flags active on affected devices?


    For one of my 4 Gang switch modules, I have enabled Flag 10 & Flag 37.
    For my remaining bulbs, I have enabled multiple flags: Flag 08, 10, 12, 18, 37.
    The issue remains the same for the above switch or bulb.

    Also, I have observed that this issue does not occur for switches which I have changed from Switch to Light (using Helper in HA - Change device type of a switch option).
  • #16 20736156
    DCG
    Level 6  

    @p.kaczmarek2

    I tried adding OBD devices via manual YAML config, but the issue still remains the same :(

    The devices show as unknown when those dual toggle buttons are seen after reboot.
  • #17 20736320
    p.kaczmarek2
    Moderator Smart Home
    What yaml config did you use? Can you post code here?
    Helpful post? Buy me a coffee.
  • #18 20736521
    DCG
    Level 6  
    p.kaczmarek2 wrote:
    What yaml config did you use? Can you post code here?


    the one which is in Home Assistant configuration, i am adding it to Configuration.yaml

    mqtt:
      light:
      - unique_id: "Wall_Smart_Light_light"
        name: 0
        rgb_command_template: "{{ '#%02x%02x%02x0000' | format(red, green, blue)}}"
        rgb_value_template: "{{ value[0:2]|int(base=16) }},{{ value[2:4]|int(base=16) }},{{ value[4:6]|int(base=16) }}"
        rgb_state_topic: "wall_bulb/led_basecolor_rgb/get"
        rgb_command_topic: "cmnd/wall_bulb/led_basecolor_rgb"
        command_topic: "cmnd/wall_bulb/led_enableAll"
        state_topic: "wall_bulb/led_enableAll/get"
        availability_topic: "wall_bulb/connected"
        payload_on: 1
        payload_off: 0
        brightness_command_topic: "cmnd/wall_bulb/led_dimmer"
        brightness_state_topic: "wall_bulb/led_dimmer/get"
        brightness_scale: 100
        color_temp_command_topic: "cmnd/wall_bulb/led_temperature"
        color_temp_state_topic: "wall_bulb/led_temperature/get"
    


    am I doing it correctly ? if not pls correct me
  • #19 20736712
    p.kaczmarek2
    Moderator Smart Home
    This is correct. So, the next question is - how should we modify this YAML to fix the issue you mentioned...
    Helpful post? Buy me a coffee.
  • #20 20737371
    DCG
    Level 6  

    p.kaczmarek2 wrote:
    This is correct. So, the next question is - how should we modify this YAML to fix the issue you mentioned...


    As a workaround, is there a possibility to add a script or automation to check these devices every few hours and change the toggle?
  • #21 20741576
    DCG
    Level 6  

    @p.kaczmarek2 @DeDaMrAz Any luck in resolving this issue? It continues to bother every time HA is restarted.
  • Helpful post
    #22 20743791
    Zain00
    Level 10  

    I noticed this issue too, enabling Flag 2 helped solve it for now

    Screenshot of Flag 2 settings for MQTT, showing it is enabled.

    But with Tasmota, devices' states are shown within seconds after Home Assistant boot.
  • #23 20743833
    p.kaczmarek2
    Moderator Smart Home
    if flag 2 helps, then maybe "broadcast self state on connect" can also help?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #24 20743855
    DCG
    Level 6  

    Zain00 wrote:
    I noticed this issue too, enabling Flag 2 helped solve it for now

    Screenshot of Flag 2 settings for MQTT, showing it is enabled.

    But with Tasmota, devices state are shown within seconds after homeassistant boot


    Thanks, enabling Flag 2 has helped, the response is slow after reboot, but it's a workaround for sure.


    p.kaczmarek2 wrote:
    if flag 2 helps, then maybe "broadcast self state on connect" can also help?


    Broadcast self state - Flag 10 is by default enabled on all my devices... but it hadn't solved this issue for me..

    so enabling both Flag 2 & 10 is fine ?
  • #25 20743863
    p.kaczmarek2
    Moderator Smart Home
    What if instead of flag 2, you do that in autoexec.bat:
    
    // wait for mqtt to connect
    waitFor MQTTState 1
    // wait more
    delay_s 1
    // publish data
    publishChannels
    
    Helpful post? Buy me a coffee.
  • Helpful post
    #26 20761607
    Zain00
    Level 10  

    Another solution is to do a "PublishAll" command when Home Assistant restarts.

    First, make a script in Home Assistant:

    alias: bekens PublishAll
    sequence:
      - service: mqtt.publish
        data:
          topic: cmnd/bekens/publishAll
          payload: ""
    mode: single
    


    Make sure that your devices' Group Topic is the same for all the Beken devices. In my case, it's "bekens".

    Then, make an automation to trigger this script when HA restarts:

    alias: Bekens_publishAll
    description: ""
    trigger:
      - platform: homeassistant
        event: start
    condition: []
    action:
      - service: script.bekens_publishAll
        data: {}
    mode: single
    


    In my experience, this is not as fast as Tasmota's integration, but it's better than sending MQTT messages every 60s.
  • #27 20762085
    DCG
    Level 6  

    Thank you @Zain00. The script and automation solution worked perfectly.
  • #28 20815209
    andyc1
    Level 3  

    Hello,
    I had a similar problem with some OBK light dimmer relays whereby, after an HA restart, the device state would show as "unknown" until I switched the device on at the wall switch and then adjusted the dimmer level.
    I solved the problem by enabling flag 7 - "Always set Retain flag to all published values" within OBK config.
    Maybe this would work as an alternative here too.

Topic summary

The discussion revolves around an issue where OpenBeken devices display multiple switch toggle icons after a restart of Home Assistant (HA). Users report that this problem occurs consistently upon HA reboot, with the toggles returning to normal after manual interaction. Some users initially believed it to be an HA issue, while others confirmed it affects both OpenBeken and Zigbee devices. Various solutions and workarounds were proposed, including enabling specific flags (e.g., Flag 2 and Flag 10), using manual YAML configurations, and creating automations to publish device states upon HA startup. One user found success by enabling Flag 7, which retains published values. The community continues to explore the root cause and potential fixes for this behavior.
Summary generated by the language model.
ADVERTISEMENT