Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roku Remote Control Example

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).

App Screenshot App Screenshot

Repository Structure

  • Linux (Gambas 3): Due to how Gambas stores its project files, the full source code is provided as a .zip archive. I have also included a standalone FMain.class file in the repository so you can quickly preview the core logic before downloading and extracting the full remote.zip.
  • Haiku OS (Yab): Provided as a standalone Yab script remote.yab

Requirements

For Linux (Gambas 3)

  • 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, and gb.image components.
  • cURL: Available in your command path.
  • Roku TV: Must be on the same local network as your computer.

For Haiku OS (Yab)

  • 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.

Setup & Configuration

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.

1. Set the IP Address

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"

2. Configure Shortcut Buttons

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.class source 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

Usage

  • 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.

About

Roku remote control example written in Yab and Gambas

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors