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

019-04-07 12:44:59 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/homekit/type_thermostats.py”, line 250, in update_state
if isinstance(target_temp, float) and current_temp > target_temp:
TypeError: ‘>’ not supported between instances of ‘NoneType’ and ‘float’

@Vassilis Hey thanks for the amazing contribution. Works well but it seems like a lot of the commands are missed while controlling my AC using a broadlink RM mini 3.

I need to send them twice or even 4 times for them to work.

Here’s my config:

smartir:

switch:
  - platform: broadlink
    host: x.x.x.x
    mac: 'x:x:x:x:x:x'

climate:
  - platform: smartir
    name: xxxx
    unique_id: xxxxx
    device_code: 1281
    controller_send_service: switch.broadlink_send_packet_x_x_x_x

Am i doing something wrong?

1 Like

I’m seeing occasional missed commands as well, but only in 1 out 10 cases, I would say.
Still trying to figure out if Broadlink fails to send the command, or if Aircon simply doesn’t receive it.

Same here with Hisense Cond. But only 1/10 works and randomly… I used the available code in the repository, that is not exposing the model name. I suppose it can be from another one different from mine. The “old” custom component worked, so i’m planning to complete the manual code acquisition fro the old ini and ask for a conversion.

But the random cases in which it works makes me think that something is not going in the right way with the new component.

The broadlink pro is working correctly using its own app, even when HA seems not sending the command…And the same command sent by the “switch” component from ha works correctly…

Could you send me your json file and tell me which command is not sending?

1 Like

Pozdrav @ Igor_Jurisic!

I’m also using a Xiaomi door / window sensor to keep track of whether my Toshiba split system is on / off. As you can see below, I have a Xiaomi camera positioned beneath the AC which was really helpful while I was testing things out. I still keep it there just as an additional method of checking :slight_smile:

Regarding some commands not getting through, I found the OFF command sometimes wouldn’t work, so in my script that turns off the AC, I actually fire the OFF command twice. I’m using a Broadlink RM Mini 3.

  switch_off_toshiba_air_conditioner:
    alias: Switch off toshiba air conditioner
    sequence:
      - service: climate.set_operation_mode
        data:
          entity_id: climate.toshiba_air_conditioner
          operation_mode: 'off'
      - delay:
          seconds: 2
      - service: climate.set_operation_mode
        data:
          entity_id: climate.toshiba_air_conditioner
          operation_mode: 'off'

Cheers,
Petar

7 Likes

Amazing job on the SmartIR Climate Vassilis. Keep up the good work.

Awesome work @vassilis
Is there any chance that your component could also work with this :

It has same functionality as the Broadlink rm mini 3.

thank you !

Pozdrav @pkozul :slight_smile:

I’m doing the same…furthermore I’ve added contingency plans for situations in which the “on” command doesn’t fire. It checks when climate component turns on, and if within 15 secs the xiaomi sensor doesn’t report “open” it will send “on” command once again.

- id: '0063'
  alias: 'Aircon Livingroom Infrared On Failed'
  trigger:
  - platform: state
    entity_id: climate.livingroom_ac
    from: 'off'
    to: 'heat'
    for:
      seconds: 15
  - platform: state
    entity_id: climate.livingroom_ac
    from: 'off'
    to: 'cool'
    for:
      seconds: 15
  condition:
  - condition: state
    entity_id: binary_sensor.0x00158d0003132f63_contact
    state: 'off'
  action:
  - service: climate.turn_on
    data:
      entity_id: climate.livingroom_ac
1 Like

I have tried 1281.json and 1284.json

The previous custom component worked pretty well, however most of my commands get dropped, whereas Google Home and app are able to send commands.

I have enabled debug, will let you know if I see something.

Also, is there a way to learn commands using HA?
(whenever I start learn command service, there’s an error in log saying cannot connect to broadlink or something.)

Thanks

@VasileyI was wondering if there’s a way to use your code to achieve something in reverse (add an IR receiver near AC IR receiver, and get any commands sent to the AC?)

This will be useful to keep HA in sync with any changes made via manual remote/Google

Thanks in anticipation

Whereas the SmartIR Climate gives me this beautiful interface and controls
1

SmartIR TV only shows me this
2
No vol+/vol- or chan+/chan- Only a power button (that works)
I created the json file by learning the IR codes.

I found out that there are newer aircond models that not supported by SmartIR.

Is there any way to find latest IR codes for latest aircond models?

Thanks.

I there any plan in implement IR blaster from XIAOMI?

Worked perfectly with hitachi A/C and samsung tv (using broadlink)

Thank you!

Not sure whether this is due to a change in HA climate platform, or specifically to this one, but ever since maybe a week or 2 ago I can’t say “Hey google, turn on the air conditioner”. She complains this mode is not supported, where it used to work fine.

So now i have to say “hey google, set the air conditioner to cool” or “hey google, set the air conditioner to off” which doesn’t feel like natural language.

Anyone experience this too?

Actually I resolved my issue by syncing my devices with google home. To do this say “hey google sync my devices”. The on/off commands now started working as was the case before.

There must have been something changed with the climate platform for google assistant in one of the recent HA releases

Is anyone using the SmartIR component with a window AC that has a “dumb” remote - the remote I have only allows me to turn the temperature up/down, the fan speed up/down, change the mode, etc. and sends a unique code for each command.

I am not sure what you mean, my remote for my brand new reverse cycle A/C does that as well

Hi everyone,

I have created a json file to be able to control my A/C unit via an IR blaster that is controlled (MQTT) by tasmota using the IRHVAC command. I’ve done this by embedding the (escaped) json message inside the smartir json file. I want to share this, in case it could be useful for other people since I’ve tried to get this working for days now, but I am not sure if it fits? because I am not sending the IR code, but a json string like

"{\"Vendor\":\"Gree\", \"Power\":1, \"Mode\":\"Cool\", \"FanSpeed\":\"2\", \"Temp\":20}"

for example. So could anyone that’s involved in development maybe tell me if it is okay to add this? Because I am unsure if it fits the project but if the dev(s) give me the OK I will put in a pull request. :slight_smile:

1 Like