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

Hello everyone.

I’ve created a project for reading and generating the codes for the MQTT source.

It’s similar to the BroadlinkIRTools.

Here is the source code GitHub - EduardoHerreraM/SmartIR-Zigbee-Tools.

Feel free to ask me any question (use the Issues Github pannel for any problem).

Thanks!

1 Like

Hello everyone.

this is my configuration.yaml :

smartir:
climate:
  - platform: smartir
    name: Salon AC
    unique_id: salon_ac
    device_code: 1124
    controller_data: remote.broadlink_rm3_remote
    temperature_sensor: sensor.salon_temperatura_temperature
    humidity_sensor: sensor.salon_temperatura_humidity

I see an attribute in my climate_salon_ac entity that is target_temp_step: 1

Is there a way to set the target step temperature to 0.5

I tried:

  target_temp_step: 0.5

but I get an error message in the verify configuration step: ‘target_temp_step’ is an invalid option

Can I use a json file meant for Broadlink with esphome (esp8266) IR transmitter?
I found that SmartIR has codes for my Mitsubishi heavy AC but I see the file mentioning Broadlink

is this integration, when using broadlink, simply using broadlink to learn and send commands? I need an alternative to broadlink integration for learning and sending commands, or a way to grab commands from the broadlink app.

Hello, folks.

I am having issues with making this integration work with my Air Conditioner. I have a JSON file with all the commands but the only one that works fine using the Thermostat card is the “off”. The rest only works if I use the “send command” throughout my broadlink remote. This is how I setup the things:

- platform: smartir
  name: Ar Escritório
  unique_id: ar_escritorio
  device_code: 3000
  controller_data: remote.rm4c_escritorio
  temperature_sensor: sensor.termometro_escritorio_temperature
  humidity_sensor: sensor.termometro_escritorio_humidity

The JSON file I am using is this one: SmartIR/codes/climate/3000.json at master · smartHomeHub/SmartIR (github.com)

Again, if I manually send the same commands using the send command service under the developer tools it works perfectly fine. If I tried to execute the commands using the thermostat in HA, then it doesn’t (apart from the ‘off’ command).

I appreciate your help.

Marcelo

Welcome to the forum, Marcelo :wave:t3:

If this is the first (or only) smartir device make sure within configuration.yaml it looks like:

  smartir:
  climate:
    - platform: smartir
      name: Ar Escritório
      unique_id: ar_escritorio
      device_code: 3000
      controller_data: remote.rm4c_escritorio
      temperature_sensor: sensor.termometro_escritorio_temperature
      humidity_sensor: sensor.termometro_escritorio_humidity

I have been using the SmartIR for quite some time for controlling air conditioners but without temperature_sensor, power_sensor and humidity_sensor.

Do they have internal functionality within the addon or are they just infomational?

Apologies in advance for my n00bness.

I’ve used HACS to add SmartIR as a custom repository to my Home Assistant installation. I can see the code files in the custom_components directory, but not the other SmartIR directories (Codes, Docs, and other files/folders at the root level). Do I have to add those manually? If so, where in the file hierarchy? I’m using the File Editor add-on to view the contents of the HA directory if that matters.

Placed files and directories at the root of the smartir directory and things seem to be working.

I have a Tuya IR AC Controller, using TuyaLocal integration I can now learn and send IR codes and that works.

I’m trying to use SmartIR with the controller, I’m building a device json file BUT I can’t seem to get things to work.

The only way I can send IR codes is by checking the Device ID and using 202 (which I found as the send command code in Tuya Developer platform).

How can I proceed (sorry new to all this)?

Hello,

I am also facing difficulties setting this to work. I have a few remotes I bought from ali express and I cannot find a matching device code for smarir.
Has anyone succeeded with such devices?
I have them added in tuya iot platform, but they are not showing in HA.

Hi,

" SmartIR is not working for me with ESPHome + remote_transmitter"

I’d like to use esphome with smartir to control an air condition device but for some reason it does not work.

Background:
(1) I have managed to use smartir with broadlink RM pro, so I can control the AC without any problem.Here is my configuration.yaml file for that. This step is to make sure that I use the smartir the correct way and I use the correct device code

smartir:
  check_updates: false
climate:
# AC type - FTXV35AV1B 
  - platform: smartir
    name: Living AC
    unique_id: living_ac
    device_code: 1113
    controller_data: remote.broadlink_rm_pro_1

(2) But I wanted to get rid of the broadlink device so then I bought an ESP8266 and an infra transmitter (https://www.aliexpress.com/item/1005004005620672.html) and - as a first step - I managed to control my Samsung TV device with this esp2.yaml config. This step is to make sure that my IR transmission is ok. The led on the IR transmitter device is blinking when I send the power command and my Samsung TV switches on.

remote_transmitter:
  pin: GPIO13
  carrier_duty_percent: 50%
  id: ir_transmitter
  
switch:
  - platform: template
    name: Samsung Power Button
    turn_on_action:
      - remote_transmitter.transmit_samsung:
          data: 0xE0E040BF
          nbits: 32

(3) I tried to control my AC device with smartir and esphome but it doesn’t work, the LED on the IR transmitter is not blinking and the AC device doesn’t do anything when I send the command. I used the Example (using ESPHome) section from https://github.com/smartHomeHub/SmartIR/blob/master/docs/CLIMATE.md.

here is my configuration.yaml:

  smartir:
  check_updates: false
climate:
# AC type - FTXV35AV1B 
  - platform: smartir
    name: Office AC
    unique_id: office_ac
    device_code: 1113
    controller_data: esp2_send_raw_command
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity
    power_sensor: binary_sensor.ac_power

Here is my esp2.yaml:

esphome:
  name: esp2
  friendly_name: esp2
 
api:
  services:
    - service: send_raw_command
      variables:
        command: int[]
      then:
        - remote_transmitter.transmit_raw:
            code: !lambda 'return command;'  
  encryption:
    key: "there is a key here"
    

    
remote_transmitter:
  pin: GPIO13
  carrier_duty_percent: 50%

Device code you are using is in Broadlink format. It needs to be in RAW format. Only few codes are, for example take a look how code number 7062 looks. You should have similar code file for your AC.

Thanks for your answer! Here is an extract from my /homeassistant/custom_components/smartir/codes/climate/1113.json file. Do I have to create a new json file with the same name and replace this? How should that file look like, is there an example? Or should I use the IR Remote Climate — ESPHome instead? But if yes, then what is the point of the smartir-esphome integration? I’m lost…

BTW: I have already tried the IR Remote Climate — ESPHome but it didn’t work.


{
  "manufacturer": "Daikin",
  "supportedModels": [
    "FTXV35AV1B"
  ],
  "supportedController": "Broadlink",
  "commandsEncoding": "Base64",
  "minTemperature": 16.0,
  "maxTemperature": 30.0,
  "precision": 1.0,
  "operationModes": [
    "heat",
    "cool"
  ],
  "fanModes": [
    "low",
    "mid",
    "high",
    "auto",
    "turbo"
  ],
  "commands": {
    "off": "JgCSAAABJ5MWNhUSFRMVEhU0GDYVNhUTFRIVExU2FRMVEhUSFhIVEhYSFRIVExUSFTcVNhUTFRIVEhYSFRIWEhU2FRMWNRUTFRIVNhYSFQACkBY1FhIVEhUTFRIVExUSFRMVEhUTFRIVEhYSFTYWEhUSFRMVEhUTFRIVExUSFRMVEhUSFhIVEhYSFTYVExUSFhIVAA0FAAAAAAAA",
    "heat": {
      "low": {
        "16": "JgCSAAABJ5QUFBMTFTYWNxQ3FREWNhYSFhEVExUSFBQVEhUTFRIWEhQTFRUUERUTEhUUOBQTExUVEhQTFRMUExU3FBMUNxYSFBMXNBUUFAACkBU2FRMWERUUFRIUEhUTFxEUExUTFBQUEhUUFTUVExQUFhEVFBMTFBQUExQUFRIVExURFRMVEhcQFRQUExgQFDUXAA0FAAAAAAAA",
        "17": "JgCSAAABKJIVExUSFTcVNhU2FhIWNRUTFTYWEhUSFhIWERUSFhIWERYSFhEWEhUSFhIVNhUTFhEVEhYSFhEWEhU2FRMVNhUTFRIVNxYRFQACkBU2FhIVEhYSFhEVExUSFhIVEhUTFRIVEhYSFTYWEhUSFhIVEhUTFRIVExUSFhIWERUSFhIVEhYSFTYVExYRFTcVAA0FAAAAAAAA",
        "18": "JgCSAAABKJIWERcRFjUWNhU2FhIVNhYRFhIVNhcRFhEVExYRFRMVEhUTFRIVExYRFhEWNhYRFhIVEhYSFRIVExY0FhMWNRYRFhIWNRUTFQACkBY1FhIVEhYSFRIWERcRFRIWEhUSFRMWERUTFjUVExYRFhIWERYRFhIVEhYSFRIWEhYRFRMWERYSFRIVNhYSFjUWAA0FAAAAAAAA",

What do you mean?

File format like this:

You can use irgen to convert Broadlink codes to RAW. But you have to do that manually and edit a new code file with the ESPHome header changes (like in the example) and add your raw code lines. Maybe there is an easier way? I did do that for my Samsung AC and it works fine.

Thanks. I see the difference.

1113.json

    "supportedController": "Broadlink",
    "commandsEncoding": "Base64",

—>

7062.json

    "supportedController": "ESPHome",
    "commandsEncoding": "Raw",

and the codes of course are numbers instead of the characters. Is there a way to convert the https://github.com/smartHomeHub/SmartIR/blob/e66a9342334dd9ee0ce2518b05533d638f24d249/codes/climate/1113.json base64 format to the ESPHome raw format or do I have to record these values with an infra receiver?

You can convert them with irgen, already posted link for it. You need Python to run it. I used this format to convert, replace BROADLINKCODE with the actual base64 code for your device. And do that for each line…

python3 -m irgen -i broadlink_base64 -d BROADLINKCODE -o raw > raw_code.txt

Thank you, I’ll try this.