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

Have you created the channels as sources? If you do that you can then call the service similar to this:

- service: media_player.select_source
    data:
      entity_id: media_player.onkyo_amp
      source: 'ChromeCast Audio'

…but use source: ‘1’ or something similar

Nope, I just created it as is…
So either edit json and add those as sources, or create script with channels?

edit the json and add them as sources.

this is mine:

{
    "manufacturer": "Onkyo",
    "supportedModels": [
      "Unknown"
    ],
    "supportedController": "Broadlink",
    "commandsEncoding": "Base64",
    "commands": {
        "off": "JgBIAAABKJEUERQ2FBAUERQ2FBAUNhQ2FBAUERQ2FDUUERQ2FDYUEBQ2FDYUNRQRFBEUEBQ2FBEUEBQRFBAUNhQ2FDYUEBQ2FAANBQ==",
        "on": "JgBMAAYABD8AASiSFBEUNRQRFBEUNRQRFDYUNRU1FBEUNhQ1FBEUNhQ1FBEUERQQFDYUERQQFBEUEBQRFDYUNRQRFDYUNRU1FDYUNhQADQUAAAAAAAAAAAAAAAA=",
        "previousChannel": "JgBIAAABKJIUEBQ2FBEUEBQ2FBETNhQ2FDYUEBQ2FDYUEBQ2FDYUERQ1FBEUERMRFBEUEBQRFBETERQ2FDYUNRQ2FDYUNhQ1FAANBQ==",
        "nextChannel": "JgBIAAABKJEVEBQ1FRAUERQ1FBEUNhQ1FTUUERQ2FDUUERQ2FDUUERQRFBAUERQRExEUERQQFBEUNhQ1FDYUNhQ2FDUUNhQ2FAANBQ==",
        "volumeDown": "JgBQAAkADMILAAzsAAEqkRQRFDYUEBQRFDYUEBQ2FDYUNRQRFDYUNhMRFDYUNhQQFDYUNhQQFBEUERQQFBEUEBQRFBEUNRQ2FDYUNhQ1FDYUAA0FAAAAAAAAAAA=",
        "volumeUp": "JgBIAAABKIwaERM2FBEUERM2FBEUNhM2FDYUERM2FDYUERQ1FDYUERQQFDYUERQQFBEUERMRFBEUNhMRFDYUNhM2FDYUNhQ2EwANBQ==",
        "mute": "JgBIAAABKJIUEBQ2FBEUEBQ2FBETNhQ2FDYUEBQ2FDYUERM2FDYUERQ1FBEUNhQQFBEUERMRFBEUEBQ2FBEUNRQ2FDYUNhQ1FAANBQ==",
        "sources": {
            "ChromeCast Audio": "JgBQAAABKJIUEBQ2FBEUEBQ2FBETNhQ2FDYUERM2FDYUERM2FDYUERM2FBEUERM2FBEUERMRFBEUEBQ2FDYUERM2FDYUNhQ2EwAE8gABKEkTAA0FAAAAAAAAAAA=",
            "Video 1": "JgBIAAABKJEUERM2FBEUERM2FBEUNhM2FDYUERQ1FDYUERQ2EzYUERQ2EzYUNhQ2FBETERQRExEUERQRExEUERQ1FDYUNhQ2EwANBQ==",
            "Tuner": "JgBIAAABKJEUERQ1FBEUERQ1FBEUNhQ1FDYUERQ2EzYUERQ2FDUUERQ2FDUUERQ2FBETERQRFBAUERQREzYUERQ2EzYUNhQ2FAANBQ==",
            "DVD": "JgBQAAABJpMVEBQ2ExITERQ2ExESOBM3ExIRExM3EjgTERM3EjgSEhMSEhITNxM3FBETERITETkSNxQ2EhMTERQ2EjgTNhMSEgAFGQABJkoUAA0FAAAAAAAAAAA=",
            "Phono": "JgBIAAABJpQSEhM3ERQRExI4EhITNxI4EjgSEhI4EjgSEhM3EzcSEhMSEjgSEhI4FBETERMSEhMSNxMSEjgTERM3EjgSNxM3EwANBQ=="
        }
    }
}

so what you can do with yours is just put the codes for the channel buttons as separate sources in place of where I have ‘cfromecast audio’ etc.

this will then provide a drop-down of channels in the media player card in lovelace too.

1 Like

Ill probobly do just that, thank’s!
I thought there is a way to call that command, since I need it only in automation.

yeah, call it as per my post above. I don’t believe you can call the ‘commands’ independently as they are supposed to be functions standard to a media_player. I could be wrong…

@Vassilis, have you had any dealings with the Broadlink OEM wifi modules inside newer split ac systems?

my aircon stopped responding to voice commands in google home, but I can still control it via the google home app. anyone else have this issue or know about it?

Same problem. Looks like HA is exporting climate devices with only the SetTemperature trait to google assistant, but it’s missing the OnOff trait. I can use “set temperature to X” or “set the AC to cool” but I can’t turn it off or “turn on the AC”.
I think this issue is on HA 0.107.X

I’ve opened an issue on the HA repo:

I keep getting this message when trying to turn on my fan:
Failed to call service fan/turn_on. 'default’

Anyone have any ideas?

@mshuflin:

I had a similar issue. It turned out that the default value for one of the fan’s attributes was set to a value that was not supported by the device itself. When I then tried turning on the device using the HA UI the value of this attribute was sent to the smartir code (as one of the parameters) which then threw an error as this value is not supported.

Using Developer Tools -> States, updating the value of this attribute to a value supported by the device solved this issue for me. Hope this does the trick for you as well!

this is now fixed for me

Is smart ir climate compatible with the lastest HA? I keep getting this error

IMG_20200406_211831|690x183

Have a look at my post above… I had the same issue.

If you want to turn on your device, please use the ‘climate.turn_on’ service.
εικόνα

Perfect thanks that error is gone now but im getting this new error

Log Details (ERROR)
Logger: custom_components.smartir.climate
Source: core.py:1209
First occurred: 12:26:53 PM (4 occurrences)
Last logged: 12:26:56 PM
Unable to find service broadlink/send
Traceback (most recent call last):
File “/config/custom_components/smartir/climate.py”, line 334, in send_command
await self._controller.send(command)
File “/config/custom_components/smartir/controller.py”, line 82, in send
‘broadlink’, ‘send’, service_data)
File “/usr/src/homeassistant/homeassistant/core.py”, line 1209, in async_call
raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service broadlink/send

Your broadlink device is misconfigured, so the broadlink send service is not available

It works perfectly from HA itself if I send codes via the remote.send_command service.

Ok I have found my mistake I had to configure as a switch. I had it as a remote according to HA docs.

Thanks for the assistance

Hola,

I have a broadlink RM mini and a dumb tv set top box and managed to onfigure SmartIR with the documentation.
My only question, if i have to go to channel 230, how do I send this code? my remote is based on the 1040 template.
Glad if someone could help. Thanks

Hi is there any instruction to how and what exact can i do with SmartIR?
I already installed a broadlink mini 3 and learn codes from HA
I can control my two “dumb” devices with limited commands because i faced problems
for example on tv the power switch is ok, the volume when i press once then volumes by 10 times ,
on AC working only the power button, its a weird but for some reason the broadlink cant take the code for temperature up-down from ir controller.
So with how can help my situation the smartir?
I allready installed with the way that you describe on github and i can see on services

thesmartir.check_updates
smartir.update_component

My devices are:
tv:Sasmung UE40J5100AWXXH
ac:Pitsos P1ZAI1271W ( i cant find that brand on list)