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


#144

Hello,

I would like to request some support, hope is the correct place.
I was assuming that the smartir/climate component would automatically attempt to reach the target temperature based on the current temperature. So I mocked a temperature sensor to play around before getting a real one. Here is my configuration:

#Sensor
- platform: template
  sensors:
    living_temperature:
      friendly_name: "Living Temperature"
      value_template: "{{10}}"
      unit_of_measurement: "°C"

#SmartIR Climte
- platform: smartir
  name: livingSamsung
  device_code: 1400
  controller_send_service: switch.broadlink_send_packet...
  temperature_sensor: sensor.living_temperature

Manual setting works fine, but I am not seeing any automatic change of the aircon based on the current temperature. See here for example: (The cooling and auto change were manually set)

Even though the temperature is way off, it keeps cooling with same settings.

Thanks for the support.


#145

I think you misunderstand what this does. It is sending IR codes to change the temperature, mode and fan speed on the air-conditioner.

The smarts for adjusting the mode, when the unit is running, and it’s fan speed is entirely done by the a/c.

The input temperature is just there to provide feedback within the climate component for visual display. It does not drive any behavior changes to the a/c.


#147

Got it. I understand that this would work in theory, but in practice, the built in temperature sensor of this machines do not perform as expected. Nevertheless, looking at the code of the generic thermostat under the climate components, I see it tracks and reacts based on the current temperature vs target temperature. I will implement a similar behaviour on a fork. After some tests I will create a PR and the author may accept it or not.

Thank you for the response.


#148

Dear, in old version,
A guy named thubderbird2086 provided customised component for climate, in which I was controlling swing also with his component.
@Vassilis can u please add that customisation to your component.


#149

Mine has the same issue, they put the temperature sensor in the vent instead of the house. On a really hot day with heavy radiant heat, the unit will run too much and cool way too much. 26C set temp will result in 21C room temp. I have created an automation to dynamically adjust the temperature to account for this.

- id: adjust_cooling_temp
  alias: 'Climate - Adjust Cooling Temperature'
  trigger:
    - platform: time_pattern
      minutes: '/15'
      seconds: 00
  condition:
    - condition: state
      entity_id: group.people_status
      state: 'home'
    - condition: state
      entity_id: input_boolean.aircon_prevent_adjustment
      state: 'on'
    - condition: template
      value_template:  >
        {% if (states.climate.airconditioner.attributes["operation_mode"] == 'cool') %}
          true
        {% else %}
          false
        {% endif %}
    - condition: template
      value_template: '{{ not ((states.sensor.living_room_temperature_f.state | float >= (states.input_number.climate_auto_cool.state | float - 1.2)) and (states.sensor.living_room_temperature_f.state | float <= (states.input_number.climate_auto_cool.state | float + 0.3))) }}'
    - condition: template
      value_template: '{{ ((as_timestamp(now()) - as_timestamp(states.climate.airconditioner.last_changed) | default(0)) | int) > 1800 }}'
  action:
    - service_template: >
        {% if (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_cool.state | float - 1.2)) and (states.climate.airconditioner.attributes.temperature | int <= 29) %}
          climate.set_temperature
        {% elif (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_cool.state | float + 0.3)) and (states.climate.airconditioner.attributes.temperature | int >= 19) %}
          climate.set_temperature
        {% else %}
          script.do_nothing
        {% endif %}
      data_template:
        entity_id: climate.airconditioner
        temperature: >
            {% if (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_cool.state | float - 1.2)) and (states.climate.airconditioner.attributes.temperature | int <= 29) %}
              {{ states.climate.airconditioner.attributes.temperature | int + 1 }}
            {% elif (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_cool.state | float + 0.3)) and (states.climate.airconditioner.attributes.temperature | int >= 19) %}
              {{ states.climate.airconditioner.attributes.temperature | int - 1 }}
            {% else %}
              {{ states.climate.airconditioner.attributes.temperature | int }}
            {% endif %}
        operation_mode: 'cool'

- id: adjust_heating_temp
  alias: 'Climate - Adjust Heating Temperature'
  trigger:
    - platform: time_pattern
      minutes: '/15'
      seconds: 00
  condition:
    - condition: state
      entity_id: group.people_status
      state: 'home'
    - condition: state
      entity_id: input_boolean.aircon_prevent_adjustment
      state: 'on'
    - condition: template
      value_template:  >
        {% if (states.climate.airconditioner.attributes["operation_mode"] == 'heat') %}
          true
        {% else %}
          false
        {% endif %}
    - condition: template
      value_template: '{{ not ((states.sensor.living_room_temperature_f.state | float >= (states.input_number.climate_auto_heat.state | float - 0.5)) and (states.sensor.living_room_temperature_f.state | float <= (states.input_number.climate_auto_heat.state | float + 1.0))) }}'
    - condition: template
      value_template: '{{ ((as_timestamp(now()) - as_timestamp(states.climate.airconditioner.last_changed) | default(0)) | int) > 1800 }}'
  action:
    - service_template: >
        {% if (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_heat.state | float - 0.5)) and (states.climate.airconditioner.attributes.temperature | int <= 29) %}
          climate.set_temperature
        {% elif (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_heat.state | float + 1.0)) and (states.climate.airconditioner.attributes.temperature | int >= 19) %}
          climate.set_temperature
        {% else %}
          script.do_nothing
        {% endif %}
      data_template:
        entity_id: climate.airconditioner
        temperature: >
            {% if (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_heat.state | float - 0.5)) and (states.climate.airconditioner.attributes.temperature | int <= 29) %}
              {{ states.climate.airconditioner.attributes.temperature | int + 1 }}
            {% elif (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_heat.state | float + 1.0)) and (states.climate.airconditioner.attributes.temperature | int >= 19) %}
              {{ states.climate.airconditioner.attributes.temperature | int - 1 }}
            {% else %}
              {{ states.climate.airconditioner.attributes.temperature | int }}
            {% endif %}
        operation_mode: 'heat'

This basically checks every 15 minutes, where the temperature is >1C above an input_number or 0.5C below it. It wont run unless the aircon has been on for 1/2 hour first to give it time to get the temperature down.


#150

Automation is the proper way to do this. But you lose the power efficiency if your unit is an inverter.


#151

Mine’s ancient and terribly inefficient, and it’s rental so can’t do anything about the terrible placement of the sensor either :frowning:

Using the automation is the best I can manage.


#152

I just migrated mine to this SmartIR and im using the fan device only. I created my own device_code json file and added the IR codes into it. At first the file named without .json as stated in documentation but however its failed as it could found my device_code in Github. After rename the file with .json, then everythings works.


#153

I own 4 devices … I already got a custom climate component for this:

https://gitea.ddns.net/thundergreen/Xiaomi-remote-climate

But now I want a Media Player.


#154

Is the xiaomi ir blaster currently supported in this? My broadlink rm broke and was wondering if my old xiaomi ir blaster works with this


#155

the problem with me is: we turnoff our tv by remove and it still connect to wifi so that when I tried to ping it. it’s always said the state is ‘on’


#156

Can you tell me where I can get the full code of the devices please? I follow to install your smartir and it’s works fine but with fan. I only have 2 option fancode : 1000 and 1020 but 2 of this code it not suitable with my fan.


#157

Hello. I have a floor fan with remote like this:

I already intergrated the smartir to my HA but I didn’t find a best option to my fan in smartir’s fan code. (already tried 1000 and 1020).
my remote only have 5 button and I already make a json file for 5 buttons here

[
  {
    "ID": "9d23e2dc-0dd9-4ffd-835d-c0d279dbce56",
    "Key": "onoff",
    "Name": "On/Off",
    "Code": "260086006F350E280C290F0C0C0E0D0E0E290B0E0D0E0F270C290F0C0C290E0D0F0C0C290F260D0E0D2A0B290E0C0D290C0E0F0C0C0F0C0E0E0D0F270C0E0F0C0C0F0C290F0C0C0E0D0E0E0D0F0C0C0E0D0E0F0C0C290D290B0F0C0E0E280C0E0D0E0F0C0C290E280C0E0C0E0F0C0C0F0C0E0D0E0F0C0C0E0D0E0E0D0F0C0C290F0B0D0E0C290F000D050000",
    "Base64": "JgCGAG81DigMKQ8MDA4NDg4pCw4NDg8nDCkPDAwpDg0PDAwpDyYNDg0qCykODA0pDA4PDAwPDA4ODQ8nDA4PDAwPDCkPDAwODQ4ODQ8MDA4NDg8MDCkNKQsPDA4OKAwODQ4PDAwpDigMDgwODwwMDwwODQ4PDAwODQ4ODQ8MDCkPCw0ODCkPAA0FAAA="
  },
  {
    "ID": "5a63c2ab-7046-4815-a4e1-eb43d8628900",
    "Key": "speed",
    "Name": "Speed",
    "Code": "260086006F3310250F270F0C0E0C0F0C0F270E0C0F0B10260E270F0C0E270F0C0E0D0E270F260F0B10260F260F0C0F260F0C0F0C0E0C0F0C0F0B0F270F0B100B0F0C0E270F0C0E0C0F0C0F0C0E0D0E0C0F0C0F0B0F270F260F0B0F0C0F260F0C0F0C0F0C0E270F0B0F270F0B100B0F0C0E0C0F0C0F0C0E0C0F0C0F0C0E0D0E0C0F270E0C0F260F000D050000",
    "Base64": "JgCGAG8zECUPJw8MDgwPDA8nDgwPCxAmDicPDA4nDwwODQ4nDyYPCxAmDyYPDA8mDwwPDA4MDwwPCw8nDwsQCw8MDicPDA4MDwwPDA4NDgwPDA8LDycPJg8LDwwPJg8MDwwPDA4nDwsPJw8LEAsPDA4MDwwPDA4MDwwPDA4NDgwPJw4MDyYPAA0FAAA="
  },
  {
    "ID": "8ae3a21b-4c26-4067-aa28-ae1c9b845235",
    "Key": "timer",
    "Name": "timer",
    "Code": "260086006F330F260F270E0C0F0C0F0C0F260F0B100C0D2710260D0E0F260E0C0F0D0E260E27100B0F270F260E0C0E27100B0E0D0F0C0F0B0E0D0E27100A0F0D0E0D0E260E0D0F0B100B0E0D0E0D0F0B100A0F0D0E270F260F0B100B0E270F0C0F0B0F0D0E270E0C0E0D0F260E0D0F0C0F0B0F0C0E0D0E0D0E0B0E0D0D0F0E0B100B0E2710260E000D050000",
    "Base64": "JgCGAG8zDyYPJw4MDwwPDA8mDwsQDA0nECYNDg8mDgwPDQ4mDicQCw8nDyYODA4nEAsODQ8MDwsODQ4nEAoPDQ4NDiYODQ8LEAsODQ4NDwsQCg8NDicPJg8LEAsOJw8MDwsPDQ4nDgwODQ8mDg0PDA8LDwwODQ4NDgsODQ0PDgsQCw4nECYOAA0FAAA="
  },
  {
    "ID": "6fc0cb01-4e39-44dd-8050-bfda1353976b",
    "Key": "swing",
    "Name": "swing",
    "Code": "260086006D350F260E280F0B0E0D0E0C10260D0D0E0D0F260E280F0C0E270F0B0F0D0D270F270E0C10260E270F0C0C290F0C0F0B0E0D0E0C100B0E280E0C0F0C0D0E0E270F0C0D0D0F0C0F0C0E0D0D0D0F0B100B0E2710260E0C0F0C0F260F0C0F0C0F0C0D280F270E26100B0E0D0E0C100B0F0C0D0D0E0D0F0C0E0D0E0C0F270D280F0B0F270E000D050000",
    "Base64": "JgCGAG01DyYOKA8LDg0ODBAmDQ0ODQ8mDigPDA4nDwsPDQ0nDycODBAmDicPDAwpDwwPCw4NDgwQCw4oDgwPDA0ODicPDA0NDwwPDA4NDQ0PCxALDicQJg4MDwwPJg8MDwwPDA0oDycOJhALDg0ODBALDwwNDQ4NDwwODQ4MDycNKA8LDycOAA0FAAA="
  },
  {
    "ID": "a4dbd067-03ef-40c9-a37b-467e0990249e",
    "Key": "rhythm",
    "Name": "rhythm",
    "Code": "260086006E330C290F270C0F0E0C0F0C0D290E0C0F0C0C2910250C0F0E270C0F0C0E0F270C290F0C0D290D270C0F0C290E0D0C0F0D0D0E0D0D0E0C290E0D0C0F0D0D0E270C0F0D0D0E0D0C0F0C0E0E0D0E0D0C0F0D280D290D0D0E0D0C290D0D0E0D0C0F0D280C2A0D0D0E280D0D0E0D0C0F0C0E0D0E0D0D0C0F0C0E0E0D0E280D0D0E280C290E000D050000",
    "Base64": "JgCGAG4zDCkPJwwPDgwPDA0pDgwPDAwpECUMDw4nDA8MDg8nDCkPDA0pDScMDwwpDg0MDw0NDg0NDgwpDg0MDw0NDicMDw0NDg0MDwwODg0ODQwPDSgNKQ0NDg0MKQ0NDg0MDw0oDCoNDQ4oDQ0ODQwPDA4NDg0NDA8MDg4NDigNDQ4oDCkOAA0FAAA="
  }
]

can any one help me to create a smartir json file to work with my fan please?


#158

Hi,

I would like to have this round icon with five small icons on the bottom just like yours.

Mind to share your content of this in climate.yaml?

Thanks.


#159

I’m not sure how you can set the timer, swing and rhythm. You may need to add these as a switch component. Also, if you push the speed button, does that switch the fan on?


#160

That is just a thermostat card in lovelace.


#161

Thanks for the info!


#162

Maybe I am doing something stupid but i converted the ini to json (to my best ability which doesnt say much) https://github.com/Vasiley/Home-Assistant-Main/blob/master/broadlink_climate_codes/lasko_heater.ini
but it does not work


#163

should say convertor tool failed to load …kept saying to remove comments


#164

Hi, I hope you can help me … I installed smartir without problems, and I use it to control a TV … through google home I can easily turn it on and off with the voice … if instead I also wanted to change channels always with google home, how should I do since google only sees it as a switch? Thanks in advance