PLEASE NOTE that this connects to the Roku via IP address, which needs to be added to the code before you flash it to the ESP32. This code was developed for an ESP32-WROOM-32 board in the Arduino IDE.
This program is a simple command-line utility for sending remote control commands to a Roku TV, made for automation of the TV from anything that can run Python, Ruby or Swift. (Since I have ported it.