WIN_056905_WW: Add LG Window AC support (LW6023IVSM, LW1522IVSM)#73
WIN_056905_WW: Add LG Window AC support (LW6023IVSM, LW1522IVSM)#73Technickly90 wants to merge 1 commit into
Conversation
Implements full HA climate integration for the WIN_056905_WW family of LG window air conditioners, confirmed working on: - LG LW6023IVSM (6,000 BTU) - LG LW1522IVSM (14,000 BTU) Protocol findings (via live packet capture): - Frame discriminator: buf[6]=0xa7 (vs 0x87 on RAC/POT units) - Tag 0x1f7: power (0=off, 1=on) - Tag 0x1f9: mode (0=cool, 1=dry, 2=fan_only, 8=eco/Energy Saver) - Tag 0x1fa: fan speed (2=low, 4=medium, 6=high) - Tag 0x1fd: current temperature (raw/2 = °C) - Tag 0x1fe: set temperature (raw/2 = °C, clamped 16–30°C) - Tag 0x21a: sleep timer (raw value in minutes) Features implemented: - HVAC modes: off, cool, dry, fan_only - Fan modes: low, medium, high - Eco/Energy Saver mode via HA preset_mode (maps to mode wire value 8) - Sleep timer as a number entity (0-7 hours, slider) - Current and target temperature Notes: - Eco mode (mode=8) is exposed as a climate preset rather than an hvac_mode, since HA only accepts standard hvac_mode values - Off is handled by writing tag 0x1f7 (power) rather than mode - Sleep timer write_xform converts hours to minutes for the wire value - tlv_device.ts: accept 0xa7 as a valid frame kind alongside 0x87 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Heads up: potential conflict with LW1823HRSMAfter submitting I noticed the original Key differences:
Happy to split these into two separate files with aliases in |
|
Related discussion with full setup notes (Synology/Docker/DNS/pairing process): #74 |
|
My guess is that the underlying principle is similar to what we have observed for RAC_056905_WW, the AC reports some capability bits that can be used to determine which features are available. @maciejsszmigiero has found some way to decode these, maybe his findings would be applicable here. Actually, from what I can see, the TLV identifiers in your commit match RAC_056905_WW perfectly - can you try running the RAC_056905_WW integration for your device (simply map |
|
Note: this is my first foray into claude code, so it is kind of just chugging along lol, sorry if it all sounds really robotic. Looking at this more carefully, merging WIN into RAC makes more sense than the other direction. RAC already has the right architecture — caps detection, dynamic feature enable/disable, filter management, ODU sensors — and WIN would inherit all of that correctly, since its caps bits ( The differences between WIN and RAC are narrow and parameterizable:
A WIN subclass of RAC that overrides the fan/mode tables and sleep timer detection would get all of RAC's infrastructure for free. Would that be the preferred pattern here, or would you rather see a single merged file with conditional value tables? Happy to rework the PR whichever way fits best. |
AFAIK some RAC models also support 16°C for heating - this can be autodetected via tags 0x2e1 - 0x2ec at least on RAC, at least on some models.
Does setting sleep timer makes WIN enable ultra-low fan speed and makes the AC automatically bump set temperature by 2 Celsius after 1 hour? If not then this is not a sleep timer, this is turn-off timer.
Does RAC filter management actually work on WIN? Do you see the filter usage counter increasing? Do you see other RAC parameters being correct on WIN? I'm especially asking about the reverse engineered ones - nominal capacity, EEV opening, pipe and ODU temperature sensors. |
My hunch is that RAC & WIN are essentially the same device, and we can extend the RAC implementation to cover both, if we implement all the capability flags correctly. This would be the preferred direction. |
It does both, it sets it to ultra low fan speed and bump the temp, but also turns off the unit after the timer ends
This is not showing in the WIN driver, would have to test
Here are RAC related sensors: Several RAC sensors DO appear in the WIN values response. Here's what's meaningful and what isn't: Present and likely correct:
Present but misleading:
Not present at all (as expected):
So most of the RAC sensors carry over meaningfully, with the RAC's addOptionalSensorField pattern naturally handling the pipe temps by simply not adding them. The only |
~ 33 C so plausible with the unit running in summer.
~ 23 C so also plausible in summer. But these probably need more testing, like whether these temperatures match each other once the unit has been idle for some time, whether they match during lower temperatures in the night, etc.
If that's 6 kBTU / hour unit then the value in this tag is wrong. |
I'll have to do more testing, I have two 14k BTU units and a single 6k unit connected currently so i'll have to distinguish between them or try exposing them to HA for easier viewing/labeling. It is about 92F outside here so my house is sitting around 75-80F. I'll also have to try adding these units locally again vs. the official app method and see if I can narrow down where the pairing fails. |
So it's 33 C then. The 23 C alleged outside air temperature looks a bit suspicious in these conditions. |
|
I’m following the I have an LG LW1022IVSM that also reports I don’t want to create extra review churn or open a parallel implementation if you’d rather centralize the data here. Would it be most useful for me to share the sanitized fixtures/test expectations in this thread, open a small draft PR referencing this PR, or wait and adapt after the RAC/WIN shape is decided? I’m happy to follow whatever path is easiest to review. |
Summary
Implements full Home Assistant climate integration for the
WIN_056905_WWfamily of LG window air conditioners.Confirmed working on:
Features
off,cool,dry,fan_onlylow,medium,highpreset_mode(wire value 8 on tag 0x1f9)numberentity (0–7 hours, slider UI)Protocol findings (from live packet captures)
Key difference from RAC/POT: Frame discriminator is
buf[6]=0xa7instead of0x87. One-line fix intlv_device.tsto accept both variants.Design notes
preset_moderather than anhvac_mode, since HA only accepts standard HVAC mode values. When eco is active thehvac_modereports ascoolandpreset_modereports aseco.Tests
Unit test added at
tests/cloud/devices/WIN_056905_WW.test.tsusing real captured packet data. All 183 tests pass.