I built a universal remote in Kotlin Multiplatform. It runs on Android, iOS and the Mac, controls smart TVs over the network, and controls everything older over infrared.
The code was the easy part. The hard part is that no phone or laptop you own can emit infrared anymore, so the article is also about the small, slightly embarrassing pile of hardware that makes it work.
It covers the real Samsung, LG, Roku and Android TV protocols, encoding NEC infrared by hand, why Android’s ConsumerIrManager won’t talk to your USB-C dongle, why air conditioners are stateful and slightly smug about it, and how to build a Wi-Fi IR hub for less than the price of a coffee.
Mostly written out of stubbornness.
medium.com/@jacksonfdam/kotlin-multiplatform-infrared-and-wi-fi-a-remote-for-everything-that-blinks-or-listens…