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

And a more elaborate answer for a non developer? :sweat_smile:

This is not even close to the developer level question. This is HomeAssistant user level question. So if you would like to use it, you shall be able to search for information and read HA documentation. Believe me, it will help you tremendously to start doing it, instead of asking for someone to solve your issues. So do not be lazy and start here: Template - Home Assistant

1 Like

You format posted in your original post is completely wrong/invalid. Please reffer to documentation: SmartIR/docs/CODES_SYNTAX.md at 803ef2737331689d15aa0e34047081a06c075a4e · litinoveweedle/SmartIR · GitHub

I am sorry, but if you are not able to understand it, or at lest point to exactly what do you not understand, than HA and SmartIR are probably not for you - as it requires technical knowledge by design.

Hello everyone!

First post ever in the HA forums :+1:
Been a user for a long time of the SmartIR with BroadLink to control my AC units.
I only use the HomeKit integration to interact but I cannot use it to set the fan speed. Anyone knows if this is possible to set the Fan speeds through HomeKit integration since it is possible directly from the home assistant UI?

Thanks in advance!!

I managed to make it work in the end thank you :slight_smile:
Learning the remote was a pain.

I have a unit that doesn’t seem to work with available codes. It’s a Samsung AR13MRFTGWKN. So I understand I will have to capture commands and make a new file. The question I have is how do I go from captured commands to the json file? Is there a step by step process describing it somewhere that I’ve not yet found, it seems reasonably complex as the buttons no doubt send different commands depending on the state of the ‘digital twin’.

It’s a long process, not a hard one.

Once you do the above, point the remote at the IR blaster (in my case a Broadlink RM3 mini) and press a button.

You will then get a ‘persistent notification’ in HA with the Raw IR code. Copy and paste this elsewhere with a note to which button / setting it was for.

Repeat this process for all buttons / modes etc.

Create the JSON from the copied codes.

Like I said initially, not hard, but painfully long.

1 Like

Is any one having problems when configuring a new Broadlink media player?
I think I follow all the steps correctly. A new media_player entity is created but is in uknown state:

Here is my YAML code:

media_player:
  - platform: smartir
    name: Samsung TV Broadlink
    unique_id: samsung_tv_broadlink
    device_code: 1060
    controller_data:
      controller_type: Broadlink
      remote_entity: remote.rm3_pro_remote
      delay_secs: 1
      num_repeats: 1
    power_sensor: binary_sensor.samsungtv_broadlink_state_helper

I see no errors in the logs and if I check it in the developer tools:

I also got an AC configured with the same broadlink device and its working fine

My code:

- platform: smartir
  name: TV Suite
  unique_id: tv_suite
  device_code: 1060
  controller_data:
    controller_type: Broadlink
    remote_entity: remote.broadlink_suite
    delay_secs: 0.5
    num_repeats: 1
  power_sensor: binary_sensor.tv_suite

binary_sensor.tv_suite is a ping integration

that is very strange we got same configuration. ( I also tryed to put the delay_secs same as you)
I use a rm3 pro but as I said in the climate integration it works fine.

After some more tests I think there is something wrong happening in the media player creation.

Old media players instances created with this component works fine, problem comes when trying to create new ones.

The media player seems to be created correctly, no error in the debugger the only diference besides the media_player entity created with “unknown” status the new media player has a new attribute called: media_content_type (dont know if this is the cause of the error but the difference is there)

Here is the example of a old media_player instace vs new, created with smartir:

As you can see the code is exactly the same for both devices:
OLD:

  - platform: smartir
    name: Decodificador Movistar
    unique_id: decodificador_movistar
    device_code: 9998
    controller_data:
        controller_type: MQTT
        mqtt_topic: zigbee2mqtt/URC Moes/set
    power_sensor: binary_sensor.movistar_satus_switch_local
    power_sensor_delay: 50
    power_sensor_restore_state: true
    source_names:
      HDMI: Guía
      HDMI 1: Menú
      HDMI 2: Atras

NEW:

  - platform: smartir
    name: Decodificador Movistar Dormitorio
    unique_id: decodificador_movistar_dormitorio
    device_code: 9998
    controller_data:
        controller_type: MQTT
        mqtt_topic: zigbee2mqtt/URC Moes/set
    power_sensor: binary_sensor.movistar_satus_switch_local
    power_sensor_delay: 50
    power_sensor_restore_state: true
    source_names:
      HDMI: Guía
      HDMI 1: Menú
      HDMI 2: Atras    

Can someone try to create a new media_player controller to check if this is scenario is reproducible?

Regards

Hi All

I am struggling to setup the fan platform.

My specific fan has only a single button for both ON and OFF, however i noticed that all the device code only has “off”

Is there a power command i can use instead which can toggle on/off? or do i need to setup as

“ON”: “JgBgAAABKo8SExITEhITEhI2EjcRExMSEjYTNRM1EjcRExMSEzUTNRM1EzYSNhISEzUTEhMSEzUTEhMRExITNhMREzUTNRMSEwAE9wABLEgTAAv8AAEqSBMADAYAASlIEwANBQ==”,
“OFF”: “JgBgAAABKpATExISExISEhM2EzUTEhMREzUUNRM1EzUTEhMSEjYSNhI2EzUTNRMSEjYSEhMSEzUTERMSExETNRMSEzUTNRMSEgAE/QABJkgTAAwGAAElSBMADAYAASZIEgANBQ==”,

1 Like

Something similar happened to me too… did this and now its working… dont know if its the best way or what is happening but you could try this :

in Homeassistant try going to “Developer Tools” >> STATES >> Set State…

there search for the Media_player entity…

the state shows as “unknown”, change it to “off” then “Set State”… then go quickly to the dashboard and turn On/ open that media player (before the X seconds of the power sensor delay)…

after that the media_player seems to be is working…

(smartir 1.18, zigbee2mqtt, zs06 controller)

1 Like

WOW! this trick solve my issues with all my newest media player controllers. (Persistent after restarting)
Working for Broadlink and MQTT configurations
Thank you very much

1 Like

thank you for testing it… dont know how i did it :sweat_smile: tried to reproduce the error several times and that solution worked…

1 Like

Hello.

I just purchased a new Hunter Ceiling Fan with remote and a Broadlink RM4 Pro. I wanted to use SmartIR so that I could use it as an entity, but I am having trouble setting it up.

I used the broadlink integration and learned the 4 button remote codes using developer tools (Fan, Light, Up, Down).

I added the following to my configuration.yaml (but receive this message when I view it in File Editor “duplicated mapping key (98:1)”). The YAML check in developer tools allows it to still restart.

# SmartIR Configuration
smartir:

fan:
 - platform: smartir
   name: Master Bedroom Fan
   unique_id: master_bedroom_ceiling_fan
   device_code: 9000
   controller_data: remote.rm4_pro_master_bedroom

I created a Fan code file “9000.json” and placed it in /custom_components/smartir/codes/fan

{
  "manufacturer": "Hunter",
  "supportedModels": [
    "Unknown"
  ],
  "supportedController": "Broadlink",
  "commandsEncoding": "Base64",
  "speed": [
    "up",
    "down",
  ],
  "commands": {
    "Fan": "sMDeAWibBgAMDQ0NDQwNDQwODA0NDQwNDQ0NDA0NDaYaDRkNGg0MGhoNDBoZDhkMDRoaDRgODRkNGQ0aGQ0MGxkNGQ4MGhkNDRoMGhoNDBoMGg0aDBsMGRoMDRoZDQ0aDRkaDRkNDBsZDQwaDRoZDRoNDBoMGwwZDRo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DBoZDhkNDBoaDQwaDRoZDRoNDBoMGhoNDBoNGQ0ZDhkNGQ4ZDRkaDQ0ZGQ4ZDQ0aGQ0ZDRoMGg0aDRkMGw0MGRkODQADNA4MDQ0NDA0NDQ0MDQ0NDQwNDQ0MDgwNpxkMGw0ZDQwaGgwNGhkNGQ0OGRkNGg0NGQ0aDBoZDgwaGQ0aDQwaGg0MGQ0aGgwNGg0ZDRoNGQ0ZGg0NGRoNDBoNGhkNGQ4MGhkNDRoMGhoNGQwNGg0ZGwwNGQ0aDRkNGQ4ZDRkNGhkNDBsZDRkODBoZDRoNGQwaDRkOGQ4YDgsbGQ0NAAM1DQwNDg0MDQwNDA4NDQwNDA4NDA0NDA2mGwwaDBsMDRkaDQ0ZGQ4ZDQ0ZGg0ZDQ0aDBoMGxkNDBsZDRkODBkZDg0ZDRkaDQ0ZDRoNGQ0aDRkZDQ4ZGQ0NGgwaGg0ZDQwbGQ0MGg0ZGgwbDA0ZDhkZDQ0aDRkNGgwaDBsMGgwaGg0MGhoMGgwNGhkNGQ4ZDRkOGQ0ZDRoNDBoaDQwABdw="
	}
  }
}

I cannot figure out what I am doing wrong. Any help is appreciated.

what can we do about these logs?

Logger: homeassistant.components.climate
Source: components/climate/__init__.py:370
integration: Climate (documentation, issues)
First occurred: 11:26:16 (9 occurrences)
Last logged: 11:26:16

Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please report it to the author of the 'smartir' custom integration
Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please report it to the author of the 'smartir' custom integration
Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, heat, cool, heat_cool, dry, fan_only and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'smartir' custom integration
Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, cool, heat, dry, heat_cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'smartir' custom integration
Logger: homeassistant.components.climate.const
Source: helpers/deprecation.py:197
integration: Climate (documentation, issues)
First occurred: 11:26:13 (9 occurrences)
Last logged: 11:26:13

HVAC_MODE_FAN_ONLY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'smartir' custom integration
HVAC_MODE_AUTO was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'smartir' custom integration
SUPPORT_TARGET_TEMPERATURE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'smartir' custom integration
SUPPORT_FAN_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please report it to the author of the 'smartir' custom integration
SUPPORT_SWING_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please report it to the author of the 'smartir' custom integration

Hi all. Just purchased a couple of Broadcom RM3 minis and none of my devices seem to be supported out of the box. Is there no way of learning via the Broadcom and then converting to the JSON? Or any tools to support doing it more quickly? I saw some posts about broad link manager for learning commands and another website that seemed to suggest it would convert, but unclear to me if they do what I think they do in helping create the JSON?

Thanks

You can try my mantained repo, which shall have all of these sorted a long ago… :wink:

3 Likes

Hello Borat! Do you mean Broadlink RM3? If so you can follow this guide to setup and learn commands on broadlink devices https://www.youtube.com/watch?v=jEOyTGaKwaQ&ab_channel=EverythingSmartHome

1 Like