JEwaldt.LgDisplay
1.1.0
dotnet add package JEwaldt.LgDisplay --version 1.1.0
NuGet\Install-Package JEwaldt.LgDisplay -Version 1.1.0
<PackageReference Include="JEwaldt.LgDisplay" Version="1.1.0" />
<PackageVersion Include="JEwaldt.LgDisplay" Version="1.1.0" />
<PackageReference Include="JEwaldt.LgDisplay" />
paket add JEwaldt.LgDisplay --version 1.1.0
#r "nuget: JEwaldt.LgDisplay, 1.1.0"
#:package JEwaldt.LgDisplay@1.1.0
#addin nuget:?package=JEwaldt.LgDisplay&version=1.1.0
#tool nuget:?package=JEwaldt.LgDisplay&version=1.1.0
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
xbdata codes inLgProtocolare 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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Crestron.SimplSharp.SDK.ProgramLibrary (>= 2.21.252)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.