Broadlink IR Climate Component

Hello Guys, anyone tried to manage Hisense conditioner with this components?

Hey Guysā€¦ On latest 0.77.3 HA and broadlink scripts. Also google assistant is configured as a component. Somethings have broken (not saying due to updated but havent used it for a long time)

  1. Fujitsu AC

The config is

climate:
  - platform: broadlink
    name: Living Room AC
    host: IP ADDRESS
    mac: 'MACADDRESS'
    ircodes_ini: 'custom_components/broadlink_climate_codes/fujitsu.ini'
    min_temp: 16
    max_temp: 30
    target_temp: 20
    temp_sensor: sensor.temperature_158d0001fa985e
    default_operation: 'off'
    default_fan_mode: mid
    customize:
      operations:
        - 'off'
        - idle
        - cool
        - heat
      fan_modes:
        - low
        - mid
        - high
        - auto
  - platform: generic_thermostat
    name: Living Room
    heater: switch.living_room
    target_sensor: sensor.temperature_158d0001fa985e

When I try to turn it on ā€œTurn on living room ACā€ i saw this error

2018-09-03 17:12:52 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/configparser.py", line 789, in get
    value = d[option]
  File "/usr/local/lib/python3.6/collections/__init__.py", line 883, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "/usr/local/lib/python3.6/collections/__init__.py", line 875, in __missing__
    raise KeyError(key)
KeyError: 'mid_20'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/service.py", line 224, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/climate/broadlink.py", line 303, in set_operation_mode
    self.send_ir()
  File "/config/custom_components/climate/broadlink.py", line 167, in send_ir
    command = self._commands_ini.get(section, value)
  File "/usr/local/lib/python3.6/configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'mid_20' in section: 'cool'

What all do I need to do to fix the issues?

I tried replacing ā€œmidā€ to ā€œmedā€ as I thought it might match the file https://github.com/vpnmaster/homeassistant-custom-components/blob/master/broadlink_climate_codes/fujitsu.ini

But that also didnā€™t work

Iā€™m still working on it. Having some issue to define the right command to learn/send. Actually i can change the mode temp and vent, but i need to switch it on before sending command from the component climate.
To switch off the air con i found the workaround using the ā€œtimerā€ command setting 1 minute to switch it off.
which split model have you?

Ciao Fabio, i have the silentium model QA25XX0AG. Could you share the ini file you created?

Ale

This system dose not show the temp from the thermostat, it will show only the fan speed selected from the remote if it is started from the remote. This is why it is confusing how to set this up.

How can that be done in HA? I am struggling to figure the part of using +/- regardless of the temp in the ini file. the current scenario, correct me if I am wrong, but the script will check the current value as a default and then search the ini for the code for the next temp up or down based on the pressed button. In my case there is no specific ir code for a specific temp, just up or down. (Stupid I know but this is what I have and not possible to change).

I think this has to do with
* Upgrade MDI icons ([home-assistant/home-assistant-polymer#1630](https://github.com/home-assistant/home-assistant-polymer/pull/1630)) [@balloob](https://github.com/balloob)

I a m a bit of a newbie to this device and learning codes process for it.
I am not sure how to get the codes into an ini file. I have a Hitachi Air-Con and the existing hitachi.ini does the basics, but the Air-Con unit I have also has FAN only mode, Auto Fan and Auto Changeover functions.

I am okay doing the learning process if I can understand it, but I am struggling with that at the moment.
Anyone have ideas, or maybe some codes?

Indoor unit is an RAS-35YH/A5

Actually I havenā€™t heard of this device type. Probably this particular custom component will not suit your needs. You can check it though. Try to capture your remote codes for several temperature increase button clicks in a row. If they are exactly the same then this component is not for you. As I wrote this component tries to reproduce the remotes which send the whole desired unit state with each command.

1 Like

If your AC does not have a Temperature setting on the original remote control, then this Climate Component will likely not work as desired. I have one that has no temp setting or LCD on the remote, and this component will not work for that properly.
It does seem (and correct me if this is wrong) that this component is designed for systems that accept set temperature as well as set mode and set fan mode commands.

I would suggest if its simply just an up/down temp, on/off and fan speed, you just use the broadlink component (not the climate component) and learn those codes.

Then create your own buttons on the UI, that when press execute sending the components via the broadlink component

Kinda like this, I use the normal broadlink component to control my wireless powerboards, they are just dumb on/off:

switch:
  - platform: broadlink
    host: 192.168.10.199
    mac: 34:ea:34:c7:95:00
    type: rm2_pro_plus

script:
broadlink_tv_off:
  sequence:
    - service: switch.broadlink_send_packet_192_168_10_199
      data:
        packet:
          - "sgAwAQ0bDRwNGw4bDRsOGw0bGg4bDRsODRsNHBkOGw0OGxoOGg4NHA0AAXoNDQ0ODQ0NDQ4NDoYbDRsODBwaDhoOGg4aDhoODRwaDhoOGg4aDg0bGw0NHA0cDRsNHA0bDRsOGw0bDhsNGxoOGw0bDQ4bDhsaDRsODRsaDhsNDhsNAAF6DQ0ODA4NDgwODQ6GGw0bDQ4bGg4bDRoOGw0aDg4aGw4aDhsNGg4NHBoNDhsNGw4bDhoOGw4aDhsOGg4bDhobDhoOGwwOGw4aGw4aDQ8aGw0bDQ4bDgABeQ4MDg0ODA4NDgwPhRsOGwwPGhsNGw0bDRsNGw0PGhsNGw0bDRsNDhsbDQ4aDxoOGg8aDhoPGg4aDxoOGg8aGw0bDRsNDhoPGhsNGw0OGxsNGw0OGw4ABdwAAAAAAAAAAA=="

Create a script for each function (e.g. temp up, temp down, etc), then create a button in the UI to execute each one.

Finally got codes programmed.
This is a pretty awesome add-on component.
Any word on if there are plans to make it an official add-on via HassIO? It seems to work extremely well.

I had to update the hitachi ini file with some extra codes as my Hitachi has 4 fan speeds, plus auto fan speed. That was a bit tedious.
Apart from that, all seems well.

I just have one question. Has anyone had issues using the climate.airconditioner entity this seems to create in automations?

I can seem to get it to trigger ā€˜Offā€™ commands via automations, but it doesnt seem to trigger the Resume, Heat or Cool commands.

Edit: Never mind, got it working. The zwave climate service climate.set_temperature supports ā€œoperation_modeā€ and ā€œtemperatureā€ to do it all under the on the one service. The broadlink climate seems to need the climate.set_operation_mode to call the function and then use climate.set_temperature to call the temperature setting.

Ciao Faxbio, how do you proceed with the ini creation?
Ale

hi, iā€™m far from home now.
iā€™ll send you the ini when iā€™ll back home. The actual ini , i mean, that has the code learned from the remote using the ā€œarrowā€ to change the temp. This means that if the Aircon is already ON it works . But you have to switch it on (somehow , even from HA) before using the climate component.
Iā€™m tryn to learn codes using the ON/OFF remote button, but this means that if you use it in the climate component it sends the code learned (that is ON/OFF + Mode + temp + vent) and it will switch it off for every change you make (mode/temp/vent) if the aircon is already on.
iā€™m triyn to figure out wich is the best approach ( probably the first one, turn it on before) .
Any ideas aournd there? itā€™s the only aircon remote that works this way?

thatā€™s how I did it:
aircon off, I set a temperature with the remote, then press on: this will send the signal ON+mode+temperature
copy the code in the ini file, then turn the aircon off
raise or lower the temperature, then press on, and repeat

I did the same before. but the point is that in this way the IR command is sent including the ON/OFF toggle command. from HA it works only for the 1st time, but if you later (even only a second) ā€œchangeā€ mode or temp or vent from HA (while aircon is already ON ) the IR command makes the changes (mode or temp or vent) but also switch off the aircon.

Maybe the right road is to change the script to have two different IR command to send if the climate component is already on or off. It will work obviously only if i will ā€œhideā€ the physical remote and forgot to use it. but in this way HA and Aircon state will be syncronized.

Iā€™m not a pyton dev but iā€™ll try to manage it in my spare time. Anyone has the same configuration need?

This probably happens because your aircon has the same command for on and offā€¦ Mine (and most others) doesnā€™t, so I donā€™t have the situation you describedā€¦ Yes, everytime I change temp or mode, it will also send on command, but itā€™s not a problemā€¦

Hello, Iā€™ve started using this component recently and I was in joy when I saw all the commands of my remote available in one of the daikin remotes. Thanks for the effort you put into this.

One thing I found is that the fan speeds are not avaliable in homekit and google assistant the way climate component is implemented.
They fixed this issue in homebridge by inserting a seperate fan with the same name. So that you can set the mode of the A/C and the temperature with the climate component and set the fan speed with the fan component.
https://github.com/home-assistant/homebridge-homeassistant/pull/244

Is it possible to create the same functionality here? Custom component creates two entities; one for the climate and one for the fan?

Thanks for the great work.

Let me try to do some testā€¦i just got an android phone that allow me to dump the code (with iphone i wasnā€™t able)

You can manually grab the IR codes for your systems ā€œFanā€ mode and then create the ā€œFanā€ section in the INI file for it.

I did that with my Hitachi unit for the various modes that were not included in the ā€œdefaultā€ hitachi.ini file

I think you should be able to do it as an additional ā€œplatformā€ for the Fan Only modes with a separate ini file for fan only modes.