Skip to content

Initial Support for GML844PZKZ Multi-Door Slim Refrigerator - #96

Open
flecke-m wants to merge 14 commits into
anszom:masterfrom
flecke-m:master
Open

Initial Support for GML844PZKZ Multi-Door Slim Refrigerator#96
flecke-m wants to merge 14 commits into
anszom:masterfrom
flecke-m:master

Conversation

@flecke-m

Copy link
Copy Markdown

Adding device 2REF12EII_P_2 to ha_bridge.ts and its own file.

Supported settings are freezer temperature, fridge temperature, express freeze and Pure N Fresh filter settings. Additionally door open/close is working as well.

Every functionality has been tested through bridge mode comparing the LG App vs. Home Assistant.

Added test file to complete the pull request.

flecke-m and others added 10 commits July 15, 2026 08:42
rebase my feature branch
…protocol capture

Replace the skeleton placeholder for model 2REF12EII_P_2 with a fully
validated implementation derived from live packet captures
(my_fridge_study.jsonl, my_fridge_study2.jsonl).

Protocol details (0x10EC status, 9-byte blocks):
- Fridge temperature: direct °C at byte[1] (no conversion needed)
- Freezer temperature: raw encoding at byte[2], formula °C = -(raw + 15)
  Verified against cloud: raw 3 → -18°C, raw 4 → -19°C
- Express Freeze: byte[3] (0x01=off, 0x02=on)
- Door state: byte[4] from 0x10EC; separate 0x10A8 door-only updates
  (0x00=closed, 0x02=open)

Command (0xF017, truncated 43-byte payload):
- Byte[1] = fridge setpoint °C
- Byte[2] = freezer raw value
- Byte[3] = express freeze toggle
- Byte[8] = ack flag (0x01 for temperature changes)

Changes:
- Remove unused convertFreezerTemperature/convertFridgeTemperature imports
  (this model uses direct °C / simple offset, not the shared converters)
- Add express_freeze switch to Home Assistant device discovery config
- Implement setProperty for fridge_setpoint, freezer_setpoint, and express_freeze
- Register 2REF12EII_P_2 in ha_bridge.ts device type map
The pure_option value was written to body index 10 instead of index 6,
which is where the device actually reads it from live captures. This caused
set commands to silently fail — the value was going to an ff filler byte.

Also cleaned up all setProperty offsets to use direct indices instead of
the misleading '2+N' notation, and corrected the protocol comment header.
Door open is signaled by byte[3]=0x01, not 0x02 as the stale comment
claimed. With the wrong threshold, the sensor always reported closed.
Covers status parsing from 0x10EC frames, door state via 0x10A8,
duplicate suppression, frame validation, and all outgoing F017 commands
(fridge/freezer setpoints, express freeze, pure N Fresh options).
All test fixtures derived from live capture data.
@anszom

anszom commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Does this model support Fahrenheit temperatures? if so, then it would be good to include support for this as well.

@flecke-m

Copy link
Copy Markdown
Author

I can see a Fahrenheit Symbol in the Display, but I have double checked the ThinQ App and as well conducted the manual, both do not show a Fahrenheit support. The fridge itself also has on the full model number the suffix EUR, which most likely stands for Europe. So I assume it is not supported.

So far I investigated all values with your tool to comment and intercept the traffic within bridge mode. I will also do a second round of investigation with ingesting data to the cloud and see what happens, but currently I ran a bit out of time.

@anszom

anszom commented Jul 26, 2026

Copy link
Copy Markdown
Owner

I've squashed your commits to branch 2REF12EII_P_2. I've also removed the references to some of your development files, I hope you don't mind.

I'd like to make some changes before merging. I was hoping you could make these because I don't have a device to verify against.

  1. The fridge status block appears to match packStatus & unpackStatus from fridge_common.ts. This would clarify the "ack flag" which is actually the temperature unit. It would be better to use these common functions instead of managing byte offsets manually.
  2. The door state should be extracted from the status block as well, this way it will be correct at startup.
  3. The _F017 command buffers in the test file are not referenced (this was made more obvious when I removed the captures() wrapper). On top of that, one of them is one byte longer than the header would suggest, and doesn't seem to match the freezer setpoint write at all. Please re-check this - and - preferably - rewrite the test to match against the captured packet.

@flecke-m

Copy link
Copy Markdown
Author

Thank you, I will have a more thorough look at it with the background you have shared. I will then commit the code to the separate branch you created. It is very helpful.

flecke-m added 3 commits July 31, 2026 10:56
…ter sensors for 2REF12EII_P_2

Refactorings (restore CHANGELOG_RETHINK_2026-07-29):
- Replace raw byte-offset decoding with unpackStatus() from fridge_common
  for named STATUS_FIELDS access instead of magic indices
- Decode door state from 0x10EC status block (byte[7]=anyDoorOpen) so
  the entity is correct at startup, not just on separate 0x10A8 frames
- Fix broken FREEZER_SET_M18C_F017 test capture (44b -> correct 43b body)
- Rename misleading "ack flag" comment to tempUnit (C=0x01)

New entities:
- sensor.pure_n_fresh_replace (diagnostic): shows 'replace' when byte[4]=0x04,
  otherwise 'OK'. Value 4 is the fresh-air-filter replacement indicator per
  wiki Appliance:2RES1VE61NFA2 which defines options 1-3 as control modes and
  4 as a replace indicator.
- sensor.water_filter (diagnostic, months): raw month counter from byte[6]

Tests updated to reflect door-from-status-block behavior and new sensor coverage.
…entity initialization

Previously only door was guaranteed at boot via 0x10EC, but the device
does not always send that frame on connect (live captures show sessions
with only 0x10AF keepalives). The new entities pure_n_fresh_replace and
water_filter therefore stayed undefined until the first user command.

- start() now sends F0ED status query (consistent with 2REF11EBIVPC4)
- Added 0x10EB initial-status handler (9-byte variant)
- Updated start() test to expect F0ED instead of no-op
- Added 0x10EB test covering all seven entities populated at startup
- Full suite: 319/319 passing
- Add inputs/ to .gitignore and untrack CHANGELOG_RETHINK_2026-07-29.md
- Remove my_fridge_study*.jsonl references from 2REF12EII_P_2.ts comments
- Remove my_fridge_study*.jsonl reference from test file comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants