Skip to main content

tvlabs connect

Connecting to a live session for Development

Use tvlabs connect to establish a secure SSH tunnel to a TV Labs device:

tvlabs connect

Active sessions will appear once you're connected. Select a session with enter and use the arrow keys for multiple active sessions.

cli-sessions Figure 1: List of active sessions. Your session will show up here, once you create a new session and succesfully connect to a device. You can create a new session here.

cli-status Figure 2: Once the session shows up, select it with enter, which will then show a status screen.

How it works

When you run tvlabs connect the CLI will connect to the TV Labs platform via WebSocket to receive live updates about sessions. Once a session starts, it appears in the CLI. After selecting a session the CLI creates a secure SSH tunnel into our network and maps local ports directly to the ports of the target device.

For example, if you are used to connecting to your local device 192.168.10.235 this will change to 127.0.0.1 (localhost):

192.168.10.235:8080 -> 127.0.0.1:8080

Sideloading an Application

See Supported Platforms for more information.

Troubleshooting

  1. If you encounter issues, run the following command to upgrade to the latest version of TV Labs CLI:
/bin/bash -c "$(curl -fsSL https://tvlabs.ai/install.sh)"
  1. If you continue to have issues, please contact TV Labs for support. Run the following command to gather diagnostics:
tvlabs check
  1. To view real-time logs for troubleshooting, use the following command in a seperate terminal:
tvlabs logs

Accessing a Local Application

If a sideloaded application depends on a locally running web application, it can be accessed from the device by providing an app port to the tvlabs connect command.

# Start the local web application on port 8000
PORT=8000 npm run dev &

# Connect to the TV Labs device and expose the local port 8000 to the device
tvlabs connect -p 8000

This will forward the local port 8000 to an address that is reachable by the TV Labs device. This address is always http://local.tvlabs.ai:50552.

127.0.0.1:8000 <- http://local.tvlabs.ai:50552

For devices that support sideloading by URL, e.g. Vizio Smartcast, this address can be used to access the local web application.

For devices that use sideloaded packages, this address can be used in the application's source to access the local web application.