Broadlink IR Climate Component

Plus this: Unable to install package https://github.com/balloob/python-broadlink/archive/3580ff2eaccd267846f14246d6ede6e30671f7c6.zip#broadlink==0.5.1: Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-gv1900eo/pycryptodome/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-aw19neta-record/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-gv1900eo/pycryptodome/
2018-04-14 23:07:03 ERROR (MainThread) [homeassistant.requirements]

Thank you.
Fixed!

3 Likes

Indeed it is fixed and thank you for all the work you put into this!

Update 0.67 and following error.

Error while setting up platform broadlink
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py”, line 82, in async_setup
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.5/asyncio/tasks.py”, line 400, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/broadlink.py”, line 145, in setup_platform
broadlink_device = broadlink.rm((ip_addr, 80), mac_addr)
TypeError: init() missing 1 required positional argument: ‘devtype’

Restart and solved. Thank you.

Fixed for me too… Thanks!

Great component,

I am new to custom components and have a couple of questions:

  • What is preventing such an awesome component from getting merged with the main HA repository? (not a complaint just wondering)
  • Is there a way to add play/pause to the media player component? - I tried adding play and pause commands to the ini file in hopes that it would work but unfortunately no joy. Is this something that has not been implemented?

Hi, first of all, thanks you very much for your kind spirit of sharing knowledge to everyone.

I am new to HA and currenlty try to apply your code, however, I have faced some errror as attached herewith. I have tried to download an uptodate file in your post however, the problem still there.

Hope you can help me to solve it. Thanks alot.

same here :confused: must be a better solution :disappointed_relieved:

Hi Vassilis.

Thanks so much for your component.

Id like to give you a feature request.

I have an external sensor that monitors if the aircon has been turned on or off by something else (eg. The original remote).

I’d like to be able to update the climate state without actually sending any ir codes to the unit.

Id like to be able to tell the component to change it’s current state to “on” or 'off". I would want to use “on” as there is no way to tell if it is on “heat” or “cool” etc.

I was able to achieve this via an ugly hack by adding a bunch a dummy IR codes for a mode called “on”, but my wife might fight it confusing to have the"on" mode selectable in the gui webpage. As if you select the on mode in the gui nothing actually happens.

Thanks
Kiwi

Thanks for your work on this I was able to make a ceramic heater act like it was controlled by a thermostat. Gave you credit in wiki (hope you dont mind) THANK YOU https://github.com/Vasiley/Home-Assistant-Main/wiki/Bathroom-Heater-w-Broadlink-Control

I just tried setting this up tonight, using the newest github files. I am getting the following in the log file:

2018-04-23 10:36:38 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform broadlink
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 82, in async_setup
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
  File "/usr/lib/python3.5/asyncio/coroutines.py", line 210, in coro
res = func(*args, **kw)
  File "/home/homeassistant/.homeassistant/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

I guess this line is indicating the main problem:
init() takes 3 positional arguments but 4 were given
but I am not sure what my problem is - my configurations look exactly the same as the samples.

Thank you for your work ! I was about to start coding something like this for my needs.

However, I have a slight problem with the configuration because my IR climate unit is very basic and only have a temp+ and temp- button that are simply two commands not depending on the temperature. The temperature is a 7 segment display on the AC unit itself (that I intend on capturing later with a small wifi camera).

Since all ini files have compound commands I am not sure how to create my INI. I can’t set the same command with all temperature because the control is relative to the currently set temperature.

I am sorry if this was mentioned earlier, I couldn’t find the answer in the thread.

If this isn’t possible in the current code I would be glad to try to contribute as to make it possible.

Thanks in advance.

[EDIT] I just read the code and I see that it isn’t currently possible but that seems like some code I can do. I’ll send a pull request once I am done. Thanks again for the good work !

Thanks for all your work with this component.

I updated to 0.68 and am now getting this error:

ERROR (MainThread) [homeassistant.requirements] Not initializing climate.broadlink because could not install requirement broadlink==0.8.0

EDIT: Changed line 18 in broadlink.py to REQUIREMENTS = [‘broadlink==0.9.0’] and it’s working perfectly again now :slight_smile:

I updated to version 0.68 and received the error that the component could not be loaded. A new version of the component was published just a few hours ago. Sure enough, I updated the component and everything is back to normal.

Thanks!

ahh thanks for the update, was wondering why my 0.68 was crashing… cheers!

I’m sorry guys, but can someone please point me in the right direction on how to implement this?
I have an RMpro which has the temp sensor and would like to automate AC based on temp conditions

Thanks

Hi all,
Still can’t work out how to use Google Home to call the climate component. Any guidance would be most appreciated!
I am using a Fujitsu AC called ‘Air Conditioner’ with the following modes: Quiet, Cool, Heat, Fan
Not sure how to call the mode or change to a specific temperature!

So I got this working with a Trane split system, I’ve only done the cool low, mid, high IR’s, but will upload file when I’ve done them all.

I’ve also got a question, is there a way to integrate the generic_thermostat component into this? https://www.home-assistant.io/components/climate.generic_thermostat/

My split system doesn’t turn off when target temperature is met, so I’m thinking that by automating this with generic_thermostat I could maybe get it to turn off and on?

Yes, here is some sample code from my automation.yaml, that you could adapt to get you started:

- alias: 'Turn off AC if no motion for 90 minutes (8am - 10pm)'
  trigger:
    - platform: state
      entity_id: binary_sensor.motion_sensor_158d0001dc7526
      to: 'off'
      for:
        minutes: 90
  condition:
    - condition: time
      before: '22:00:00'
      after: '08:00:00'
    - condition: template
      value_template: "{{ not is_state('climate.panasonic_aircon', 'off') }}"     
  action:
    - service: climate.set_operation_mode
      entity_id: climate.panasonic_aircon
      data:
        operation_mode: 'off'

Change the trigger and conditions and entity ID.

1 Like