Skip to main content

Roku

The tvlabs connect command connects with Roku devices on the TV Labs platform as if they were in front of you.

Prerequisites

There are no vendor specific commands involved with connecting on a Roku device! To access all the functionality of Roku, ensure that there is the telnet client installed on your local machine.

Connecting

When connected to a Roku session with tvlabs connect, development ports (Roku Telnet and HTTP APIs) will be mapped to ports on your localhost.

Roku Connected

Roku devices will be in development mode already, but if it is not, you may follow the instructions from the Roku development documentation to enable it.

Once the tvlabs connect command was successful for connecting to a Roku session, you can navigate to http://127.0.0.1:8000/ in your browser to verify it was successful. If you are prompted to login, then the Roku is connected.

Port Mapping

The port mapping when tvlabs connect is running and connected to a Roku session is as follows:

  • Local port 8000 to Roku device port 80 (HTTP)
  • Local port 8430 to Roku device port 843 (BrightScript Remote Debugger)
  • Local port 8080 to Roku device port 8080 (Telnet server for development purposes)
  • Local port 8085 to Roku device port 8085 (Telnet server for Roku device console log output)
  • Local port 8087 to Roku device port 8087 (Custom service port)
  • Local port 8060 to Roku device port 8060 (Roku External Control Protocol - ECP)
Note

Ports are mapped to local ports > 1000 to avoid requiring root privilege.

Installing

The username rokudev and the password tvlabs can be used to authenticate with the sideload API. To install your application, first package the application into a zip file, and upload it at http://localhost:8000. Alternatively, run the following curl command:

curl -sS \
--user rokudev:tvlabs \
--digest \
--anyauth \
-F "mysubmit=Install" \
-F "archive=@my-application.zip" \
-F "passwd=" \
http://127.0.0.1:8000/plugin_install |\
sed -nr 's/.*<font color="red">(.*)<\/font>.*/\1/p'
Important

Replace the my-application.zip portion with the location of your application zip.

Troubleshooting

If the development Telnet ports or HTTP endpoints are not available after a successful tvlabs connect, please ensure that development mode is enabled on the Roku device.

If the development password is incorrect, please follow the instructions for enabling development mode. The password can be reset from the development mode menu.

If tvlabs connect still cannot make a connection after trying these steps, please contact TV Labs for support.