Skip to main content

LG NetCast TV smart home integration, free and open source

LG NetCast TV integration for Gladys Assistant

LG NetCast Smart TVs (2012-2014): power off, volume, mute, channels and remote keys, locally.

Controls the LG Smart TVs running NetCast 3.0 or 4.0 (models from 2012 to 2014) from Gladys, on your local network: turn off, volume, mute, channels and every key of the remote. No account, no cloud.

Developed without the hardware: feedback welcome. The integration follows the protocol as the open-source clients describe it (pylgnetcast, Home Assistant) and was tested against a simulated TV only. Tell us how it behaves with yours: github.com/guim31/gladys-lg-netcast/issues.

What you need​

  • An LG TV with NetCast 3.0 or 4.0 (2012-2014 Smart TVs: LM, LA, LN… series). For an LG TV with webOS (most models from 2014 on), install the LG webOS integration instead.
  • The TV on the same network as Gladys, with a fixed IP address (a DHCP reservation in your router).
  • The TV turned on during the pairing.

Set up​

  1. Turn the TV on, then type its IP address in TV 1: address and save.
  2. Run Show the pairing key on the TV: a key (usually six digits) appears on the screen.
  3. Type it in TV 1: pairing key and save. The key does not change: this is done once.
  4. Run Test the connection to check, then add the TV from the Discover tab.

A second TV goes in the TV 2 fields. Refresh interval sets how often the TVs are read (10 s by default). Language of feature names sets the names given to the features when the TV is added, and the language of the messages.

The device of each TV​

FeatureWhat it does
PowerOn while the TV answers. Set to off to turn the TV off (turning on: see Limits).
VolumeThe volume of the TV (0 to 100); setting it presses Volume + or − step by step.
Volume downButton: one press of Volume −.
Volume upButton: one press of Volume +.
MuteWhether the sound is muted; can be switched.
ChannelThe number of the channel on screen (0 on an input); setting it changes channel.
Channel downButton: previous channel.
Channel upButton: next channel.
Channel nameThe name of the channel on screen, or of the input.
InputThe input on screen: TV, HDMI1, AV…

The TV is read on the integration's own timer. When it stops answering it is shown off, with an "unreachable" badge: in standby, NetCast TVs cut their network.

Dashboard​

  • LG remote: the state of the TV, the channel or input on screen, the volume, and the Turn off, Volume −, Volume + and Mute buttons. Each button can be hidden in the widget settings.
  • LG keys: four keys of the remote of your choice (Channel −, Channel +, Home and Back by default; arrows, OK, colour keys, Input…). "None" hides a slot. Place two of them for a full pad.

Both show the name you gave the TV in Gladys; leave the TV setting empty for the first TV.

Scenes​

The device features already work in scenes: turn the TV off, set the volume, mute, go to a channel, or start a scene when the TV is turned on (Power changes to on).

The action Press a key of the LG remote sends any other key (Home, OK, arrows, colour keys, Input, Guide…) to a TV, up to 20 times in a row, and gives the number of presses sent to the next actions.

Ideas: mute the TV when the doorbell rings; turn it off when everybody left; switch to the news channel at 8 pm.

Troubleshooting​

  • "Pairing needed": the pairing key is missing; run Show the pairing key on the TV with the TV on.
  • "The TV refused the pairing key": show it again and type it exactly as displayed.
  • "The TV does not answer": the TV is off, or its address changed (set a DHCP reservation). Check that nothing blocks port 8080 between Gladys and the TV.
  • "Unexpected answer": the TV is probably not a NetCast 3.0/4.0 model (webOS, or a 2011 NetCast 2.0 TV).
  • The volume moves slowly: there is no "set volume" command on these TVs, only Volume + and −, one press every 0.3 s (50 presses at most per change).

Limits​

  • No turning on over the network: in standby, NetCast TVs cut their network and ignore Wake-on-LAN. Turn them on with the remote (or an infrared blaster).
  • The input is read only: the protocol has no reliable way to choose one; the Input key cycles through them.
  • Channel changes use the channel list of the TV; a number missing from it is typed digit by digit.
  • NetCast 2.0 TVs (2011, "HDCP" protocol) and webOS TVs are not supported.
  • A TV whose firmware gives no identifier is known by its address: keep the address fixed.
  • Not affiliated with LG Electronics. LG and NetCast are trademarks of LG Electronics.

Configuration settings​

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

SettingTypeRequiredDescription
Your LG NetCast TVsectionNoLG Smart TVs with NetCast 3.0 or 4.0 (2012 to 2014). Turn the TV on, type its address and save, run "Show the pairing key on the TV", then type the key shown and save again. For webOS TVs (2014 and later), use the LG webOS integration.
TV 1: addressstringNoFixed IP address of the TV (router DHCP reservation recommended).
TV 1: pairing keystringNoThe key the TV shows on screen (usually six characters).
TV 2: addressstringNoOptional: a second NetCast TV.
TV 2: pairing keystringNoThe key the TV shows on screen (usually six characters).
Refresh intervalselectNoHow often the TVs are read.
Language of feature namesselectNoNames given to the features when the TV is added to Gladys, and language of the messages.

How to install LG NetCast TV in Gladys​

  1. In Gladys, open Integrations: LG NetCast TV appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-lg-netcast:1.0.0), 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/guim31/gladys-lg-netcast.

LG NetCast TV requires Gladys >=5.1.0. 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 NetCast TV 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 guim31, 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 🙂