Skip to main content

LG TV / Display (RS-232 over IP)

LG commercial displays and TVs that expose an RS-232 serial control port — driven over the network by carrying LG's serial protocol through a serial-to-IP gateway (an iTach IP2SL, a Brainboxes ES/SW box, a MOXA NPort, or any TCP↔serial adapter). One display becomes one GEM device, and commands target that device directly; this driver creates no zones.

It is a deliberately thin driver: power on/off, set the volume, and read power and volume back. That's the whole serial command surface LG publishes for these sets. If the display is on the network and runs webOS, you almost always want the richer LG webOS TV driver instead (inputs, apps, channels, mute, transport). Reach for this RS-232 driver when the panel is a commercial/hospitality display with only a serial port, or when the install standardizes on serial control through a gateway.

When to use this driver vs. the webOS driver

You have…Use
A networked LG TV running webOS (consumer or pro)LG webOS TV
A commercial/signage display reachable only over RS-232This driver (through a gateway)
A serial display already wired into an iTach / Brainboxes / MOXA portThis driver

What's controlled

  • Power — on and off, plus an on-demand power-state query.
  • Volume — set an absolute level 0–100, plus an on-demand volume query. GEM hex-encodes the level for the LG frame and decodes the hex it gets back, so you always work in plain 0–100 numbers.

What's not controlled

The LG serial command set this driver implements is small. It has no mute, no input switching, no app launching, no channel control, and no media transport. If you need any of those, the display has to be reachable over the network and you should use the LG webOS TV driver. Don't expect mute_on / input / launch_app here — they don't exist on this device.

Prerequisites

  • The LG display's RS-232 port wired to a serial-to-IP gateway, and you know the gateway's LAN-side IP and TCP port (for example port 4999 on an iTach IP2SL).
  • The gateway serial line configured to match the LG: 9600 baud, 8 data bits, no parity, 1 stop bit (9600 8N1) is the LG default.
  • The LG-specified RS-232 cable / pinout between the display and the gateway. A generic PC null-modem cable is frequently the wrong pinout and will look like a dead link.
  • The display's Set ID = 01 (the factory default). This driver hard-codes Set ID 01 into every command — see Multiple displays on one serial bus.

Setup

  1. Open Devices, add a device, and choose the LG TV (RS-232 over IP) driver. It suggests the AV subsystem and a display device type — accept those.
  2. Fill in the two required fields:
    • Serial Gateway IP — the LAN IP of the serial-to-IP adapter that fronts the LG RS-232 port (not the display's own IP — the display has no network role here).
    • Serial Gateway Port — the TCP port that maps to the LG serial line on that adapter (e.g. 4999 on an iTach IP2SL).
  3. Save and enable the device. GEM opens a persistent TCP connection to the gateway and keeps it up, reconnecting automatically if the link drops.
  4. On the device's Commands tab, run get_power_status, then power_on / power_off to confirm control end-to-end before wiring the display into macros or a UI.

Volume

Send the volume command with a level argument from 0 to 100. GEM converts that to the hex value LG's frame expects (for example 30 is sent as 1e), so you never type hex — just the percent. Run get_volume to read the current level back; GEM decodes the hex in the reply into a plain 0–100 number.

There is no volume-up / volume-down step command and no mute on this driver — only the absolute set. If a touchpanel or macro needs up/down nudges, send volume with a computed level rather than expecting step buttons.

Status read-back is on demand, not polled

This driver does not poll the display on a timer and does not store the last-read power or volume as a saved attribute. The two queries — get_power_status and get_volume — are something you run (from the Commands tab, a macro, or a UI button). When a reply comes back, GEM reports the value live to anything currently subscribed to the device (an open touchpanel, the device page), but it is not written to history or kept as a stored value.

Practically, that means: if you want a panel to show the current volume, have it run get_volume when it opens (or on a refresh button) rather than assuming GEM already knows the level. The display also does not announce front-panel or IR-remote changes on its own over this command set, so GEM only knows what it last asked for.

Using it with an AV zone

Because the driver exposes an absolute volume command, you can make the display an AV zone's Volume Device so the room's volume slider drives it:

  1. Open AV Zones, edit the zone for the room, and set Volume Device to this display.
  2. The zone's volume slider then sets the display's absolute level.

Be aware of the limits before you rely on it: this device has only absolute volume — no step and no mute — so the zone's volume-up/down buttons and mute button have nothing to call on this device. Many installs instead leave a receiver/soundbar as the zone's Volume Device and use this display only for power (wired into the source/room on- and off-macros), letting the display's own speakers stay off. Choose based on where the room's audio actually comes from.

Attributes

These names are not in GEM's attribute autocomplete catalog, so when you reference them in triggers or macros, type them exactly as shown.

Device — required

AttributeTypeDescription
ipstringLAN IP of the serial-to-IP gateway that fronts the LG RS-232 port.
portintTCP port on that gateway mapped to the LG serial line (e.g. 4999 on an iTach IP2SL).

Device — optional (advanced)

The driver inherits the standard TCP connection tuning fields. The defaults work for an LG display on a gateway; touch these only if you have a reason:

AttributeTypeDefaultDescription
command_throttleint200Minimum gap, in milliseconds, between consecutive commands sent to the gateway. Raise it if a slow gateway drops back-to-back commands.
reconnect_timeoutint1000Initial delay (ms) before reconnecting after the link drops; backs off on repeated failures.
max_reconnect_delayint60000Upper bound (ms) on the reconnect backoff.
note

You should not need to set a request/response terminator. GEM already appends a carriage return (\r) to each LG command, which is what the protocol expects.

Commands

Driver-declared commands appear on the device's Commands tab and can be used in macros, triggers, and on UI buttons. The exact LG serial string each one sends is shown so you can match it against LG's RS-232 control reference.

CommandSendsAction
power_onka 01 01Turn the display on.
power_offka 01 00Turn the display off.
get_power_statuska 01 ffQuery the current power state.
volume (arg level)kf 01 [level]Set absolute volume; level is 0–100 (GEM hex-encodes it).
get_volumekf 01 ffQuery the current volume (GEM decodes the hex reply to 0–100).

The 01 in every command is the display's Set ID.

Multiple displays on one serial bus

This driver hard-codes Set ID 01 in its command strings, which is the LG factory default. A single GEM device therefore talks to a single display set to ID 01. If you daisy-chain several LG displays on one RS-232 bus and give them different Set IDs, the stock commands will only reach the one at ID 01. To address the others, fork the command set and edit the Set-ID digits in the command strings to match each display (ka 02 01, ka 03 01, …). See Commands for editing a device's command strings.

Known limitations and quirks

  • Set ID is fixed at 01. Commands target the display at Set ID 01 only; chained displays at other IDs need a forked command set (above).
  • Absolute volume only. No volume up/down step and no mute exist on this driver — set a level with volume, or use the networked webOS driver for mute.
  • Power and volume are read on demand, not polled. GEM reports a query reply to subscribers but does not poll on a timer or keep a stored value (see above).
  • Volume travels as hex on the wire. You always work in 0–100; the conversion is internal. A gateway that alters the serial characters will corrupt that hex — see Troubleshooting.

Troubleshooting

SymptomCheck
No response to power_on / get_power_statusConfirm the gateway's serial settings are 9600 8N1 and that the cable between the display and the gateway uses the LG-specified pinout, not a generic null-modem cable. Confirm the Serial Gateway IP and Port point at the serial line, not the display.
Volume queries return wrong or wild valuesVolume is hex-encoded in the LG frame. Make sure the gateway is passing the serial bytes through unchanged and is not adding line-ending translation or stripping characters.
Commands work on one display but not another on the same busThe driver hard-codes Set ID 01. For chained displays at other IDs, fork the command set and change the Set-ID digits per display.
The display never reflects a change made from its own remoteThis command set has no unsolicited status; GEM only knows what it last queried. Run get_power_status / get_volume to resync, or drive all changes through GEM.
Link keeps dropping / reconnectingVerify only GEM is connected to that gateway port — many serial gateways allow a single TCP client at a time, so a second controller or a stuck session will fight GEM for the port.

See also

  • LG webOS TV — the networked LG TV driver (inputs, apps, channels, mute, transport, status polling). Use it for any webOS TV on the LAN.
  • Global Caché (iTach / Flex / GC-100) — the iTach IP2SL is a common serial-to-IP gateway that fronts this driver.
  • Devices — adding and configuring devices.
  • Commands — running and editing device command strings (including forking the command set for a different Set ID).
  • AV Zones — set the display as a zone's Volume Device for absolute volume.