Using Home Assistant with IR controlled devices

Dear all, I wrote an article about setting up a Wi-Fi remote control device with Home Assistant: Using Home Assistant with IR controlled devices - autostatic.com

Maybe this topic could be used for questions or for sharing information. If desired I could summarize the article here.

Jeremy

3 Likes

Thanks for the share :wink: Did u think about using ESPHome instead ? as you can pass parameters between HA and ESPHome perhaps get a generic IR flash firmware for ESP devices and send IR codes straight from HA ? :slight_smile:

Hello Vincèn, thanks for the tip! I have zero experience with ESPHome and wanted an integration with my existing devices. But I’ll look into ESPHome, if it integrates better than what I’ve cooked up the choice is clear.

It’s a nice endeavor, but with the Broadlink / Bestcon RM4C Mini supported out-of-the-box by HA and at the same price as the no-name IR blaster to be tasmotized, not sure it’s worth the hassle, tbh.

Hello Chris, thanks for bringing up a fully supported solution! To be honest, hadn’t encountered this solution yet. If it doesn’t need an external service then I guess that is indeed the way to go. Thanks again!

Yep should make it a lot easier (both by no needs of mqtt in the middle) and ability to send variables from HA to ESP which should allow to get a generic fw independant of IR device controlled :wink:

do you have some links about that ? and how do you select IR codes to send ? Side note: for price of that device I’m able to build at least 5 ESP with IR emitter :wink:

https://www.amazon.com/Bestcon-Universal-Compatible-Assistant-Broadlink/dp/B085WYQ1XM/ref=sr_1_3?crid=G39V1JZP7ITV&keywords=rm4c+mini&qid=1641376857&sprefix=rm4c+mini%2Caps%2C265&sr=8-3

Not sure you have the full BOM, here, including workload :wink:
EDIT: Not that I say that’s an any worse solution. With some decent casing for WAF, you indeed can probably build yourself 2/3 devices for the same price. Just that it’ll take time and, as any DIY, is prone to trials and errors (and require knowledge)…

And yeah, you still don’t have the IR learning part, which can be nice to have for “exotic” remotes…

1 Like

Yep it has the nice advantage of a standard design but has a big drawback I discovered checking links you shared: it has to learn Ir codes so it’s useless for me ! I use a lot of discrete codes so they can’t be captured :wink:
Thanks anyway for the suggestion as it can be a nice solution in some specific situations :slight_smile:

Why “has to”?

The learned code are stored in HA, not the device

{
    "version": 1,
    "minor_version": 1,
    "key": "broadlink_remote_ec0bae0caa84_codes",
    "data": {
        "SONY_TV": {
            "POWER": "JgDCACYVEhUmFRIWJRYSFRIVJhUSFhIVEhUSAANPTRUmFRIVJhUTFSYVEhUSFSYVExUSFRIVEwADTk4UJhUSFSYVExUmFRIVEhUmFRIWEhUSFRMAA1BNFSYVEhUmFRIVJhUSFhIVJhUSFRIVExUSAANQTRUmFRIWJRUTFSYVEhUSFSYVExUSFRIVEwADT04VJRYSFSYVEhUmFRIVExUmFRIVEhUSFhIAA1BOFCYVEhUmFRIWJRYSFRIVJhUSFRMVEhUSAA0F"
        }
    }
}

EDIT: I’m just assuming there is a way to translate discrete code in to this base64 format, here. No actual clue :wink:

Ordered a RMC4 Mini, it will arrive this week and I’ll let you know how it compares to my current solution.

Chris B. Thank you! I got the BestCon RMC4 mini from Amazon (found another listing for it for $15 https://amazon.com/gp/product/B09BMWKVDN) and it was super easy getting it setup using the HA broadlink integration you linked. I used the Developer Tools Services UI to input the sequences outlined in the HA instructions to get it to learn the commands for my window fan. Once you learn to convert the configuration.yaml stuff they are always showing in the documentation to inputs in the Developer Tools UI things get much easier.

Received the RMC4 Mini. Integrates very well. Had to block some domains though to prevent the device from phoning home.

1 Like

Were you able to make the BestCon RMC4 mini work after blocking it’s phone home attempts? I have a Broadlink RM3 mini which quit working after I blocked it’s internet access. It may have been the Broadlink app that quit working when I blocked it’s internet access, I don’t remember. I just remember noticing that they both phoned home and one or the other was sending a lot of data.

Hello Len, it still works even after cutting off all internet access for this specific device. I don’t use the app, only used it to add the device to my network and then removed it again as you don’t need the app once you have the device integrated with Home Assistant.

2 Likes

Thank you for the links! First time using HA and got up and running in less than 30 minutes with the RMC4 mini!

After getting the RM3 and RM4 I now see Broadlink’s native app is able to find and use remotes “plug and play, out of the box”, how can we get this “plug and play, out of the box” experience with HA, either tapping into already setup device on the Broadlink app or with some kind of integration? Everyone reteaching each function of every AC remote seems extremely stupid there must be a better way?

Instead of using the learn function in HA, do the Broadlink integration recognize the IR/RF devices if they are defined in the Broadlink app?

How can I send base64 codes from an automation? I tried it this way but had no luck:

import base64

ir_code = "B2EjnRFgAhwC4CUDAYgGgAPgAzcCiAYcIANABwNgAhwCgAPAC8AH4AMXwBNABwEJtMCHBBwCYAIc4AoBgBXgAwVAAQGIBkADQBVAAwEcAkAFAYgGQAMAYGAHBBwCYAIcIAELiAYcAhwCYAKIBmACQAeAAwEcAkAPBYgGHAIcAkAHAWAC4AGHAWAC4CMDQDtAA+ADM0APwAPAF0APQAvAB0ALQANADwuIBmACHAJgAogGYAI="

decoded_code = base64.b64decode(ir_code)

description: ""
mode: single
trigger: []
condition: []

service: switch.turn_on
data:
  entity_id: switch.ir_blaster_stube
  payload_on: '{"frequency": 38000, "data": [decoded_code]}'

alias: Test IR send

Error: Message malformed: extra keys not allowed @ data['service']
I’m using a TS1201 with Z2M

Just wanted to thank everyone who answered posts in this thread. Learned a lot and got an RM4C Mini running in my home theater with only minor headaches. Now on to spend months tweaking the dashboards :roll_eyes:

Can i use the broadlink component with the RM4C Mini to control my electric candles? I now use a small remote control with just on/off and would like to automate this with Home Assistant. I’m 99% sure it’s a IR remote control.