Installing the Homebrew Channel App on an LG TV

Published — Edited

Ensure your computer and TV are connected to the same network, create an LG Account, download and configure the CLI (ares), then install then turn on the Developer Mode app on your TV and enable both Dev Mode and Key Server.

After configuring ares, open a new terminal and run the ares --version command. If it outputs a version, then it is configured correctly. The next step is to add your TV to ares by running the ares-setup-device command, choosing the add option, and entering the data as follows:

Name Description Example
Device Name A name for the TV. Do not include spaces in the name, as it may cause issues with subsequent commands. TV
Device IP Address IP address of the TV, which can usually be found within the TV's Network settings. 192.168.2.123
Device Port SSH port of the TV. This is always 9922. 9922
SSH User Username of the account to log into. This is always prisoner. prisoner
Description This field can be skipped. Bedroom TV
Password Password of the account to log into. This must be left blank.

Enable the Key Server, run the ares-novacom --getkey --device DeviceNameHere command, and input the passphrase found in the Developer Mode app.

Before continuing, test your configuration by running the ares-device-info --device DeviceNameHere command. If it returns a result, then your settings are correct and you can install the Homebrew Channel app by downloading the latest .ipk file from the releases page, and running the ares-install --device DeviceNameHere "C:\path\to\file.ipk" command.

Session Time Renewal

The Developer Mode app has a session time which expires after some time. If you do not open the app and click Extend Session Time before it expires, then all 3rd party apps (i.e. Homebrew Channel and apps installed through it) will be uninstalled. You can either do this manually, or create a cron job to do it automatically.

To create a cron job:

  1. Open the Developer Mode app and enable the Key Server.
  2. Run the ares-novacom --device TV --getkey command to download the Identiy File.
  3. SSH into the TV with ssh -p 9922 prisoner@192.168.2.123 -i "C:\Users\Username\.ssh\TV_webos", replacing the example IP and file path with your own. The password is listed in the Developer Mode app.
  4. Run cat /var/luna/preferences/devmode_enabled and copy the text that it outputs. Do not include the ~ $, as the session token contains only alphanumeric characters.
  5. SSH into another Linux machine and add 0 0 * * * curl https://developer.lge.com/secure/ResetDevModeSession.dev?sessionToken=putTheTokenHere as a cron job.

Common Issues

CLI: Connection timed out.

This error is most likely caused by an incorrect IP Address. Try verifying whether it is correct, and then re-run the ares-setup-device command to change it as necessary.

Error: connect ECONNREFUSED

This error is known to be caused by:

  1. An incorrect IP Address or Port number. Try verifying whether they are correct, and then re-run the ares-setup-device command to change them as necessary.
  2. Running an ares command, before webOS is fully launched. Try waiting a minute and then running the command again.

Error: All configured authentication methods failed

This error is most likely caused by an incorrect ares-setup-device configuration. Please re-read the information above and try again.

ares-novacom ERR! [Tips]: Failed to get ssh private key

This error can appear when running ares-novacoom --getkey. It likely means that you forgot to enable Dev Mode or Key Server in the Developer Mode app.