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

Hmm. I’m not sure then since it sounds like a problem with the in-built control of the Climate entity. Are there any errors in the log at the time at which the Climate entity should have sent the on / off commands as the temperature in the room hit the setpoint?
Perhaps log an issue on the GitHub page for SmartIR.

All good my friend :+1:

Yup! I think that’s where I should go by now! :slight_smile: Thank you very much for your input!

Hello everyone. I want to consult something. I have a Samsung air conditioner but when it broke they changed the plate. The truth is that I don’t know what it is. Is there any way to detect which id corresponds to it or do I have to try one by one until it works? In the event that it does. Is there any way to test a code without having to reboot? Thank you very much

Hi,
I have 2 Mitsubishi A/C units in one large room and I need to use 2 RM4’s with them, how do I get Smartir to send the code to both RM4’s from one card on the dash?
Thanks.
image

Hello,

I have a samsung TV with smarthings implemented in HA and integrated with Alexa, with the integration I can say for example “Alexa tune channel 3 on Samsung” and channel is changed to 3. This integration sometimes works sometimes not, so I will try to use a brodalink integration to do the same.
Smartir media player is working on HA, but in alexa I don’t know how to change to a channel, Commands seems to work well, but I don’t know how to change “source” as my channels are created as Sources with the name “channel x”.
Any help? Thanks for advance

Hello! I need a hint. What codes need to be written to the custom climate file?
First option: The air conditioner is turned off, I write the command to turn it on with the specified setting, for example, cool-low-18.
Second option: The air conditioner is already on, I write the command to go to cool-low-18 mode from cool-low-19 mode by pressing the temperature decrease button.
I have two sets of commands. They are collected according to the first and second options. Both do not work correctly.
The first option: if the air conditioner is turned off, it does not turn on in the specified mode. It just beeps.
Second option. The air conditioner turns on in the set mode, but if you re-set the same mode that is currently running, the air conditioner turns off.
Maybe there is some way to limit the possibility of re-sending the same status that has already been sent to the air conditioner?

Hi I would like to make my own custom json file and then share it. I own a Daikin FTXS35J2V1B, remote ARC452A3, and none of the codes seem to work as well as I would like. I understand quite well how the json file is structured, however I have noticed that the temperature range changes from mode to mode.
Heating 10-30 ° C
Cooling 18-32 ° C
How can I do? do I repeat the codes?
Also I have a powerful mode (all daikin have it) which is not part of fanModes is a powerful mode in its own right.
Thanks if you can give me some advice.

hi there

did anyone managed to get the retain state for smartir fan template after HA reboot?

I tried using input_boolean but no success. Ive tried many ways but the only solution is to get the power sensor.

Plaease assist.

Thank you

Hi,
I have finally pulled the trigger with Broalink RM4 Pro to integrate my 2 Cooper&Hunter ACs into HA.
The initial setup was pretty straightforward - both ACS are controlled with the Broadlink app and HA is supplied with temp/humidity info. But I’m having a hard time with the next step of integration so that HA can control ACs. I’ve been looking for an easy way to avoid manual code learning since in the mobile app I agreed on a generic “option #1” controls for my AC model and it works - currently, I do not need more than power, temp, and fan speed.

So, my question is, is there any way of converting that generic set of instructions into any device_code for SmartIR? and, taking into account the latest updates both in HA and SmartIR, is the flow with declaring smartIR in conf.yaml and using it in a card still valid? (btw, also looking for a good lovelace card recommendation)

UPD: nevermind, device code 1000 with default thermostat card works ok

Hello everyone,

I have a fan controlled by IR. I successfully managed to add to Home Assistant last year.

Few days ago I added a smart plug to add power_sensor but I cannot se the fan on on HA.

In the logs I found this:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 762, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 519, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 352, in state_attributes
    data[ATTR_PERCENTAGE] = self.percentage
  File "/config/custom_components/smartir/fan.py", line 180, in percentage
    return ordered_list_item_to_percentage(self._speed_list, self._speed)
  File "/usr/src/homeassistant/homeassistant/util/percentage.py", line 25, in ordered_list_item_to_percentage
    raise ValueError(f'The item "{item}"" is not in "{ordered_list}"')
ValueError: The item "None"" is not in "['low', 'medium', 'high']"

Below my config:

{
  "manufacturer": "Bimar",
  "supportedModels": [
    "VM43"
  ],
  "supportedController": "Broadlink",
  "commandsEncoding": "Base64",
  "speed": [
    "low",
    "medium",
    "high"
  ],
  "commands": {
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0NKSoNKg0NKQ0pDikNKSoNDSkOAAEPKQ4pDg0pKg0qDA4pDSoNKQ0pKg0NKQ0AARAoDykNDikpDSoNDikNKQwqDSoqDA4pDQABDyoNKg0MKioNKg0NKQ0qDSkMKioNDikNAAEPKg0qDQ0pKg0qDQ0pDCoOKQ0pKg0MKg0AARAqDSkODCoqDSkNDSoMKg0qDSkqDQwqDQANBQAA"
  }
}

any hint? Thank you

Hi

Just discovered that great tool and going to migrate all my IR codes for control and channels presets from ESPHome to that integration. I have a question: I’m able to send straight a channel and it’ll handle automatically the dialing but how to add an Enter/ok at end ? Some devices need it and on most devices it forces the device to immediately switch at new channel dialed !

Thanks

Vincèn

I’m using smartir and it works well for my Rinnai Gas log heater (after some messing around to create a custom IR config file). Trying to work out the best way to turn on a separate switch before sending the IR codes to start the heater. The heater uses 9W in standby mode and was thinking I can set an automation to turn off the power to the heater than it’s been in standby mode for 10 minutes (the fan takes a while to power down after the heater is turned off) and then have the smartir climate entity first turn on the switch before trying to send IR codes.

Any thoughts?

Hi. I’m using Mitsubishi MSZ-SF35VE3 with broadlink rm3 and it works fine. I set up smartIR with existing code (1124). Only thing i’m missing is swing control. Is it posible to add it manually or something? (Im noob)

I came for the same thing :smiley:
I have raw code for swing, I used it to create a button in HA, but would be nice if it could be integrated in SmartIR.

I already use successfully smartir for my AC and for my ceiling fans.
Now, i’m trying to setup my old LG TV.

this is what i have in my configuration.yaml

smartir:
  update_branch: rc

media_player:
  - platform: smartir
    name: LG TV
    unique_id: lg_tv
    device_code: 1040
    controller_data: remote.ur2_bedroom_remote
    power_sensor: binary_sensor.tv_power
    source_names:
      HDMI1: Kodi
      HDMI2: IPTV

and this is a vertical stack configuration, with just 6 buttons (on, off, Kodi, IPTV, Volumeup, Volumedown).

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        entity: media_player.lg_tv
        color_type: card
        color: rgb(255, 0, 0)
        icon: mdi:television-classic
        name: TV Off
        size: 45%
        styles: null
        card:
          - height: 70px
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: 'on'
            device: remote.ur2_bedroom_remote
            entity_id: remote.ur2_bedroom_remote
      - type: custom:button-card
        entity: light.test_light
        color_type: card
        color: rgb(255, 255, 0)
        icon: mdi:kodi
        name: KODI
        size: 45%
        styles: null
        card:
          - height: 70px
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: primo_fan_mid
            device: remote.ur2_bedroom_remote
            entity_id: remote.ur2_bedroom_remote
      - type: custom:button-card
        entity: media_player.lg_tv
        color_type: card
        color: rgb(0, 102, 255)
        icon: mdi:volume-plus
        name: Volume Up
        size: 45%
        styles: null
        card:
          - height: 70px
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: volumeDown
            device: remote.ur2_bedroom_remote
            entity_id: remote.ur2_bedroom_remote
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        entity: media_player.lg_tv
        color_type: card
        color: rgb(255, 0, 0)
        icon: mdi:television-classic-off
        name: TV Off
        size: 45%
        styles: null
        card:
          - height: 70px
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: 'off'
            device: remote.ur2_bedroom_remote
            entity_id: remote.ur2_bedroom_remote
      - type: custom:button-card
        entity: light.test_light
        color_type: card
        color: rgb(255, 3, 255)
        icon: mdi:basketball
        name: IPTV
        size: 45%
        styles: null
        card:
          - height: 70px
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: primo_timer_4h
            device: remote.ur2_bedroom_remote
            entity_id: remote.ur2_bedroom_remote
      - type: custom:button-card
        entity: media_player.lg_tv
        color_type: card
        color: rgb(100, 202, 255)
        icon: mdi:volume-minus
        name: Volume Down
        size: 45%
        styles: null
        card:
          - height: 70px
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: volumeUp
            device: remote.ur2_bedroom_remote
            entity_id: remote.ur2_bedroom_remote

when i press the button, i get this error:

2022-07-28 19:57:47 ERROR (MainThread) [homeassistant.components.broadlink.remote] Failed to call remote.send_command: Command not found: 'on'
2022-07-28 19:57:47 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139675864070752] Command not found: 'on'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 145, in _extract_codes
    codes = self._codes[device][cmd]
KeyError: 'on'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 222, in async_send_command
    code_list = self._extract_codes(commands, subdevice)
  File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 147, in _extract_codes
    raise ValueError(f"Command not found: {repr(cmd)}") from err
ValueError: Command not found: 'on'

any help ?

ive been scratching my head on this but my AC is a very old window unit. it only has power on, cool, fan control up and down and auto. i got home assistant to control the ac with automations but i was hoping to have smartir make it act like an actual climate device so i can expose it to google home and have my ac voice control

so far im not seeing errors but im not sure how to get this service started and working


smartir:

climate:
  - platform: smartir
    name: Bedroom AC
    unique_id: bedroom_ac
    device_code: 1999
    controller_data: remote.bedroom_ir_remote
    temperature_sensor: sensor.bedroom_ir_temperature
    humidity_sensor: sensor.bedroom_ir_temperature

i have a file named 1999 located in my
smartir/codes/climate
directory

{
  "version": 1,
  "minor_version": 1,
  "key": "broadlink_remote_ec0bae98f66d_codes",
  "data": {
    "BedroomIR": {
      "power": "JgBQAAABHpESERETEhIRNxESEhISEhISETcREhE3EhITNRI2EjYSNRI2ERMSEhESEjYSExIRERIUERE3EjURNxESFDQTNRM1EwAFHQABH0gSAA0F",
      "cool": "JgBQAAABIY4TEhESExESNRQQFBATERMREjUTEhE3ERISNhI1EzUSNhI2EhIREhM1EhMREhISEhIREhI2EjYSEhE3ETcRNhM1EQAFHwABH0cUAA0F",
      "energysaver": "JgBQAAABII8TEBISExERNxESEhITERIREjYSEhI2ERISNhI2EjYSNRMRETYSEhMREhIREhMRExERNhISEjYTNBQ0EjYTNRI1EwAFGgABH0gSAA0F"
    }
  }
}

I’m probably not the best one to help you there. You seems to have done most the work.
Now that you have a climate entity, did you add a thermostat card to your dashboard ? With that you’ll probably be able to control it.

P.S.: I also have an old HVAC. I’ve setup everything and I still can’t control mine to start and stop automatically via the thermostat card. So take my info as a grain of salt! :smiley: haha! (But I have another thermostat card that is working well too…)

I’ve built a climate box for my wife for some magic kitchen stuff (fermentation) and after some headaches finally got it working fine with this one:

1 Like

is this tool still working ?

Hi, has anyone integrated The following Toshiba AC: ras b16n3kv2-e1 and ras-b10pkvsg-e? I’m looking at the device_code to be used in configuration.yaml?
Thanks