Broadlink IR Climate Component

Would like to share on how to learn code.
Unless you know that your remote will issue codes including full set of instruction (temp, fan speed, operating mode), you can rely only on the broadlink database. The broadlink is known to issue complete code in each emission.

What I have done with mine Hitatch:

  1. Identify the proper model in the original e-control app from broadlink on RM(A)
  2. Set up RM(B) in Hass.io to receive code from RM(A)
  3. set the temperature to 29 degree cool, auto, and learn by pressing up then down, down, down… until 16 degree.
  4. Then you will get 15 IR code in the status page in the table.
  5. copy the table to excel for further manipulation
  6. repeat 3-5 for cool, heat, dry, auto, high, mid, low and a full sets of 150 combination would be done.

You should get all codes within 30 minutes time by using this method.

4 Likes

Thanks for that!

i would like to request one more feature
auto rotate / 3d /
controlling air flow direction.
Please some body guide.

Hey guys

I have got the latest broadlink.py from github and on lastest homeassistant… I get the following error on startup

2018-05-20 09:32:02 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/climate/broadlink.py", line 88, in async_setup_platform
    broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
TypeError: __init__() takes 3 positional arguments but 4 were given

2018-05-20 09:32:06 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/switch/broadlink.py", line 143, in setup_platform
    broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
TypeError: __init__() takes 3 positional arguments but 4 were given

2018-05-20 09:32:06 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/switch/broadlink.py", line 143, in setup_platform
    broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
TypeError: __init__() takes 3 positional arguments but 4 were given

Is the latest homeassistant a beta release?

No… But I was on 0.68.1 … Upgraded to 0.69.1 but same errors in logs

2018-05-20 10:58:15 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for

2018-05-20 10:58:17 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/switch/broadlink.py", line 143, in setup_platform
    broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
TypeError: __init__() takes 3 positional arguments but 4 were given

2018-05-20 10:58:17 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/switch/broadlink.py", line 143, in setup_platform
    broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
TypeError: __init__() takes 3 positional arguments but 4 were given

I get exactly the same error on 0.69.1 and the docker image of HA, and the latest broadlink.py from GitHub. :frowning:

Can you check the python broadlink module is actually 0.9? I always have these sorts of issues when HA doesnt seem to update the dependency modules automatically. I usually check what the latest climate custom component is whenever I update and then manually force pip to upgrade to the broadlink version required in the file.

If you’re using venv,

sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip list installed | grep broadlink

Hello, how can I add other buttons on the air conditioner ??? (for example, switch off LED - turbo mode - swing)

Ceiling fan yaml config

basically I have this config
`fan:

  • platform: broadlink
    name: Living Room Fan
    host: 192.168.1.85
    mac: ‘BB:BB:BB:BB:BB:BB’
    rfcodes_ini: ‘broadlink_fan_codes/living_room_fan.ini’
    default_speed: low
    defaut_direction: right
    customize:
    speeds:
    - low
    - medium
    - high

My device *.ini file has left and right fan speeds but only right is accessible left is greyed out. Ideas? also need to add light.

Thanks

Amazing work. I had it set up in no time. Creating of INI file for my Galanz split unit took me some time, but I managed to extract IR codes from Broadlink cloud as described in some earlier posts. Total 129 IR codes, it would be huge pain to learn it manually.
The AC remote is generic (gz-1002b-e3) so it works for Galanz, Amstrad, Weltec, WEG, Vivax, Yamatsu, Schaub, Lorenz, Westinghouse…
So, if anyone needs it, or you want to add it to the project, I can share it.

Cheers!

Hi folks!

Awesome component - took me a little while to figure out where o place stuff in my hassbian install. I have an older Midea split unit with reverse (heat+cool) working in no time.

I have a question though.

I had the setup previously using a standard generic thermostat:

  # - platform: generic_thermostat
    # name: Study_temp
    # heater: switch.ac_midea_study
    # target_sensor: sensor.study_temperature
    # min_temp: 17
    # max_temp: 23
    # ac_mode: False
    # target_temp: 22
    # cold_tolerance: 0.3
    # hot_tolerance: 0
    # min_cycle_duration:
      # seconds: 5
    # keep_alive:
      # minutes: 10
    # initial_operation_mode: "off"
    # away_temp: 10

This worked really well in as much as I was limited to having it in heat mode (or editing the config to swap to cool mode) - but I have noticed a difference in behaviour with the Broadlink IR component.

The generic thermo would switch my air-con on and off as it sensed the temerature dropping on my external temp sensor. This comp’ doesn’t do that - or have I gotten something wrong?

Here’s an image of it still trying to heat my room past 22c

There also doesn’t seem to be any tolerance settings, keep alive option, or away mode.

Would love to hear where I am going wrong.

Thanks!

Nikolaos Can you share the ini? Id like to try! Thanks!

Hi Nikoloas,

Can you share your work? I think I do have the same type of unit.
Thanks a lot!

Max

how did you get temp graph?
can u share your yaml file and what u did to get this?
Please guide
thanks in adv

Unless you are doing something vastly different with this component, I use this for a midea ducted reverse system. All the component is doing is using IR to turn the system on/off/mode and changing temperature. It does not cycle the system on and off depending on room temperature.

This is done by the A/C system with its own inbuilt temperature sensor. Depending on the location of the units temperature sensor, it may cause the system to run over/under as its temperature sensor has a different reading to the one you are using for HA. There can be as much as 5 degrees temperature difference between a sensor at floor level and ceiling level and quite a difference in low flow areas of a room (or the house).

Its part of the component, you see that when opening up its card.

Does anyone has codes/.ini for a Vaillant ClimaVair? The remote model it uses is ZH/LW-03 (also used by Hokkaido - Nakatomy - York - Blueway - Celestial - Fujiya - Saunier Duval - Turbo - Airlux)

Dear, Im not getting current temperature,
so that might be the reason i am unable to see

You need to setup either your own temperature sensor or use the one built into the Broadlink unit.