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
- Select: choose
add
- Enter Device Name: Enter the target device name
- Enter Device IP address: Target device address (displayed on LG developer app)
- Enter Device Port: Mostly
9922
- Enter ssh user:
prisoner
for LG devices,developer
for emulator - Enter description: Any description to remember which device it is
- Select authentication: Choose
ssh key
- Enter ssh private key file name: By default, it must be
<device_name>_webos
(with device name defined in step 2) - Enter key’s passphrase: Passphrase displayed on LG Developer app
- 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.