You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrated the LG display plugin from Essentials v2 (net472, 4-Series) to Essentials v3 (net8). The plugin contains two device types — a two-way IP/serial controller (`LgDisplayController`) and a one-way IR controller (`LgDisplayIrController`) with its own Mobile Control messenger — plus a shared bridge join map.
13
+
14
+
The migration followed the standard v3 playbook (project file → factories → 3-Series cleanup → logging → compilation fixes → verification), then surfaced three real v3 API breaks that aren't unique to this plugin and have been added to the migration package's reference docs.
15
+
16
+
## Standard Migration Steps (no surprises)
17
+
18
+
-`.4Series.csproj` retargeted to `net8`; `SERIES4` define groups removed; `PepperDashEssentials` bumped to a v3 prerelease (see "Items for Review" #3).
19
+
- Both `DeviceFactory` files updated (`MinimumEssentialsFrameworkVersion`).
-~40 `Debug.Console`/`Debug.LogXxx` calls migrated to `this.LogXxx(...)` extension methods with PascalCase named placeholders. Static-context calls in factories and the `IrStandardCommands` static helper were handled via `Debug.LogMessage(LogEventLevel.X, …)` or removed.
22
+
-`LgDisplayController.CustomActivate()` changed from `public override` to `protected override` to match the v3 base-class visibility change.
23
+
- Stale copyright/year stamps refreshed to 2026 in `.csproj`, `Directory.Build.props`, and `README.md` (left `LICENSE.md` alone — that's the original copyright year).
24
+
25
+
## Breaking Changes Found (worth knowing for future migrations)
26
+
27
+
These were not in the v3-migration package's reference docs at the start of the session. They are now.
28
+
29
+
1.**`DisplayBase.WarmupTimer` and `CooldownTimer` field type changed** from `Crestron.SimplSharp.CTimer` to `System.Timers.Timer`. Any plugin that assigns `new CTimer(...)` to these fields will get `CS0029` at build time. Fix: switch to `new System.Timers.Timer(ms) { AutoReset = false }; t.Elapsed += ...; t.Start();`. `Stop()`/`Dispose()` calls don't change. Standalone `CTimer` use elsewhere can stay — `CTimer` itself still exists.
30
+
2.**Per-input marker interfaces removed** — `IInputHdmi1`–`IInputHdmi4`, `IInputDisplayPort1`, etc. are gone in v3. They've been superseded by the generic `IHasInputs<T>` / `ISelectableItems` pattern. Drop them from class declarations; the concrete `InputHdmi1()` / `InputDisplayPort1()` methods can stay since external callers may still use them.
31
+
3.**`PepperDash.Essentials.Devices.Displays` namespace doesn't exist in v3** (it may not have existed in v2 either — it was tolerated because of a `using` alias on the next line). The real namespace is `PepperDash.Essentials.Devices.Common.Displays`. Remove the dead `using`.
32
+
33
+
All three are now documented in the v3-migration package's `context/v2-to-v3-changes.md`, the auto-attached `.github/instructions/v3-migration.instructions.md`, and the `update-device-class` skill, so subsequent migrations should catch them up front.
34
+
35
+
## What Was NOT Changed
36
+
37
+
-**Join maps** — `LgDisplayBridgeJoinMap : DisplayControllerJoinMap` was verified end-to-end and needed no edits. Active joins are well-formed; the file contains many commented-out joins that already live on the base class — left as-is.
38
+
-**Bridge wiring** — `LinkToApi` in both controllers uses the v3-correct pattern (constructor with `joinStart`, null-checked `bridge.AddJoinMap`, `joinMap.X.JoinNumber` references, `SetCustomJoinData` for custom overrides).
39
+
-**Communication / monitor / feedback patterns** — unchanged from v2; v3 uses the same `IBasicCommunication`, `GenericCommunicationMonitor`, `BoolFeedback`/`StringFeedback` shapes.
40
+
-**`IrStandardCommands`** kept as a `public static class` with a `public static Dictionary<…>` lookup. Logging on the lookup miss path was removed entirely (see Items for Review #2).
41
+
42
+
## Items for Tech Lead Review
43
+
44
+
1.**Log placeholder bug fix at `LgDisplayController.cs` line 1162.** The original code was `Debug.LogVerbose(this, "...{1}: {0}", e, s)` — the message-template indices were inverted relative to the argument order, so the logged message would have rendered swapped. Migrated to `this.LogVerbose("...{Value}: {Error}", s, e)`, which now renders the values in their intended positions. **This changes runtime log output**. Confirm the new ordering is what was intended (it almost certainly is, but flagging because we can't know for sure).
45
+
2.**`IrStandardCommands.GetCommandValue` log call removed entirely** rather than downgraded. It's called every time the IR controller looks up a command, which is high-frequency. Removed per user preference for reducing repetitive log volume on hot paths. If you want a one-time warning when an unknown command is requested, that would need to be added back at the call site.
46
+
3.**Pinned to a prerelease NuGet version: `PepperDashEssentials 3.0.0-dev-v3-testing.13`** in the `.csproj` and both factory `MinimumEssentialsFrameworkVersion` strings. There is no stable `3.0.0` on the feed yet. When a stable v3 ships, all three locations need to be repinned.
47
+
4.**Marker interface removal** kept the `Input*()` concrete methods. They're still public — only the interface contract is gone. If anything in the broader framework still consumes `IInputHdmi1` as a discovery mechanism (unlikely, since the interface itself is gone), that consumer would also need updating. We did not survey downstream consumers in this session.
48
+
49
+
---
50
+
51
+
**Suggested next step:** review items 1 and 2, then merge `feature/migrate-to-v3-essentials` once the stable v3 NuGet pin is available (or merge now if the prerelease pin is acceptable for testing).
0 commit comments