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

For one of my friends I did following:
using Mi door and window sensor
sensors
Use horizontal swing.
Use binary sensor as power sensor, example:

  - platform: smartir
    name: Bedroom AC
    unique_id: bedroom_ac
    device_code: 1801
    controller_data: remote.broadlink_bedroom
    temperature_sensor: sensor.0x60b647fffe2e3496_temperature
    humidity_sensor: sensor.0x60b647fffe2e3496_humidity
    power_sensor: binary_sensor.bedroom_ac_contact
1 Like

I was hoping for a cleaner solution, but I used a door sensor like so to detect if the AC was turned on using the remote control. It doesn’t give me an exact mode, but it tells me it is on.

Oh, I didn’t realised the post above me posted. oops.

If you want it more hidden you could always crack open the sensor and wire in a reed switch via wires to where the standard one is (or use the existing one if you can de-solder it and remove it easy enough), then put the reed switch in a similar spot to where you have it and run the wires into the A/C to hide the rest of the device.

Hmmm. You got me thinking. I just opened the cover and there is some clearance. If I can fit the whole sensor with the sensor cased removed, I don’t need to solder any wires. All I will have exposed is the magnet.

This sensor is from another project, but exact same sensor used. Without the battery and battery case, I am sure it will fit behind the ac cover just be looking. With the battery, it is iffy.

I have tried different approaches over time to sense the actual state of AC units but at the end the most reliable is to use a power sensor device.

Although not perfect I did work around the issue by putting one of these power monitoring devices inline and thus invisible from the outside to each AC unit’s circuit to measure the electricity usage to draw conclusions from in what state the ACs are actually running.

Additionally I put temperature and humidity sensors in the rooms and configured HA’s Trend Sensor to narrow the actual AC states even further down.

Since for i.e. our kids tend to set the AC units in their rooms to super cool using the remotes I simply override their manual settings using automations to adjust HVAC and fan modes to predefined settings I want the AC units to run depending on weather and time of the day.

All of the above needs some fiddling at the beginning and a couple of different automations for each AC unit. But once correctly configured it is working quite reliable for years now and I have never got any complaints from family members nor guests regarding any room climate situation.

What is the best option to write configuration for ESPHome?
Seems reading all IR raw data and writing to need json takes ages :slight_smile:

Dumb question I know but


I’m trying to get the current ambient temp from my heating zigbee based thermostat.

I see it in home assistant but it’s in an attribute within the climate.termostato_salon_termostato device


How do I reference to it in the configuration.yaml file?

Thanks guys!

Dumb answer: use template sensor

1 Like

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