Setup a new device

WebOS provides a CLI named ares allowing to communicate with LG devices or emulator.

Open the LG Developer app on your TV.

Register the device with ares

Then open a terminal and type the following command:

ares-setup-device

Ares setup device

  1. Select: choose add
  2. Enter Device Name: Enter the target device name
  3. Enter Device IP address: Target device address (displayed on LG developer app)
  4. Enter Device Port: Mostly 9922
  5. Enter ssh user: prisoner for LG devices, developer for emulator
  6. Enter description: Any description to remember which device it is
  7. Select authentication: Choose ssh key
  8. Enter ssh private key file name: By default, it must be <device_name>_webos (with device name defined in step 2)
  9. Enter key’s passphrase: Passphrase displayed on LG Developer app
  10. Save: Yes The new device is then listed automatically.

More information here: ares-setup-device

Get an ssh key

Caution

Be sure the developer app is opened on the TV and “Key server” toggle is “ON”

This step aims at getting ssh key file used by LG devices and ares CLI to communicate together.
Open a terminal and type the following command:

ares-novacom -d <device_name> --getkey

When asked, enter the passphrase that is displayed on the LG Developer app (it must be the same as defined in step 9 of previous registration).

More information here: ares-novacom

Test the connection

Open a terminal and type the following command:

ares-novacom -d lg30 --run "echo It works"

If It works is displayed, then the connection test was successful.