JEwaldt.LgDisplay 1.1.0

dotnet add package JEwaldt.LgDisplay --version 1.1.0
                    
NuGet\Install-Package JEwaldt.LgDisplay -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JEwaldt.LgDisplay" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JEwaldt.LgDisplay" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="JEwaldt.LgDisplay" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JEwaldt.LgDisplay --version 1.1.0
                    
#r "nuget: JEwaldt.LgDisplay, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JEwaldt.LgDisplay@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JEwaldt.LgDisplay&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=JEwaldt.LgDisplay&version=1.1.0
                    
Install as a Cake Tool

JEwaldt.LgDisplay

A two-way Crestron SIMPL# Pro driver for LG commercial displays, using the LG serial control protocol (the ka/kf/ke/xb command set) over serial-over-IP — a serial-to-Ethernet gateway or the display's native LAN control port (default 9761). Verified against the LG 60WL30MS-D.

Install

dotnet add package JEwaldt.LgDisplay

Use

using JEwaldt.LgDisplay;

var tv = new LgDisplay("192.168.1.80", 9761, setId: 1, name: "Sit Room 2nd Display");
tv.FeedbackChanged += (s, e) =>
{
    // tv.PowerIsOn, tv.Volume, tv.Muted, tv.SelectedInput
};
tv.Connect();

tv.PowerOn();
tv.SetInput(LgProtocol.Input.Hdmi1);
tv.SetVolume(35);
tv.Poll();            // refresh power / volume / mute / input feedback

Call tv.Dispose() on teardown.

Control surface

PowerOn / PowerOff / PowerToggle · SetVolume / VolumeUp / VolumeDown · MuteOn / MuteOff / MuteToggle · SetInput / SetInputRaw · SendKey(LgProtocol.RemoteKey) (IR menu navigation — Menu/Up/Down/Left/Right/Ok/…) · Poll · SendCommand(c1, c2, data) (raw escape hatch for any LG command).

Feedback (properties + the FeedbackChanged event)

PowerIsOn · Muted · Volume · SelectedInput.

Inputs (LgProtocol.Input)

Hdmi1, Hdmi2, Hdmi3, DisplayPort, Ops, Av, Component, RgbPc.

Input codes vary by model. The xb data codes in LgProtocol are the common LG values; confirm them against your model's manual. SetInputRaw("90") lets you send an exact code without touching the enum.

Protocol

  • Command: {c1}{c2} {SetID} {Data}\r — e.g. ka 01 01\r (power on, set 1).
  • Acknowledgement: {c2} {SetID} OK{Data}x — e.g. a 01 OK01x. NG = rejected.
  • One command is sent at a time and gated on the ack (500 ms timeout); replies are dispatched by their command character, so a late ack still updates the right feedback.
  • The TCP transport auto-reconnects every 5 seconds.

FeedbackChanged fires on a Crestron worker thread — marshal to your own context if a handler touches shared state.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 102 7/24/2026
1.0.0 97 7/24/2026