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 Switch Not working on 0.116.3 #41900

Closed ordor2k closed 4 years ago

ordor2k commented 4 years ago

The problem

Environment

Problem-relevant configuration.yaml

switch:
  - platform: broadlink
    mac: XXXXXXXXXXXX
    switches:
      - name: Master Bedroom Light
        command_on: siEcAAsMFQwWDBUMFQwWFwoXCxcLFgsXCxcLDBUAAZUAAAAAAAAAAAAAAAA=
        command_off: sg8cAAsMFQwWDBYMFgwWFwsWCxcLFgsXCxcLDBYAAZcAAAAAAAAAAAAAAAA=
      - name: Master Bedroom Fan Speed 1
        command_on: shMcAAsMFg0WDBYMFg0WFwsXCxcLDBYXCxcLFwsAAZYAAAAAAAAAAAAAAAA=
        command_off: sgocAAsMFgwWDBYMFgwWFgsWCxYLFgsWCwwWFgsAAZcAAAAAAAAAAAAAAAA=
      - name: Master Bedroom Fan Speed 2
        command_on: sgccAAsMFgwVDBUNFQwWFwsXCxcLDBUXCw0VFwsAAZUAAAAAAAAAAAAAAAA=
        command_off: sgocAAsMFgwWDBYMFgwWFgsWCxYLFgsWCwwWFgsAAZcAAAAAAAAAAAAAAAA=
      - name: Master Bedroom Fan Speed 3
        command_on: sgocAAsMFQwWDBUMFgwVFwsXCg0VFwsXCxcLFwsAAZUAAAAAAAAAAAAAAAA=
        command_off: sgocAAsMFgwWDBYMFgwWFgsWCxYLFgsWCwwWFgsAAZcAAAAAAAAAAAAAAAA=
      - name: Master Bedroom Fan Speed 4
        command_on: sg0cAAsMFgwVDBYMFQwWFwsXCwwVDBUXCxcLFwsAAZUAAAAAAAAAAAAAAAA=
        command_off: sgocAAsMFgwWDBYMFgwWFgsWCxYLFgsWCwwWFgsAAZcAAAAAAAAAAAAAAAA=
      - name: Master Bedroom Fan Speed 5
        command_on: sg4cAAsMFQ0VDBYMFQ0VFwsMFRgKFwsXCw0VFwsAAZYAAAAAAAAAAAAAAAA=
        command_off: sgocAAsMFgwWDBYMFgwWFgsWCxYLFgsWCwwWFgsAAZcAAAAAAAAAAAAAAAA=
      - name: Master Bedroom Fan Speed 6
        command_on: shAcAAsMFgwWDBYMFQwWFwsMFRcKFwsXCxcLFwsAAZYAAAAAAAAAAAAAAAA=
        command_off: sgocAAsMFgwWDBYMFgwWFgsWCxYLFgsWCwwWFgsAAZcAAAAAAAAAAAAAAAA=
      - name: Master Bedroom Fan Direction
        command_on: sg0cAAsMFQwVDBUMFQwWFwsXCxcLGAoMFhcLFwsAAZYAAAAAAAAAAAAAAAA=
        command_off: sg0cAAsMFQwVDBUMFQwWFwsXCxcLGAoMFhcLFwsAAZYAAAAAAAAAAAAAAAA=

Traceback/Error logs

Additional information

No error log

MarcoBischero commented 4 years ago

Same problem here. I don't see any error on home-assistant.log

felipediel commented 4 years ago

Please provide the information requested in the template so that we can understand what is going on.

Common mistakes:

elbow commented 4 years ago

Hi,

I had the same problem - the issue was the MAC address.

I'm totally confused since I had the mac in the config from before but I suppose it was always wrong and somehow in the old version it didn't matter since the IP was there too?

felipediel commented 4 years ago

Devices and entities are now related by MAC address. This is the only information you need to provide, but it must be correct. In the future we will show you the MAC to make things easier.

probot-home-assistant[bot] commented 4 years ago

broadlink documentation broadlink source (message by IssueLinks)

probot-home-assistant[bot] commented 4 years ago

Hey there @danielhiversen, mind taking a look at this issue as its been labeled with an integration (broadlink) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

elbow commented 4 years ago

Hey there @Danielhiversen, mind taking a look at this issue as its been labeled with an integration (broadlink) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

Hmm - "bad bot" since I was contributing a pointer as to what was wrong on my setup and how I fixed it thanks to the hint from @felipediel.

ordor2k commented 4 years ago

Please provide the information requested in the template so that we can understand what is going on.

Common mistakes:

  • You entered a wrong MAC address.
  • You have not configured the device via config flow.
  • You have not configured the entity in Lovelace correctly.
  • The remote entity is turned off.
  • The IP address is no longer valid.

Dear @felipediel

This are the answer's for you questions: It was working till I did the update. The MAC is the right one (no change)/ I don't know what do you mean in "config flow", I did configure it in the configuration.yaml file the entity is not showing in the entities list (it was there before), and I also used it in my Node-Rad automation. I can still control the device with the broadlink app - so it's on. I have not configured it with an IP as you can see in the configuration I posted.

I hope I answered with what you need and please let me know if you need me to provide anything else.

felipediel commented 4 years ago

We changed a lot of things recently. Now the devices are configured via Integrations page. Entities are linked to the device via MAC address, so it must be correct. You need to read the docs and update your configuration. Those mistakes that I mentioned are really common. Use them as a checklist.

yoni3210 commented 4 years ago

same issue OS: Home Assistant 0.116.4 configuration: image

errors: image

configration.yaml image

any sugesstions?

felipediel commented 4 years ago

Yes. Read the docs.

yoni3210 commented 4 years ago

i did, i removed the ip, i dont understand what is the issue.

yoni3210 commented 4 years ago

i role back to 0.115.6 to resolve the issue for, i really do not understand what I'm doing wrong.

it's configured in the integration, i configured the switch like in the docs, it was working until updated to the latest version 0.116.4

felipediel commented 4 years ago

You need to update your configuration for switches according to the documentation.

Before

switch:
  - platform: broadlink
    host: HOST
    mac: MAC_ADDRESS
    type: rm
    switches:
      philips_tv:
        - friendly_name: Philips TV
          command_on: JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA=
          command_off: JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA=

After

switch:
  - platform: broadlink
    mac: MAC_ADDRESS
    switches:
      - name: Philips TV
        command_on: JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA=
        command_off: JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA=
yoni3210 commented 4 years ago

This is exactly what is configured please look at my comment above, I've uploaded a picture. this is the same as you wrote.

felipediel commented 4 years ago

Nope.

felipediel commented 4 years ago

Send me your configuration in text so I can fix it for you.

yoni3210 commented 4 years ago

ohh i get it, "-name" this is my issue?

felipediel commented 4 years ago

Yes.

yoni3210 commented 4 years ago

Thank you!

rex5652 commented 4 years ago

try add the switch in integrations page

ordor2k commented 4 years ago

try add the switch in integrations page

How?

ordor2k commented 4 years ago

I have tried everything except reinstall homeassistant

felipediel commented 4 years ago

To set up a Broadlink device, click Configuration in the sidebar and click Integrations. If you see your device there, click Configure. If not, click the + icon in the lower right, enter the hostname or IP address of the device and follow the instructions to complete the setup.

ordor2k commented 4 years ago

Screenshot_2020-10-22-01-19-04-858_com android chrome It's already there.

ordor2k commented 4 years ago

Screenshot_2020-10-22-01-21-03-357_com android chrome Screenshot_2020-10-22-01-21-13-909_com android chrome

felipediel commented 4 years ago

Ok. Now please double check the MAC address. I am 99% sure that's your problem. The MAC is the only connection to the device. If you miss the MAC, the switch won't be created.

ordor2k commented 4 years ago

It wasn't changed. I have copied it from the Broadlink Manager 2020-10-22_11-01-06

felipediel commented 4 years ago

They are showing you the MAC address in the wrong order. You need to change the byte order to little endian. Reverse the octets:

Before

F6:E5:D4:C3:B2:A1

After

A1:B2:C3:D4:E5:F6

ordor2k commented 4 years ago

The strangest thing happened. I have added a new line with the change you wrote and now the old one is working again. I don't know what was wrong. switch:

Now all is working again. STRANGE!

THANK YOU FOR YOUR SUPPORT!!! I could not have done it without you. Like, Like, Like, Like, Like, Like, Like, Like, Like!

felipediel commented 4 years ago

You're welcome.