Skip to main content

LG webOS integration for Gladys Assistant

LG webOS integration for Gladys Assistant

Control an LG webOS television locally from Gladys Assistant.

This integration controls LG webOS TVs locally from Gladys Assistant.

Automatic discovery

  1. Turn the TV on, then install and start the integration without entering an IP address.
  2. Open the Discover tab and click Scan.
  3. Gladys sends an SSDP search for urn:lge-com:service:webos-second-screen:1 from the host network.
  4. The integration reads each TV UPnP description to obtain its name, model and stable UDN.
  5. Add your TV to Gladys. Its IP address and UDN are stored automatically.
  6. On the first connection, a webOS pairing request appears on the TV: accept it using the remote control.

The TV UDN is used as the stable identifier. A later scan can therefore refresh a changed DHCP address without recreating the Gladys device.

Wake-on-LAN

SSDP does not reliably expose the TV MAC address. Control while the TV is powered on and power-off work without a MAC address, but it is required to turn on the TV from Gladys using Wake-on-LAN.

After adding a TV, use the Configure a TV action in the integration configuration, select the relevant TV and enter its MAC address.

Each added TV has its own configuration, allowing Wake-on-LAN to be used with multiple LG webOS TVs.

Keeping a DHCP reservation or static IP address for each TV is recommended, even though discovery can detect and update a changed IP address.

Connection

Automatic mode tries ws://TV:3000 and then wss://TV:3001. Some recent webOS firmwares require the secure port with a self-signed certificate.

The integration maintains a WebSocket connection with each configured TV. If the connection is unexpectedly lost, it automatically attempts to reconnect. After the TV is started using Wake-on-LAN, the integration waits for webOS to become available and automatically restores the connection.

The integration exposes power, volume, mute, play/pause/stop, volume +/-, channel +/- and TV toast notifications.

Configuration settings

These are the settings LG webOS asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
LG webOS TVsectionNoStart with the Discover tab. The TV must be turned on to be detected by SSDP. When connecting for the first time, an authorization request will appear on the TV and must be accepted using the remote control. After adding a TV, use the Configure a TV action below to enter its MAC address if you want Wake-on-LAN support.
Connection modeselectNo

How to install LG webOS in Gladys

  1. In Gladys, open Integrations: LG webOS appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/vincentbesseau/gladys-lg-webos:2.0.3), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/vincentBesseau/gladys-lg-webos.

LG webOS requires Gladys >=4.86.1. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations

LG webOS is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by vincentBesseau, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂