There’s a example in the broadlink component page (see the broadlink.send - select_tv_source). There’s some room to improve by using yaml anchors and packages. So… a your package file could look like this:
homeassistant:
customize:
package.node_anchors: # This is just a dummy entry
key1: &key1 <broadlink ir code for key1>
key2: &key2 <broadlink ir code for key2>
key3: &key3 <broadlink ir code for key3>
script:
select_channel_123:
sequence:
- service: broadlink.send
data:
host: 192.168.0.107
packet:
- *key1
- *key2
- *key3
select_channel_321:
sequence:
- service: broadlink.send
data:
host: 192.168.0.107
packet:
- *key3
- *key2
- *key1
@clyra thank you for taking the time to reply! I’m not too Familiar with package and Anchors… reading the section on Broadlink.send do I put this into my script file? And make a script with the following
script:
tv_channel_103:
sequence:
- service: broadlink.send
data:
host: 192.168.0.107 (my IP address)
packet:
-
“Key for 1”
-
“Key for 2”
-
“Key for 3”
If that is correct how do I call the script to my configuration.yawl file? For it to become a switch to add to HomeKit?
Thanks again…
hi @apedrosac, the line where your mac address is change " to ’ I think that’s why its not working. so mac: ‘xx:xx:xx:xx:xx:xx’
get rid of friendly_name: and replace with type: rm_mini
let me know if that works…
Well the only other thing is if it can’t connect are you sure your IP address and MAC address are connect… does the broadlink manger connect to your rm mini 3 when you press scan? That will also bring up the ip address and MAC address that you need to use!
Yes, I used the Broadlink App in my android device to setup the RM mini 3. It is correctly connected to my WiFi network. I can see it in my router’s list. I have also assigned a fixed IP to it based on the MAC address.
Using the App, I can see that firmware is updated and I configured some IR Remotes.
Everything is working fine when I use the smartphone as remote controller.
But…
Broadlink Manager does not see it, even if I modify the .json config file.
Same happens with HA…
Good news!
I made a reset to the RM Mini3 and reconfigured it using e-Control App from Broadlink.
Now it is correctly connecting from either Broadlink Manager and Home Assistant.
Thanks @jak123uk!
Hi @jak123uk,
sure I will try to program TV channels, I’ll let you know.
For the moment, just playing with it.
By the way, any hint in getting to know if the TV is already ON or OFF (in case someone used the “boring” TV remote as usual)?
Hi @apedrosac I’ve fixed using the Android App “Broadlink RM Plugin Lite” because the broadlink component is not working with the latest version as you can see here:
to my configuration.yaml, saved the file, restarted Hassio and am now seeing e.g. the remote.send command in dev-tools. Nice.
However now i am stumped what to do next. How exactly do i teach IR-commands, how do i trigger them in lovelace and how do i expose them to Node-Red? I am pretty new to HA and not so good with code, so please dumb it down for me!
If you’re running Windows I’d recommend you start by using Broadlink Manager This is referenced above as well for the record. Using that it will spit out hex and Base64 encoded commands that it records for each button. You want to use the Base64 output for your scripts. Always make sure it has “==” at the end and add it if it doesn’t have it. It’s my understanding that’s required, but I honestly never verified it because there are a number of posts here that indicate that it’s required so I’ve just always done so!
Once you have some/all of your button commands mapped for some/all of your remotes then you can start creating scripts to use those mapped buttons. For example, to turn my TV on or off…
In my case I generally just use that by telling Alexa, “Turn [on|off] the TV” at that point. You could also call it via an automation if you so desire.
Thanks for the answers - unfortunately i have no Windows in the house, i’ll try once my girlfriend has her Surface around.
I saw that there is a way of calling the “learn” service in HA, however that is not working for me. Any ideas?
About the scrips: So i have to write such a script for every single command i want the broadlink to send out? And where do these scrips go? In the config.yaml, or in the “script” section in Hassio? If the latter, do i put them all in one file?
In the end I want to be able to trigger actions from within node-red, using inputs from the Google Actions API, so that i can tell Google Home that i want to watch a movie and it’l trigger the Node-Red flow to set the lighting scene, close the blinds, start my beamer and fire up the audio system. (I know this could probably all be done from within HA scripts, but NR is a thousand times more intuitive for me than scripting)