Running rethink for LG ThinQ2 window ACs on Synology Docker/Portainer (WIN_056905_WW) #74
Technickly90
started this conversation in
General
Replies: 1 comment
-
|
Thanks for the guide, I hope it will be helpful for other users. Provisioning via the official app is not an ideal solution and I'd like to find the root cause, instead of directing users to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Running anszom/rethink for LG ThinQ2 ACs on Synology Docker/Portainer
This writeup documents the process used to get
anszom/rethinkworking locally for LG ThinQ2 window air conditioners using a Synology NAS, Docker/Portainer, OpenWrt DNS overrides, Synology iptables redirects, and the official LG ThinQ app for pairing.The working test units were LG dual-inverter window air conditioners. They identified in rethink logs as:
The key discovery was that direct provisioning through rethink was not the working path for these ThinQ2 units. The AC would contact rethink at
/route, then stop. The working method was to start pairing through the official LG ThinQ app, temporarily redirect the LG common endpoint during the actual provisioning step, and have rethink route the device to a localrethink.lgthinq.comhostname.The official-app pairing method was based on this GitHub comment:
#25 (comment)
The key idea from that comment is that ThinQ2 devices do not necessarily need to be provisioned directly through rethink. Instead, begin setup in the official LG ThinQ app, temporarily redirect the LG common endpoint during provisioning, and let the appliance receive a rethink route that points it to the local rethink server.
Example environment
Replace these addresses with your own.
The final working network path is:
The reason for the Synology redirect is that the LG AC expects HTTPS on standard port
443, but Synology DSM commonly already uses host port443. Instead of binding Docker directly to host port443, Docker exposes rethink on host port4433, and an iptables redirect sends only the ACs HTTPS traffic from443to4433. This avoids interfering with DSM HTTPS access.Portainer stack / Docker Compose
Do not use
network_mode: hostand do not publish directly as443:443/tcpunless you know DSM is not using host port 443.rethink config.json
Mounted at
/volume2/NVME-Docker/rethink/data/config.json:{ "hostname": "rethink.lgthinq.com", "homeassistant": { "mqtt_url": "mqtt://192.168.0.200:1883", "discovery_prefix": "homeassistant", "rethink_prefix": "rethink" }, "ca_key_file": "ca.key", "ca_cert_file": "ca.cert", "https_port": 443, "mqtts_port": 8884, "mqtt_port": 1884, "thinq1_https_port": 46030, "thinq1_port": 47878, "management_port": 44401, "bridge": { "storage_path": "./state" }, "log": [ "status", "incoming", "HTTPS", "publish", "MGMT" ] }Verify the
/routeresponse advertises port 443:OpenWrt DNS entries
Permanent (always active):
Temporary (during pairing only):
The critical entry observed in packet captures was
/common.lgthinq.com/192.168.0.200. Remove temporary entries after pairing so the official LG app can reach the real LG cloud again.Correct pairing order with the official LG ThinQ app
The order matters. Adding
common.lgthinq.comtoo early breaks the official app./rethink.lgthinq.com/192.168.0.200active.Expected successful rethink logs
Failing pattern (stops here):
Successful pattern:
Synology iptables redirect rules
Each AC source IP needs a redirect rule from 443 to 4433:
sudo iptables -t nat -L PREROUTING -n -v --line-numbers | grep 4433Expected:
Scope rules to known AC IPs only.
Persistent redirect script
The script is idempotent (safe to run repeatedly). Add it as a Synology Task Scheduler boot-up task under root:
A recurring hourly task using the same script also protects against Docker/DSM reloads removing NAT rules.
Verification
Home Assistant MQTT discovery and WIN_056905_WW model support
After pairing, the devices published Home Assistant MQTT discovery and appeared as climate entities.
PR #73 was submitted to add full climate integration for
WIN_056905_WW, confirmed working on LW6023IVSM and LW1522IVSM:off,cool,dry,fan_onlylow,medium,highpreset_mode(wire value 8 on tag0x1f9)numberentity (0-7 hours)Note: the existing
WIN_056905_WW.tscontained an implementation for the LW1823HRSM, which has a different feature set (heat mode, swing, no medium fan, no eco). PR #73 flags this conflict for the maintainer to resolve.Notes
common.lgthinq.comDNS override after pairing./rethink.lgthinq.com/192.168.0.200active permanently.WIN_056905_WW(LW6023IVSM, LW1522IVSM). The Synology/Docker/DNS/redirect pattern should apply to other ThinQ2 devices.Beta Was this translation helpful? Give feedback.
All reactions