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…
tv_on:
alias: TV
sequence:
- service: broadlink.send
data:
host: !secret rm_mini_ip
packet:
- "JgCQAAUAAdFOFCcUFBMoEhQTKBMUFBMTJxQTFBcRExMUAANLTxMoExMTKBMTFCkTEhQTFCcUExUUExIUEwADS08UJhMUEycUExUmFBMUExQoFBIUExQUExMAA0tPEycUExQoExUSJxMUFBQTJxMUExQUExQTAANLThMoExMUKBMTFCcUExQUEyUVFBQTFBMUFAANBQAAAAAAAAAA=="
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.