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

I have it set up with the RM Mini 4, very easy installation, as long as you don’t connect the RM to the Broadlink cloud during initial setup. Just fill in the WiFi details and after those are uploaded to the RM, force close the Broadlink app.

Give it a fixed IP and add it as a switch to HA:

- platform: broadlink
  host: 192.168.*.*
  mac: 'AA:DD:AA:FF:69:DD'
  type: rm4c_mini

Afterwards just follow the smartIR setup instructions.

Hello guys.

So I’ve followed the guide. Installed SmartIR through HACS and created my own json with the AC codes because my AC it’s not on the list. What is the device code I use now? Can I use any?

Thank you.

Climate working fine in Smartir, but fan intigration give a error.

Log Details (ERROR)
Logger: homeassistant.components.fan
Source: custom_components/smartir/fan.py:92 
Integration: Fan (documentation, issues) 
First occurred: 6:42:36 PM (1 occurrences) 
Last logged: 6:42:36 PM

Error while setting up smartir platform for fan
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/config/custom_components/smartir/fan.py", line 76, in async_setup_platform
    hass, config, device_data
  File "/config/custom_components/smartir/fan.py", line 92, in __init__
    self._speed_list = [SPEED_OFF] + device_data['speed']
KeyError: 'speed'

Yep, just make something up which isn’t already in use in the repo

The error is in the json file. Open an issue in GitHub by attaching the file.

I’m getting this error:


image

I have the json file in this location:

This is my configuration.yaml:

smartir:

climate:
  - platform: smartir
    name: Sala AC
    unique_id: sala_ac
    device_code: 2332
    controller_data: 192.168.1.147
    temperature_sensor: sensor.temperatura_sala

switch:
-   platform: broadlink
    host: 192.168.1.147
    mac: '78:0F:77:5A:B3:DE'

What am I doing wrong here?

Thank you.

Rename the json to 2332.json

Thanks.

Now i’m getting this error:

Log Details (ERROR)
Logger: custom_components.smartir.climate
Source: core.py:1218
Integration: SmartIR (documentation)
First occurred: 10:53:17 PM (6 occurrences)
Last logged: 10:54:00 PM

Unable to find service broadlink/send
Traceback (most recent call last):
  File "/config/custom_components/smartir/climate.py", line 338, in send_command
    self._commands[operation_mode][fan_mode][target_temperature])
  File "/config/custom_components/smartir/controller.py", line 93, in send
    'broadlink', 'send', service_data)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1218, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service broadlink/send

I’ve checked the IP address and it’s correct.

Broadlink is misconfigured, for sure.

What can I do in this case, should I reinstall the component?

Hi,
Thank you for this integration, it works very well with my rm4c_mini and my Hitachi RAK-25NH6A AC using 1082.json file (even if it wasn’t listed as a supported device)

However, I was wondering if it is possible to add a sleep functionality, like I have on my remote.
I am able to “learn” the codes using the broadlink integration, but i’m not sure if smartir is designed to have a sleep function.

For the moment I am using scripts and I call directly broadlink.send service, but I was wondering if there were a better way.
Thank you

Is there any tool out there to convert my old ini files into the new json type?

You gotta use IHC to setup the device, this is where i went wrong initially, that and specifying what model of RM it was.

@Vassilis, I started having issues with media players controlled by SmartIr, the climate component works fine. But every time I issue a command to a media player device I started getting these:

 2020-07-04 18:27:09 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall broadlink.send (c:67aaabda19ba483b9404cf075417f278): host=192.168.1.232, packet=[b'&\x00f\x00t8\x10\x0c\x10)\x10\x0c\x11\x0c\x10\x0c\x10\r\x10\x0c\x10\r\x10\x0c\x10\r\x10\x0c\x10\r\x10\x0c\x10)\x10\x0c\x10\r\x10\x0c\x10\r\x10\x0c\x10\r\x10\x0c\x10\x0c\x10\r\x10)\x10\x0c\x10\r\x10\x0c\x10\r\x10\x0c\x10\r\x0f\r\x10\x0c\x10)\x10\r\x10)\x10)\x10(\x10)\x10\r\x10\x0c\x10)\x10\r\x10)\x10(\x10)\x10)\x10\r\x10)\x10\x00\r\x05\x00\x00']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1276, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 115, in async_send_packet
    device = hass.data[DOMAIN][call.data[CONF_HOST]]
KeyError: '192.168.1.232'

Any idea what’s happening here? Thanks!!!

PS This is my config for this particular entity:

- platform: smartir
    name: living room tv
    unique_id: livingroom_tv
    device_code: 1001
    controller_data: 192.168.1.232

EDIT: Solved. Forgot again that unless I create a switch on the broadlink platform the smartir entities don’t work.

1 Like

Hi Vassilis,

I added oscillate to my json but then How can I use it in HA?

Looking at the fan created I can only manage fan speed. Do I have to create a separate template switch based on the fan attributes?

Hi @Vassilis, any chance to add support for Galanz ac unit? Greetings from Cyprus.

Actually I found that 1860 json file for Simbio AC also works on Galanz, you could go ahead and add it in the manufacturer’s list. Great work!

1 Like

Hi, smartir github is not working right now, is there another link where I can download this ?

I’m running home assistant 0.109.6 on HASSIO 3.13 (Pi 4).
I’m trying to control my AC with a broadlink RM Pro.

I have the following in my configuration:

smartir:

switch:
  - platform: broadlink
    host: 192.168.1.xyz
    mac: 'b4:43:0d:aa:9d:08'
    
climate:
  - platform: smartir
    name: Office AC
    unique_id: office_ac
    device_code: 1502
    controller_data: 192.168.1.xyz

I edited the file 1501.json replacing just the Base64 codes with custom ones and saved the file as 1502 (no extension) in smartir/codes/climate directory.

My custom_components directory is shown below:

image

When checking the config I get the following error:
image

I thank you in advance for the assistance you can provide

Thank you @Vassilis for this incredible work. I found SmartIR by coincident. I have been using HASS for a year and never heard of it, definitely it should have more exposure through main HASS (like in official add-ons).

I was just planning how to integrate few devices in HASS and it took me under 2 hours to integrate, Gree AC and Samsung TV. I still have a fan and heater fan to add later.

here are couple of ideas that I wish SmartIR has. they are meant as feedback

  1. In my setup, I have alexa talk to devices directly through skills. it is my redundancy strategy. so IR signals can be sent by broadlink or remotes and HASS is not aware of them.
    In an ideal scenario, HASS have it is own dedicated IR receiver (on GPIO or through ESPHome, tasmota…etc.) and when it receives a signal it get processed by SmartIR to update the status of the devices in HASS so it is almost always in Sync with the real status of the device. Currently, I am planning to this manually through ESPHome

  2. Power usage monitors becoming more and more common, I wish the power on sensor to be more flexible, to accept numbers coming from energy monitors and thus avoid the need to create a binary sensor to convert the power usage sensor.

  3. Climate device to have full support (I saw many people wishing for that) including

  4. Possibility of adding other types devices like vacuum cleaners

Finally another gigantic thank you for the amazing work