Skip to content

Instantly share code, notes, and snippets.

@Snipercaine
Created September 27, 2018 18:18
Show Gist options
  • Save Snipercaine/7bf0f3d8bbd839eaef8f5320f2fedad4 to your computer and use it in GitHub Desktop.
Save Snipercaine/7bf0f3d8bbd839eaef8f5320f2fedad4 to your computer and use it in GitHub Desktop.
Broadlink IR and Home Assistant - Examples for Config and Automations
@kcd83
Copy link

kcd83 commented Mar 9, 2020

You might find like I did that volume command_on and command_off packets contain multiple sends at once. I repeated the learn process and only very briefly tapped the remote volume buttons and found much shorter codes that only increased the volume by 1 increment.

Hope this helps someone

@baspax1
Copy link

baspax1 commented Apr 9, 2020

briefly tapped

Yes i have the same problem,ill try to get codes again! thank you

@ClementNoiville
Copy link

ClementNoiville commented Apr 11, 2020

Hi,
Where is defined switch.broadlink_send_packet_192_168_1_66 ?
I get this error: Service not found for call_service at pos 1: Unable to find service switch/broadlink_send_packet_192_168_1_27

I should add :

script:
  broadlink_send_packet_192_168_1_27:
    sequence:
      - service: broadlink.send
        data:
          host: 192.168.1.27

But not work without the packet :/

@baspax1
Copy link

baspax1 commented Apr 11, 2020

Hi,
Where is defined switch.broadlink_send_packet_192_168_1_66 ?
I get this error: Service not found for call_service at pos 1: Unable to find service switch/broadlink_send_packet_192_168_1_27

I should add :

script:
  broadlink_send_packet_192_168_1_27:
    sequence:
      - service: broadlink.send
        data:
          host: 192.168.1.27

But not work without the packet :/

If you successfully connect your broadlink device you can see on your service on developer tools, follow the picture to learn codes *define the host ip as the picture shows : https://imgur.com/CWFgH1n

@ClementNoiville
Copy link

Hi,
Where is defined switch.broadlink_send_packet_192_168_1_66 ?
I get this error: Service not found for call_service at pos 1: Unable to find service switch/broadlink_send_packet_192_168_1_27
I should add :

script:
  broadlink_send_packet_192_168_1_27:
    sequence:
      - service: broadlink.send
        data:
          host: 192.168.1.27

But not work without the packet :/

If you successfully connect your broadlink device you can see on your service on developer tools, follow the picture to learn codes *define the host ip as the picture shows : https://imgur.com/CWFgH1n

I have the packet I always add to add the IP, sush as :

    action:
      - service: broadlink.send
        data:
          host: 192.168.1.27
          packet:
            - "JgCQAAABKZIUNxISFBETExISExITEhM3EzcTEhM3ExISNxQ3EzYTExI3ExMSEhQ2EzcTEhM3ExITEhM3EzcSExMRFDcTERQ3EgAFRAABKZIUNxMRFBETExISFBETExI3EzcTEhM3ExITNxQ2EzcSExI3ExMSEhQ3EjcTEhM3ExITEhM3EzcSExMRFDcTERQ3EgANBQAAAAAAAAAA"

@TheGroundZero
Copy link

In configuration.yaml add the following or install the Broadlink integration:

remote:
- platform: broadlink
  host: 192.168.xx.xx
  mac: 'ab:cd:ef:12:34:45'

then under switch:

switch
  - platform: broadlink
    host: 192.168.xx.xx
    mac: 'ab:cd:ef:12:34:45'
    switches:
      # TV
      - name: TV Power
        command_on: "JgBYAAABJZQRExITEjgRFBETExISExETEjgSNxITEjgSNxI4EjcSOBITERMSExI4ERMSExITEhMSOBE4ETgSExI3EjgSOBE4EgAFJAABJ0sSAAxRAAEmSxIADQUAAAAAAAAAAAAAAAAAAA=="
        command_off: "JgBYAAABJpMTEhMSEjcSExITERQRExITEjgROBITEjcSOBI3EjgSOBISEhMSExI3EhMSExITEhMROBI4EjcSExM2EjgSOBE4EwAFIwABKEoSAAxRAAEoShIADQUAAAAAAAAAAAAAAAAAAA=="
      - name: TV Volume up
        command_on: "JgBYAAABJZMSExITEjcSExITEhMRFBETEjgROBMSEjgSNxI3EjgSOBETEjgSExETEhMSExITERMSOBITETgTNxI3EjgROBI4EQAFJQABJ0oSAAxSAAEnShIADQUAAAAAAAAAAAAAAAAAAA=="
      - name: TV Volume down
        command_on: "JgBQAAABJZQSExETEjgSExETEhQRExITEjcSOBEUETgSNxI4EzcSNxI3EzcSExITERMSExITERQSEhITEzcROBI4ETkSNxE4EgAFJAABJ0oSAA0FAAAAAAAA"
      - name: TV Mute
        command_on: "JgBYAAABJpMSExITETgTEhITERMTEhITEjcTNxITETgSOBE4EzcSNxI4EhMRExI4EhMRExITEhMSExI3EzcRExI4EjcTNxI3EgAFJQABJ0oRAAxSAAEnShMADQUAAAAAAAAAAAAAAAAAAA=="
        command_off: "JgBYAAABJZQSEhITEjgRExITEhMSExEUEjcSOBETEjgSNxI4EjcTNxI3EhMSExI4EhISExITEhMRExI4EjcSExI4EjcSOBI3EwAFJAABJ0oTAAxSAAEmShMADQUAAAAAAAAAAAAAAAAAAA=="

in your automation, you can now use:

action:
  - service: switch.turn_on
    data:
      entity_id: switch.tv_power

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment