Broadlink IR Climate Component

I using this:

2 Likes

Hi gurbina93

Can you please share your Ac fan code?

Thanks.

where i should i copy the file ?

Will share it later today, as I am currently making some changes.
I have a few of dumb air conditioners so with thermostat I modify the temperature (I do not turn it on or off) and with a switch I turn it on or off. I am renting and the aircon is hardwired so I cannot get a plug to measure the power_load. Also sometimes Broadlink IR doesn’t actually turn on my aircon I lose track of the “power state” of my aircon.

Now I got some Xiaomi Door sensors which get updated almost instantly, so I am just planning to put them on the aircon louver, if it is open I now it is running. So create template switches which use Broadlink IR codes, and the power state to be retrieved by the Xiaomi Door sensors.

Dear all,
I’ve just added component climate broadlink into my configuration.yaml
However, upon checking config, it comes result

> Configuration invalidCHECK CONFIG
> Platform not found: climate.broadlink

Can anyone tell me reasons and how to solve it?
Many thanks

can you please show your config?

it should be something like this:

climate:
  - platform: broadlink

Thank you
Here’s mine

> climate:
>   - platform: broadlink
>     name: aacccomedor
>     host: 192.168.31.136
>     mac: 'B4:43:0D:A1:36:D9'
>     ircodes_ini: 'broadlink_climate_codes/fujitsu.ini'
>     min_temp: 16
>     max_temp: 30
>     target_temp: 20
>     target_temp_step: 1
>     temp_sensor: sensor.temperature_158d0001b1c847
>     default_operation: 'off'
>     default_fan_mode: mid
>     customize:
>       operations:
>         - 'off'
>         - cool
>         - heat
>       fan_modes:
>         - low
>         - mid
>         - high
>         - auto

do you have the python file saved in the correct location? I noticed that your ini file isnt nested inside the custom_components folder in the above config. Here is my full config below.

climate:
  - platform: broadlink
    name: Air Con
    host: 192.168.0.xx
    mac: '78:0F:xx:xx:xx:xx'
    ircodes_ini: 'custom_components/climate/broadlink_climate_codes/fujitsu.ini'
    min_temp: 16
    max_temp: 29
    target_temp: 24
    target_temp_step: 1
    temp_sensor: sensor.lounge_multisensor_temperature
    default_operation: 'off'
    default_fan_mode: auto
    customize:
      operations:
        - 'off'
        - cool
        - heat
      fan_modes:
        - low
        - mid
        - high
        - auto

Oh my God,
I don’t know how top do this.
I just clone the codes from GitHub and extract into the share folder in hassio share
Like this: \HASSIO\share


Am I wrong? And how to correct it?
Thank you

you need to put the broadlink.py file in /config/custom_components/climate/

the fujitsu.ini file needs to go in /config/custom_components/climate/broadlink_climate_codes

Dear sparkydave,
It seems no help for me
Can you check the screen shots of my configuration.yaml and destinations
of broadlink.py and ini files to see if they are correct?
\HASSIO\config\custom_components\Climate\broadlink_climate_codes\fujitsu.ini
\HASSIO\config\custom_components\Climate\broadlink.py


Thank you

try changing the ‘C’ in Climate to lowercase: climate in your folder name

Dear sparkydave,
After all, It’s all done! Just a “capped letter” can lead to failure!
Thank you

no worries, happy to help

You were right. (forgot to answer sorry)

For anyone experiencing problems, check in your code :

 - every element under operations exists and is written same in the ir .ini
 - every element under fan_modes exists and is written the same in the ir .ini
 - the ir codes work correctly
 - also double check the yaml.

Thank everybody for the help @erika.mason24 and @tmarquespt

1 Like

:smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

Dear Vassilis
Many thanks for your shares codes.
I tried your codes and successfully integrate my dump AC into hass. However, for the FAN and the Media Player, they do not show on my front-end. I do not know what happen with them
Below are the codes on configuration.yalm
FAN

fan:
  - platform: broadlink
    name: Living Room Fan
    host: 192.168.31.116
    mac: 'B4:43:0D:A8:26:D9'
    rfcodes_ini: 'custom_components/fan/broadlink_fan_codes/ceiling_fan.ini'
    default_speed: low
    defaut_direction: left
    customize:
        speeds:
            - low
            - medium
            - high
            - highest     

In which the broadlink.py was put on the folder
config\custom_components\fan
ceiling_fan.ini was put on the folder
config/custom_components/fan/broadlink_fan_codes

MEDIA PLAYER

media_player:
   - platform: broadlink
    name: Living room
    host: 192.168.31.116
    mac: 'B4:43:0D:A8:26:D9'
    ircodes_ini: 'custom_components/media_player/broadlink_media_codes/samsung.ini'
    ping_host: 192.168.31.109

In which the broadlink.py was put on the folder
config\custom_components\media_player
samsung.ini was put on the folder
config/custom_components/media_player/broadlink_media_codes
Do you have any suggestions?
Many thanks for your attentions
Minh Chau

Can you see in your dev log or in check config --> if there any errors in your configuration?
I see there’s some problem with tabulation in your media player config, should be:

media_player:
  - platform: broadlink
    name: Living room
    host: 192.168.31.116
    mac: 'B4:43:0D:A8:26:D9'
    ircodes_ini: 'custom_components/media_player/broadlink_media_codes/samsung.ini'
    ping_host: 192.168.31.109

Dear radinsky,
Sure, every time I make a change to the configuration.yaml, I always do the check config. However, I received no error and reboot the hass normally.
In my thread, I made a mistake when making the first line as you mention the error.
I do not know the reason why it does not show in the front end.
Thank for your support
Minh Chau

So here we go with my cards again and also the code for it:

Be aware I am using using the following:
-Lights: Broadlink TC2 switch (RF switches, no neutral wire required). Managed by Broadlink IR component.
-Fan: Broadlink TC2 switch (RF switch, no neutral wire required), just turn on and off from the switch itself because if I go the IR route to control the fan/speed and if the switch is off, obviously it won’t turn on. (Managed by Broadlink IR component).


-AC: Broadlink IR component switch IR codes to turn on and off. The AC is a wall split AC, it is the dumbest AC you could probably get, so it has the same IR code to turn on/off and then different IR codes for every thermostat/mode combination. I solved this by putting a door sensor which updates instantly whether the AC is on or off, so far it’s 100% accurate, my automations to turn it on and off automatically based on motion/home presence are great.
-AC thermostat: well obviously the component of this thread, just passing the IR codes for the thermostat/mode. No turn on or off here.
https://github.com/vpnmaster/homeassistant-custom-components

-Lumen/Lux sensor: Xiaomi Aqara Motion sensor which has motion, lumen, lux.

-Temperature sensor: Xiaomi bluetooth temperature LCD sensor which gives me temperature and humidity readings (for the living room), for the bedroom I am using the Broadlink IR integrated temperature sensor. There’s also very small ones without the screen which provide extra additional readings (barometers or who knows what).


-The lamps are the Xiaomi Gateway in my Living Room which only turns itself at night when it’s dark (because it has an illumination sensor) and while there’s movement. For my bedroom it is a standing lamp, which is controlled by a TP-Link plug.

For the media players, it’s a Xiaomi Mi Box and some Google Home minis, I use the Chromecast control integration. I use this custom card:

Also you will require this card for the vertical stack-in card:

I probably went for the cheapest stuff and it works great along with a Raspberry Pi 3B+ with tons of stuff running on it.
Almost every single item is less than 25 bucks.
Broadlink TC2 switches(2 and 3 gangs): ~25 USD
Xiaomi Bluetooth temperature sensor: ~12 USD
Door sensors: ~8 USD
Xiaomi Aqara Motion Sensor: ~12 USD
Dlink smart plug: ~10USD
Broadlink IR remote: ~25USD

Inconvenience is that since I’ve got a dumb ACs and I am renting then I need multiple Broadlink IR remotes but I can also load balance them so each one controls the lights (RF) of the room they’re in instead of giving all the work to a single Broadlink IR remote.
I am a renter so no hardcore stuff, just replacing the light switches which is pretty easy.
Lovelace UI YAML

  - type: vertical-stack
    cards:
      - type: custom:vertical-stack-in-card
        title: Bedroom
        cards:
          - type: glance
            title: Lights
            entities:
                - entity: switch.bedroomlight
                  tap_action: toggle
                  hold_action: more-info
                - entity: switch.bedroomlamp
                  tap_action: toggle
                  hold_action: more-info
          - type: glance
            title: Climate Control
            entities:
                - entity: switch.bedroomfan
                  tap_action: toggle
                  hold_action: more-info
                - entity: input_boolean.fanautobr
                  tap_action: toggle
                  hold_action: more-info
                  name: 'Auto'
                - entity: switch.bedroomairconditioner
                  tap_action: toggle
                  hold_action: more-info
                - entity: input_boolean.acautobr
                  tap_action: toggle
                  hold_action: more-info
                  name: 'Auto'
          - type: thermostat
            entity: climate.bedroom_air_conditioner
          - type: glance
            entities:
                - sensor.illumination_158d0001e5cc4e
                - sensor.broadlink_sensor_temperature
          - type: custom:mini-media-player
            entity: media_player.bedroom_speaker_3_2
            artwork: cover
            show_source: true
            show_progress: true
            show_shuffle: true

          - type: glance
            title: Lights
            entities:
                - entity: switch.couchlight
                  tap_action: toggle
                  hold_action: more-info
                - entity: switch.tablelight
                  tap_action: toggle
                  hold_action: more-info
                - entity: switch.kitchenlight
                  tap_action: toggle
                  hold_action: more-info
                - entity: light.gateway_light_7811dcdef518
                  tap_action: toggle
                  hold_action: more-info
                  name: 'Lamp'
          - type: glance
            title: Climate Control
            entities:
                - entity: switch.livingroomfan
                  tap_action: toggle
                  hold_action: more-info
                - entity: input_boolean.fanautolr
                  tap_action: toggle
                  hold_action: more-info
                  name: 'Auto'
                - entity: switch.livingroomairconditioner
                  tap_action: toggle
                  hold_action: more-info
                - entity: input_boolean.acautolr
                  tap_action: toggle
                  hold_action: more-info
                  name: 'Auto'
          - type: thermostat
            entity: climate.living_room_air_conditioner
          - type: glance
            entities:
                - sensor.illumination_158d0001e0acf6
                - sensor.illumination_7811dcdef518
                - sensor.living_room_temperatura
                - sensor.living_room_umidita
          - type: custom:mini-media-player
            entity: media_player.living_room_speaker_3
            artwork: cover
            show_source: true
            show_progress: true
            show_shuffle: true
11 Likes