[NO LONGER MAINTAINED] MY GOD - Anyone attempted an LG ThinQ integration?

I'm not sure this app works with LG's latest's Wi-Fi refrigerator, washer and drier! When I tried it, the values returned so not change over time, making me think that the latest models are storing their state data somewhere else in the LG cloud?

Ho no :frowning: That's possible, because when i power it on it still reports status POWER OFF. :frowning:

Somebody could explain the certificate part of the LG app ? I don't understand that part.

This error isn't with your certificate, it is with the server's certificate. What country are you in? I have read online that their certificates are bad in certain countries. Unfortunately though, HE does not give us the ability to add additional trusted CAs nor can we tell it to ignore certificate validation for MQTT. So unfortunately, unless HE enhances their certificate management or gives us a way to allow invalid certs for MQTT (like they did for HTTP) (are you listening @gopher.ny :wink: ) I can't really do anything to fix this issue. It's an LG bug that HE doesn't let us work around.

I don't own a washer or dryer, but I have a dishwasher, fridge, and stove that are all only 3 months old and work fine. Newer devices actually work better as they are MQTT which is faster and more reliable. Can you ensure the debug logging is turned on and include some logs? It's hard to help without any details.

Thank you for your answer @dman2306. I'm new to HE so sometimes I don't understand all terms..

I live in Canada and here is the log I get:

dev:6062021-01-15 06:21:04.643 warnSÉCHEUSE Lost connection to MQTT, retrying in 15 seconds MqttException (0) - javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: TLS Server certificate issued after 2019-04-16 and anchored by a distrusted legacy Symantec root CA: CN=VeriSign Class 3 Public Primary Certification Authority - G5, OU="(c) 2006 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US

dev:6062021-01-15 06:21:03.488 debugSÉCHEUSE mqttConnectUntilSuccessful()

dev:6062021-01-15 06:20:48.475 warnSÉCHEUSE Lost connection to MQTT, retrying in 15 seconds MqttException (0) - javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: TLS Server certificate issued after 2019-04-16 and anchored by a distrusted legacy Symantec root CA: CN=VeriSign Class 3 Public Primary Certification Authority - G5, OU="(c) 2006 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US

dev:6062021-01-15 06:20:47.119 debugSÉCHEUSE mqttConnectUntilSuccessful()

dev:6062021-01-15 06:20:32.083 warnSÉCHEUSE Lost connection to MQTT, retrying in 15 seconds MqttException (0) - javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: TLS Server certificate issued after 2019-04-16 and anchored by a distrusted legacy Symantec root CA: CN=VeriSign Class 3 Public Primary Certification Authority - G5, OU="(c) 2006 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US

dev:6062021-01-15 06:20:31.031 debugSÉCHEUSE mqttConnectUntilSuccessful()

--- Live Log Started, waiting for events ---

My LG Refrigerator (LMXS30796D-00 5-2019) does not accurately report any of the Current States in the device of the LG refrigerator as shown below. The returned JSON string shown never changes the values on each poll, and refrigerator temps 13/8 are not even close to either F or C for the refrigerator? I have the latest app and devices from the github.

dev:15062021-01-15 08:08:00.560 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

image

dev:15062021-01-15 08:07:47.839 am debugLG Refrigerator initialize()

On the upside, reinstalling the ThinIQ on an Android phone and installing the brand new drier and washer appear to be getting correct device states. So 2 for 3 is not a bad batting average...

And are you in the US ?

Can I get a small code example where it fails? It doesn't need to do anything meaningful.
The usual "no promises whatsoever" disclaimer applies.

2 Likes

@jbilodea

Yes, USA! The ThinIq app, according to LG Technical Support was first developed for Android users and subsequently ported to iOS with known issues they are working on. Luckily I had an old Android phone from a development project years ago, that I could load the ThinIq app The android app paired the LG Washer and Drier first try, much easier than the iOS app. The iPhone X ThinIq app did not work for the washer and drier and I have an active LG support ticket they are working on to analyze the iOS debug output from the ThinIq app.

It was LG's recommendation to try the Android client, even through my LG refrigerator registered as expected using the iPhone ThinIq app in 5/2019.

Who knows, anyhow, all three LG devices are registered to the ThinIq client, but only the LG refrigerator is not reporting accurate data from the HE app. But the ThinIq iOS app shows the correct temps of the refrigerator so I know it is connected to ThinIq!

Good to know, I'm using IOS. My wife used the washer and the dryer for the first time. Both machines are connected to the app but I received a notification only from the dryer when it completed, not from the washer. I'm thinking about chatting with LG about that.

1 Like

Sure can! I'll throw something together this weekend. Basically though it has to do with using MQTTS where the server's cert is self-signed or otherwise invalid. On the httpGet methods there is an ignoreSSLIssues option but no such similar option for MQTT.

The json is neither C nor F it's an enumerative value that I have to convert to C/F. When you went through the initial setup the logs would have shown something like "MODEL JSON PLEASE POST TO THREAD" can you post that line? It will help me track down why it is unable to convert you device attributes.

@gopher.ny here's a pretty basic sample using the Mosquitto test server. Their server, when you connect to port 8887, has an intentionally expired certificate. Unfortunately in the world of IOT bad certs are the norm :frowning: which is why they offer a test serve for this exact scenario. What would be awesome is, if interfaces.mqtt.connect offered a way to say "ignore SSL errors" just like exists for the http*() methods where you can specify ignoreSSLIssues to... well ignore SSL issues! If you use port 8883 for a valid, but self-signed cert.

metadata {
    definition (name: "MQTTSSLErrorSample", namespace: "dcm", author: "dmeglio") {
		capability "Initialize"
    }
}

def initialize() {
    try
    {
        interfaces.mqtt.connect("ssl://test.mosquitto.org:8887", "xyzclientid", "username", "password", cleanSession: false)
    }
    catch (e) {
       log.debug e
    }
}

def installed() {
initialize()
}

def mqttClientStatus(String message) {
    log.debug message
}

def parse(String message) {
    log.warn message
}
1 Like

Did a little research. Tech moves fast. It’s not because your fridge is new. It’s because it’s old even though it’s from 2019! If you send that model json I can fix it. You’re the first person with an old style mqtt fridge so I didn’t have access to that json to map the fields. It’s fixable if I can get a copy of it

1 Like

Thanks @dman2306,

If you can get this LG refrigerator (Model LMXS30796D-00) to work in your ThiniQ Integration app that would be awesome!!!! Our brand new LG Drier ( Model: DLEX7900BE) and LG Washer (Model: WT7900HBA) are reporting perfectly all the currentStates...

Here are the 3 LG devices that are created when I setup the app.

MODEL JSON -- PLEASE POST IN THREAD https://objectstore.lgthinq.com/fdc1d9e0-8241-4f8c-bc3a-16f5a4625ee8?Expires=1615097291&Signature=ny1n1Yu7ueev4uknqB0xauiAdfydVf2Ur8QUFHGx02zSrungmu3F8UZP7hBdqxMdnpKB0yKRySf2pwtH-HpHNZowzKyUSNAIDbI32KY9WrQyyzJ58WuMfH0M5eMyjW759m~SZMR-GfUZHUJ6Fm4G38yHfVnrazLMngj0wz-4TFigmuwrxxmkXJ1Ge7CWvDrBroqGmPsaAiRx8sgmtHFf4cIM-LkHSMOtOpRdVQTskjgI27f8LicS3PmyVncpyvdWQv0At7F~Aqc2U3aO9NeasWq26Kh7KrLP9KSby6yyB9XldrhkXSt~8BFrSaPuf84UJB788pdKesTulbneZjtu7A__&Key-Pair-Id=APKAI74R6YENXPGRIWLQ

[app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:28.962 am [debug](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration getModelJson(https://objectcontent.lgthinq.com/984ea019-6ed4-4138-b0ad-a093501acc7a?hdnts=exp=1668761472~hmac=bba051f8aa240e0346b9bd766c90d757d60e137c7f1ecf3d68bfe6e33e698313)

MODEL JSON -- PLEASE POST IN THREAD https://objectcontent.lgthinq.com/984ea019-6ed4-4138-b0ad-a093501acc7a?hdnts=exp=1668761472~hmac=bba051f8aa240e0346b9bd766c90d757d60e137c7f1ecf3d68bfe6e33e698313

[app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:28.748 am [debug](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration getModelJson(https://aic.lgthinq.com:46030/api/webContents/modelJSON?modelName=1REF12EIIFA__&countryCode=WW&contentsId=JS0214074703379713&authKey=thinq)

MODEL JSON -- PLEASE POST IN THREAD https://aic.lgthinq.com:46030/api/webContents/modelJSON?modelName=1REF12EIIFA__&countryCode=WW&contentsId=JS0214074703379713&authKey=thinq

[app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:28.738 am [info](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration Found 3 devices

I did notice one error line in the debug log during setup, not sure that is an issue affecting the device.

[app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:23.847 am [debug](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration lgAPIPost(https://aic-service.lgthinq.com:46030/v1/service/users/client, null)

[app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:23.112 am [debug](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration getAccessToken([refresh_token:862eee95dacaa646e51c65d484a1fc97ee878e48290259aec4a484e0ca37458ed134cd85653da28d659948de50db784c, grant_type:refresh_token])

[==>] [app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:23.109 am [error](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration lgAPIPost(https://aic-service.lgthinq.com:46030/v1/service/users/client, null) - groovyx.net.http.HttpResponseException: 400 - [resultCode:0102, result:]

[app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:22.449 am [debug](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration getStandardHeaders() - headers: [Accept:application/json, x-client-id:a09b0aeedb3346a2bb3e7dcf2687d712c54008ca2bdd49e5936209b69ec5801d, x-country-code:US, x-language-code:en-US, x-message-id:VJMcbWuRSy2XMqMupH30kA, x-api-key:VGhpblEyLjAgU0VSVklDRQ==, x-service-code:SVC202, x-service-phase:OP, x-thinq-app-level:PRD, x-thinq-app-os:ANDROID, x-thinq-app-type:NUTS, x-thinq-app-ver:3.0.1700, Host:aic-service.lgthinq.com:46030, x-emp-token:5fcf047b3a53d6cfef8c8303bec341e700c2adf13d70e408dfa0f4c6d90a1ae2e3f9ddca6f473fd727c8997d75a6e177, x-user-no:US1905255403695]

[app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:22.445 am [debug](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration lgAPIPost(https://aic-service.lgthinq.com:46030/v1/service/users/client, null)

[app:1026](http://10.0.0.80/logs#app1026)2021-01-16 05:51:22.442 am [debug](http://10.0.0.80/installedapp/configure/1026)ThinQ Integration register()

The LG refrigerator's json string never changes the returned value(s) for each poll. Initially, when I observed the returned JSON in the debug with no returned fields for the device, I checked your DTH and temporarily modified the json parse section to map it into the correct fields as expected. But then I quickly realized the temperature values never changed and the values were not correct for either F->C or C->F.

2021-01-16 05:26:26.880 am infoSuccessfully connected to RTI: [returnCd:0000, returnMsg:OK, stateCode:S, workId:n-695966d0-13a2-11e9-bf05-0051eddb96de, deviceState:E, timestamp:0]

dev:15062021-01-16 05:45:00.598 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

dev:15062021-01-16 05:44:00.625 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

dev:15062021-01-16 05:43:00.636 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

dev:15062021-01-16 05:42:00.671 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

dev:15062021-01-16 05:41:00.572 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

dev:15062021-01-16 05:40:00.637 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

dev:15062021-01-16 05:39:00.655 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

dev:15062021-01-16 05:38:00.640 am debugLG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

Cool, that's what I needed! Out of curiousity, if you open on of the doors, does the DoorOpenState:CLOSE change to OPEN in the logs? Just want to make sure you're getting status updates evben though they aren't on the device page (yet). I'll take a look this weekend.

Great!

Yes, you are right. I did not see this door state update before in all the log posts for the app. I AM getting device updates, as the DoorOpenState did change when I keep the door open... Yahoo. I am connected!

@dman2306: If you want (since I have some time today), I can fork your DTH code for this device and make the changes in the "LG ThinQ Fridge" to map the json as you do other LG models. I will push the updated version back to your master repository for your inclusion in a next regular update and testing. Either way works for me, just didn't want to eat up your valuable time if I am the only one with this model of LG....

I look forward to your app invoking HE's TTS to tell me to, 'Back away from the refrigerator, close the door, have some self control Kurt..' when I go on a uncontrolled snack binge outside of regular meal time... HA!

Debug Output

[dev:1506](http://10.0.0.80/logs/past#dev1506)2021-01-16 11:31:00.651 am [debug](http://10.0.0.80/device/edit/1506)LG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

==> [dev:1506](http://10.0.0.80/logs/past#dev1506)2021-01-16 11:30:01.095 am [debug](http://10.0.0.80/device/edit/1506)LG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:OPEN, TempUnit:˚F])

[dev:1506](http://10.0.0.80/logs/past#dev1506)2021-01-16 11:29:00.623 am [debug](http://10.0.0.80/device/edit/1506)LG Refrigerator processStateData([TempRefrigerator:13, TempFreezer:8, IcePlus:@CP_OFF_EN_W, FreshAirFilter:@RE_STATE_FRESH_AIR_FILTER_MODE_AUTO_W, SmartSavingMode:@RE_TERM_DELAY_DEFROST_CAPABILITY_W, WaterFilterUsedMonth:0, DoorOpenState:CLOSE, TempUnit:˚F])

ThinQ App

Thanks, I'm actually already playing with it. I don't think it'll be a ton of work to get this resolved.

1 Like

If you get a minute, could you confirm this at least reports the door open/close and other values (everything except temp?) GitHub - dcmeglio/hubitat-thinq at fridge-fixes

I have to figure out the temp conversion for your fridge but wanted to at least make sure this was working to communicate.

I assume we are still dead in the water in canada when we get this certificate error? I just tried the integration got the same error

As I understood, @gopher.ny will try something. I'd love if somebody could find a fix since I can't.

1 Like