How to Replace IR Remote Toggle Codes in a BroadLink RM Mini 3 with Discrete/Separate Codes

Many product manufacturers provide remote controls with their devices that have toggle buttons on them, e.g. many TV remotes have a single power button, and that same button turns the TV off if on or on if off. This makes it difficult to create automations using the RM Mini 3 that only turn a device (for example) off (and not on).

When my dad got a new TV, he gave me his old (dumb) LG TV. It did not have a working CEC interface so that I could control the power and inputs via HDMI from my Raspberry Pi 3B+, so I set about controlling it from my BroadLink RM Mini 3. The only problem was the toggles. I learned via searching that not only did discrete, single function IR codes exist, but that the information for obtaining and converting those codes in a fashion that was compatible with my RM Mini 3 was mixed and dubious. Most of what was out there related to HomeAssistant, and doesn’t work for Homebridge’s homebridge-broadlink-rm plugin. After days of trial and error, I eventually worked out how to retrieve and convert the codes…

Continue reading