SmartIR - Control your Climate, TV and Fan devices via IR/RF controllers

Sometime ago I created a python script to speed up the process of learning Broadlink IR commands for my air conditioner.

Sharing here if of use for anyone:

This python script will take a list of supplied command names from input.txt, and prompt you to press the corresponding button on your remote control. Once complete, it will output the learned packets to a csv file (output.csv) which can then be opened in a text editor of your choice or excel.

Same here. Voice commands not working.

With a Broalink Mini3 Is it possible to have current status of the AC from what the remote receives from the user when pointing it to the AC?

No. The broadlink device will only be waiting to receive a command from an external remote when you tell HA to listen for it (using a service call). In normal ā€˜idleā€™ condition HA isnā€™t listening to anything from the broadlink

With some remote controllers I find that different codes are sometimes received when trying to learn which I put down to the IR signal bouncing off walls etc, and the Broadlink device receiving multiple signals together which muddles things up. Using a close and direct signal ensuring no reflections worked.

Do you think It would be possible to set it up to listen instead of being idle ? Otherwise I think just building this custom IR module is a way better solution -> https://community.home-assistant.io/t/tasmota-mqtt-irhvac-controler

1 Like

What are the words to change channels and volume by voice on a TV? ā€˜Onā€™ and ā€˜offā€™ voice commands are working, but for the rest, (volume, channels, etc) google assistant answer "I canā€™t find a compatible deviceā€™ā€¦but all commands work fine If I click on the icons in the cardā€¦

Only the off command works for the second AC, here is my configuration

BTW the first AC works fine

I just started with Home Assistant about a week ago. I discovered SmartIR and bought a Broadlink RM4C Mini. The Mini works well with the Broadlink app for my TV, aircon and fan and I see the little LED blink on the Mini when I invoke an action from the app.

Iā€™ve tried to set up SmartIR following the instructions. When I click on the Overview in Home Assistant to turn on the fan (named fan.bedroom_fan matching configuration.yaml) or the TV or the Aircon (guessing at codes still), the little LED in the Mini doesnā€™t blink and I get this message in the log file. Iā€™ve set the IP address and MAC address of the Mini in the configuration.yaml file:

# SmartIR component to drive the Broadlink IR blaster RM4C Mini
smartir:

switch:
  - platform: broadlink
    host: 192.168.2.118
    mac: '24:DF:A7:34:5D:7A'

climate:
  - platform: smartir
    name: Bedroom AC
    unique_id: bedroom_ac
    device_code: 1100
    controller_data: 192.168.2.118

fan:
  - platform: smartir
    name: Bedroom Fan
    unique_id: bedroom_fan
    device_code: 1000
    controller_data: 192.168.2.118

media_player:
  - platform: smartir
    name: Living Room TV
    unique_id: living_room_tv
    device_code: 1060
    controller_data: 192.168.2.118
    source_names:
      HDMI1: Download
      HDMI2: YouTube
      HDMI3: HomeAssistant
      VGA: null

Hereā€™s the error message from the log file:

2020-01-26 23:58:33 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for smartir which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2020-01-27 00:04:19 ERROR (MainThread) [custom_components.smartir.fan] not a valid value @ data['packet'][0]
Traceback (most recent call last):
  File "/config/custom_components/smartir/fan.py", line 242, in send_command
    await self._controller.send(command)
  File "/config/custom_components/smartir/controller.py", line 82, in send
    'broadlink', 'send', service_data)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1204, in async_call
    processed_data = handler.schema(service_data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value @ data['packet'][0]

I did a search for parts of the ERROR message and the term ā€œsmartir.fanā€ and neither have never been mentioned so Iā€™m in uncharted waters. I appreciate any help. Thanks!

1 Like

can i use SMARTIR to control a wall switch which uses broadlink to send RF signals? how will i configure it?

Please help: I have SmartIR running with a Broadlink RM mini 3 for my TV and AC in my living room area (more precise 2 rooms in open space). TV and AC are in different zones of the area and RM is not able to control both. So I bought another remote from Xiaomi chuangmi.remote.v2. I tried to use the Broadlink RM 3 mini working raw codes source for Xiaomi chuangmi.remote.v2. I was wrongly assumed that raw base 64 from Broadlink will be also used on Xiaomi, but seems not.
Bellow some tests Iā€™ve done in HA.

Sending working ā€œoffā€ AC command from Broadlink RM mini 3:

JgBAAGcAAUYRNBASDxMPEw81EBEQEw8TDzUPNRASEBIPEhASEBIQEhASEBIPExASEBIQNBASDzUQERATEBIQNBEADQUAAAAAAAAAAA==
2600400067000146113410120f130f130f35101110130f130f350f35101210120f12101210121012101210120f1310121012103410120f35101110131012103411000d050000000000000000

Learning on HA with ā€œxiaomi_miio.remote_learn_commandā€ on chuangmi.remote.v2:

ms2mEsmM1mkwlk0nMwlk1ADKZziYSybTEAdpqAmUwAgObgEFMwJCAHYAtAMDA4MEE5sBKU0AtKYzaZAEEB0U1AMIBA5qAWQFKAQEBygA9gVkCCgF7gumB+YAZBBGB+gCZAjwAmUxmwNxAgQE3AJJgYmAWYNpAYoBQQTaAdGA4cwgAA==

Trying command in HA for chuangmi.remote.v2 and not working.

Sending back the learned command from chuangmi.remote.v2 with ā€œremote.send_commandā€:

entity_id: remote.mi_living_room_remote
device: 32756745
command: ms2mEsmM1mkwlk0nMwlk1ADKZziYSybTEAdpqAmUwAgObgEFMwJCAHYAtAMDA4MEE5sBKU0AtKYzaZAEEB0U1AMIBA5qAWQFKAQEBygA9gVkCCgF7gumB+YAZBBGB+gCZAjwAmUxmwNxAgQE3AJJgYmAWYNpAYoBQQTaAdGA4cwgAA==
num_repeats: 1
delay_secs: 0.75
hold_secs: 2.5

Learning IR command on Broadlink RM mini 3

IR Infrared Learning mode is enabled.
OnRawData : 26003C000E3211120D140B161133120F12110F1210340F350E130E1410111110111112110F1310100D150F120E140E3610111035111010130E130E3511000D05000000000000000000000000
OnRawData Base64 : JgA8AA4yERINFAsWETMSDxIRDxIQNA81DhMOFBARERARERIRDxMQEA0VDxIOFA42EBEQNREQEBMOEw41EQANBQAAAAAAAAAAAAAAAA==

Trying the received command in HA for Broadlink RM mini 3 and not working.

1 Like

@mwbrown42 Unfortunately the RM4 isnā€™t supported. I raised a Feature Request to get support added - you can vote on it here:

1 Like

Well bugger! Supported Broadlink models are not documented on the SmartIR page. Is there a list of supported models anywhere? Iā€™ll buy a compliant one and put the RM4 on the shelf until itā€™s supported. Thanks for the info!

1 Like

SmartIR uses the Broadlink integration, the supported models are documented there.

I have just today ordered another RM3, I guess Iā€™ll put the RM4 away as well.

1 Like

OK, I found this at https://www.home-assistant.io/integrations/broadlink/#remote

Not the greatest way to describe which models are supported. I see that your RM3 isnā€™t listed, does it work? Is the RM Mini 3 functionally equivalent to the RM3?

Type:
Switch type. Choose one from: rm , rm2 , rm_mini , rm_pro_phicomm , rm2_home_plus , rm2_home_plus_gdt , rm2_pro_plus , rm2_pro_plus2 , rm2_pro_plus_bl , rm_mini_shate , sp1 , sp2 , honeywell_sp2 , sp3 , spmini2 , spminiplus or mp1 . SC1 devices can be registered as `sp2

Yes itā€™s the mini, sorry for the confusion. I always forget the mini bitā€¦ About $19US from Banggood or Aliexpress. Steill plenty for sale even though you canā€™t by them direct from Broadlink.

This is my config for a RM Mini 3 in HASS:

  - platform: broadlink
    host: 192.168.0.136
    mac: '34:ea:34:e3:ad:52'
    type: rm_mini
    friendly_name: "Kitchen IR"

And then the SmartIR config:

  - platform: smartir
    name: Hall AC
    device_code: 1281
    controller_data: 192.168.0.136
    temperature_sensor: sensor.bedroom_temperature
    humidity_sensor: sensor.bedroom_humidity

Perfect, thanks! I grabbed a couple from AliExpress, $14 each, should be here in Thailand by Tuesday.

Iā€™ve got 6 rm minis around my house all using smartir

Iā€™ve tried to add more but I think they may have a newer firmware version on them.
HA canā€™t control them.
The broadlink econtrol app sees them as unknown device
Inc app works.

Anyone know of a way to downgrade?

any help appreciated SmartIR - Control your Climate, TV and Fan devices via IR/RF controllers