Elektroda.com
Elektroda.com
X

HA multiple switch toggle bug for OpenBeken devices

DCG 342 24
  • #1
    DCG
    Level 4  

    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.

    HA multiple switch toggle bug for OpenBeken devices

    HA multiple switch toggle bug for OpenBeken devices

    How do I sort this?
  • #2
    DCG
    Level 4  
    @p.kaczmarek2 any help on this pls ?
  • #3
    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?
  • #4
    DCG
    Level 4  

    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.
  • #6
    DCG
    Level 4  
    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 didnt get what u are telling ? so this is a known issue ?
  • #7
    DeDaMrAz
    Level 13  
    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
    DCG
    Level 4  

    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
    MnM1
    Level 8  
    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
    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?
  • #11
    DCG
    Level 4  

    I am using many Zigbee devices on HA and never seen this issue. It's happening only on OBK devices for me.
  • #12
    MnM1
    Level 8  
    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.
  • #13
    DeDaMrAz
    Level 13  

    @DCG and @MnM1

    Just trying to figure out what may be the problem, do you have any (and if so, which) flags active on affected devices?
  • #14
    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?
  • #15
    DCG
    Level 4  

    DeDaMrAz wrote:

    @DCG and @MnM1

    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
    DCG
    Level 4  

    @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.
  • #18
    DCG
    Level 4  
    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
    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...
  • #20
    DCG
    Level 4  

    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
    DCG
    Level 4  

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

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

    HA multiple switch toggle bug for OpenBeken devices

    But with Tasmota, devices' states are shown within seconds after Home Assistant boot.
  • #24
    DCG
    Level 4  

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

    HA multiple switch toggle bug for OpenBeken devices

    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
    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