home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.31k stars 30.62k forks source link

Broadlink SP3S reports incorrect state #18934

Closed JayOne73 closed 5 years ago

JayOne73 commented 5 years ago

Home Assistant release with the issue:

83.2

Last working Home Assistant release (if known): ?

Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io Component/platform:

Broadlink Switch (SP3S)

Description of problem: The Broadlink switch reports unexpected states. With the switch turned off, the state in HA sometimes shows 'on' for sometime. Besides this switch I also have the power consumption sensor and this sensor reports the right values (0.0 watt). When the switch is actually on the power sensor reports approx. 5 watt continuous.

State of the switch: image

vs State of the power consumption sensor:

image

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):


switch:
  - platform: broadlink
    host: 192.168.XXX.XXX
    mac: 'XX:AE:XX:57:XX:29'
    type: sp3
MathiasVandePol commented 5 years ago

I can confirm that I experience the same issue. Rebooting home assistant from within the UI fixes the issue.

JayOne73 commented 5 years ago

Not really fixes the issue. The issue will stay away for about a day and than appears suddenly. Although the interval is now less regurlar.

maurodani76 commented 5 years ago

Same for me; commented another issue about broadlink switches total disconnection. Probably it's related to the power measurement code, I suggest developers to exclude it via platform config.

yongman commented 5 years ago

I met the same problem with broadlink sp mini3,after a day or some time, the switch can not be controlled by HA properly, but can be controlled all right by official app from cloud.

JayOne73 commented 5 years ago

After deleting the custom component for the power measurement and using the power measurement of the component I don't experience the above issue. So this issue will be closed, because the reason seems to lay in the custom component and the new feature of power measurement within the component.

MathiasVandePol commented 5 years ago

@jayone73 please elaborate. What did you delete? And what config are you using now ?

JayOne73 commented 5 years ago

@MathiasVandePol I used this custom component after removing this custom component (from the configuration and removing the broadlink_power.py from custom_components folder) and restarting HA the power measurements appears as attribute from the broadlink switch.

MathiasVandePol commented 5 years ago

@jayone73. I had that custom component too a while back but deleted it a few weeks ago to. I get the measurements too but incorrect state (on while it is off and vice versa) is still being reported incorrectly somehow. So that is resolved at your end too ?

JayOne73 commented 5 years ago

@MathiasVandePol. Normally the switch was reporting incorrect states within two days of a restart. A few weeks back I also deleted the custom component and since then I never experienced the incorrect state. Now I am using HA almost 5 days without restart and not an incorrect state has been reported.

On my side the switch and power measurement works as it should be. The coming three days the switch will not be used, so that's a real test case for me.