A lightweight working example for controlling a Roku TV directly from your desktop using cURL. This repository includes graphical applications for both Linux (Gambas 3) and Haiku OS (Yab).
- Linux (Gambas 3): Due to how Gambas stores its project files, the full source code is provided as a
.ziparchive. I have also included a standaloneFMain.classfile in the repository so you can quickly preview the core logic before downloading and extracting the fullremote.zip. - Haiku OS (Yab): Provided as a standalone Yab script remote.yab
- Linux OS: Your operating system environment.
- Gambas 3: Ensure the Gambas 3 IDE is installed. The project relies on the standard
gb.form,gb.gui, andgb.imagecomponents. - cURL: Available in your command path.
- Roku TV: Must be on the same local network as your computer.
- Haiku OS: Your operating system environment.
- Yab: Ensure the Yet Another Basic interpreter is installed.
- cURL: Available in your command path.
- Roku TV: Must be on the same local network as your computer.
Because these are source code examples rather than compiled binaries, you must configure your local settings directly inside the source code before running the application.
Open the source file (FMain.class for Gambas, or the script file for Yab) in the IDE or a text editor. Update the IP address variable with your Roku TV's local IP address:
Gambas 3 (Linux):
ipAddress = "192.168.1.1"
Yab (Haiku OS):
ipAddress$ = "192.168.1.1"
To find the App IDs installed on your specific TV, run the following command in your Terminal (replace 192.168.1.1 with your actual TV IP address):
curl "http://192.168.1.1:8060/query/apps"
Once you have your desired App IDs, update your project files depending on which version you are using:
For Linux (Gambas 3):
- Button Labels: You will need to change the visible names of the shortcut buttons directly within the Gambas 3 Form Designer (GUI).
- App IDs: The App IDs are hardcoded into the cURL execution strings inside the
FMain.classsource code. Locate the button click event and replace the ID (e.g.,74519) with your target App ID:
"curl -s -d '' http://" & ipAddress & ":8060/launch/74519 &"
For Haiku OS (Yab): Update the label and App ID variables directly inside the script:
appOne$ = "Pluto TV" // Label for your reference
appOneID$ = "74519" // The target App ID from your TV
- Linux (Gambas 3): Download and extract the source
.zip. Open the extracted folder as a project in the Gambas 3 IDE. From there, you can run the application to control your TV or compile it into a standalone executable. - Haiku OS (Yab): Run the Yab script directly from Tracker or the Terminal to launch the interface and control your TV.

