LG Thinq Binding

Still no luck yet.
Reinstalled the binding now version bundle org.openhab.binding.lgthinq:4.3.0.202411172134 and rebooted openHAB

Configuration

UID: lgthinq:bridge:94580c042c
label: LGThinQ GW Bridge
thingTypeUID: lgthinq:bridge
configuration:
  manualLanguage: en-NZ
  country: --
  password: ********
  pollingIntervalSec: 86400
  language: --
  manualCountry: NZ
  username: ********@gmail.com

Log:

2024-11-18 12:20:06.022 [DEBUG] [al.discovery.LGThinqDiscoveryService] - bundle org.openhab.binding.lgthinq:4.3.0.202411172134 (304)[org.openhab.binding.lgthinq.internal.discovery.LGThinqDiscoveryService(417)] : Found activate method: public void org.openhab.core.config.discovery.AbstractThingHandlerDiscoveryService.activate(java.util.Map)
2024-11-18 12:20:06.024 [DEBUG] [al.discovery.LGThinqDiscoveryService] - bundle org.openhab.binding.lgthinq:4.3.0.202411172134 (304)[org.openhab.binding.lgthinq.internal.discovery.LGThinqDiscoveryService(417)] : invoking activate: activate: parameters [org.apache.felix.scr.impl.helper.ReadOnlyDictionary]
2024-11-18 12:20:06.030 [DEBUG] [al.discovery.LGThinqDiscoveryService] - bundle org.openhab.binding.lgthinq:4.3.0.202411172134 (304)[org.openhab.binding.lgthinq.internal.discovery.LGThinqDiscoveryService(417)] : invoked activate: activate
2024-11-18 12:20:06.032 [DEBUG] [al.discovery.LGThinqDiscoveryService] - bundle org.openhab.binding.lgthinq:4.3.0.202411172134 (304)[org.openhab.binding.lgthinq.internal.discovery.LGThinqDiscoveryService(417)] : Changed state from satisfied to active
2024-11-18 12:20:06.050 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'lgthinq:bridge:94580c042c' changed from UNINITIALIZED (NOT_YET_READY) to INITIALIZING
2024-11-18 12:20:06.056 [DEBUG] [nternal.handler.LGThinQBridgeHandler] - Initializing LGThinq bridge handler.
2024-11-18 12:20:06.070 [TRACE] [ing.lgthinq.lgservices.api.RestUtils] - GET request: https://route.lgthinq.com:46030/v1/service/application/gateway-uri
2024-11-18 12:20:07.056 [TRACE] [ing.lgthinq.lgservices.api.RestUtils] - GET response: {"resultCode":"0003","result":""}
2024-11-18 12:20:07.063 [DEBUG] [nternal.handler.LGThinQBridgeHandler] - Error accessing LG API. Updating Bridge Status to OFFLINE.
2024-11-18 12:20:07.096 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'lgthinq:bridge:94580c042c' changed from INITIALIZING to OFFLINE (COMMUNICATIHave alON_ERROR): @text/error.lgapi-communication-error
2024-11-18 12:20:08.060 [TRACE] [ing.lgthinq.lgservices.api.RestUtils] - GET request: https://route.lgthinq.com:46030/v1/service/application/gateway-uri
2024-11-18 12:20:08.272 [TRACE] [ing.lgthinq.lgservices.api.RestUtils] - GET response: {"resultCode":"0003","result":""}
2024-11-18 12:20:08.273 [DEBUG] [nternal.handler.LGThinQBridgeHandler] - Error accessing LG API. Updating Bridge Status to OFFLINE.

I have also tried with the American and British English language options and get the same error.

Thanks.

EDIT Adding Exception message:

13:11:35.205 [TRACE] [ding.lgthinq.lgservices.api.RestUtils] - GET request: https://route.lgthinq.com:46030/v1/service/application/gateway-uri
13:11:35.419 [TRACE] [ding.lgthinq.lgservices.api.RestUtils] - GET response: {"resultCode":"0003","result":""}
13:11:35.424 [DEBUG] [internal.handler.LGThinQBridgeHandler] - Error accessing LG API. Updating Bridge Status to OFFLINE.
org.openhab.binding.lgthinq.lgservices.errors.LGThinqGatewayException: Error trying to discover the LG Gateway Setting for the region informed
        at org.openhab.binding.lgthinq.lgservices.api.TokenManager.oauthFirstRegistration(TokenManager.java:101) ~[bundleFile:?]
        at org.openhab.binding.lgthinq.internal.handler.LGThinQBridgeHandler$PollingRunnable.run(LGThinQBridgeHandler.java:137) [bundleFile:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.lang.IllegalStateException: Expected HTTP OK return, but received result core:{"resultCode":"0003","result":""}
        at org.openhab.binding.lgthinq.lgservices.api.LGThinqOauthEmpAuthenticator.discoverGatewayConfiguration(LGThinqOauthEmpAuthenticator.java:116) ~[bundleFile:?]
        at org.openhab.binding.lgthinq.lgservices.api.TokenManager.oauthFirstRegistration(TokenManager.java:98) ~[bundleFile:?]
        ... 7 more

Ok. A fixed the manual configuration map error. Can you get the last build and try again ?

Regards

1 Like

Thank you so much that fixed it.
Gateway is now online and has discovered Fridge and Washing Machine.

I really appreciate your help.

Hello!

Had a few busy days.

Tested it with Openhab 4.2.0 container and addonstore version 0.2.

Works like a charm now!

Thank you for your hard work! :muscle:

1 Like

Hello,

I just update last version of binding and i have some problem with LG Refrigerator …
For “Fridge Setpoint Temperature” it’s show me “NULL” (before update everything was ok).

A proposal for this binding - can you see if there are some errors and related error code ?
Thanks for your work!

If you updateD to the latest version, you have to remove all the lg thinq binding from OH and rediscovery them again. It’s because there are changes in the channel’s and property names. tHE “NULL” value should be related with this case.

About the Error/Error code related, what do you mean about it ? Notice that I can map any information present in the snapshot (status information) of the device, but I don’t think there is some Error Code or similar related to the refrigerator’s descriptor. Some other devices have the Error Code related to the descriptor like washer machines, dryer, dishwasher but not Refrigerator.

What I can see in the LG App, is that you can run a Diagnoses Process to analise some issue in the device, but it’s not a kind of data I receive monitoring the device. It’s a process executed manually by the App. In theory, it’s possible to fire from the binding the Diagnoses Process, but I don’t know how to fit this in the OH’s thing framework. Actually, it’s not part of the scope for now.

I make this 2 times - remove all about old thing and rediscovery and the result is the same … NULL value for “Fridge Setpoint Temperature”. All other variables are ok …

Thank you!

Someone use this binding for LG Refrigerator ??? and can confirm that value for “Fridge Setpoint Temperature” is in range (1…7).
After many uninstall, clear, install, discover i still have the same error for this parameter “Fridge Setpoint Temperature”, all other parameters are correct …

Thank you!

Hello,
@nemer , with this last version of binding (org.openhab.binding.lgthinq-4.3.0-SNAPSHOT.jar), for LG Refrigerator there are some errors when you try to set new value for fridge temp and freezer temp:

Blockquote
2024-12-13 09:56:29.040 [WARN ] [nternal.handler.LGThinQFridgeHandler] - Command 1 to the channel dashboard#fridge-temperature not supported. Ignored.
2024-12-13 09:56:34.945 [WARN ] [nternal.handler.LGThinQFridgeHandler] - Command 2 to the channel dashboard#fridge-temperature not supported. Ignored.
2024-12-13 09:56:35.706 [WARN ] [nternal.handler.LGThinQFridgeHandler] - Command 3 to the channel dashboard#fridge-temperature not supported. Ignored.
2024-12-13 09:59:02.347 [WARN ] [nternal.handler.LGThinQFridgeHandler] - Command 4 to the channel dashboard#fridge-temperature not supported. Ignored.
2024-12-13 09:59:07.521 [WARN ] [nternal.handler.LGThinQFridgeHandler] - Command 3 to the channel dashboard#fridge-temperature not supported. Ignored.
2024-12-13 09:59:20.124 [ERROR] [nternal.handler.LGThinQFridgeHandler] - Temperature value informed can’t be converted based on the cap file. It mostly like a bug
2024-12-13 09:59:37.087 [ERROR] [nternal.handler.LGThinQFridgeHandler] - Temperature value informed can’t be converted based on the cap file. It mostly like a bug

with previous version (org.openhab.binding.lgthinq-4.2.0-SNAPSHOT.jar) reading value and changing value for temp fridge and freezer work ok …

I found a bug in the Refrigerators device. I’m fixing it and let you know when it’s done.

Thanks for your work on this binding. I hope to be able to contribute to it when I find time to - in the meantime, I have two points I’d like to bring up:

  • One, the password is stored in plaintext in the ‘code’ view. Ideally this could be hashed somehow, just to provide at least one layer of obfuscation.
  • Two, I’m seeing the following in the logs:
2024-12-17 22:15:39.665 [WARN ] [ices.LGThinQAbstractApiClientService] - Error calling device settings from LG Server API. HTTP Status: 400. The reason is: 0110 - Update Agreement Terms in LG App

It’s not a bug on your end, since all I need to do is open the app to accept the changes, but it would be helpful if there was somewhere in the UI/bridge where you could indicate this to the user.

Fixed.
If you installed from Add-on Store, remove and reinstall it. If you installed manually, get the latest version from my repository
After that, remove the Thing and itens associated to the Refrigerator’s device and discovery again.

Merry Christmas

I “think” I fixed the message to be described in the OFFLINE message at the Binding/Bridge Status. But, as it just occur when we have an event of agreement update, I can’t test it in a easy way.
About the clear text password in the bridge configuration file, I have some considerations:

  1. Since the code is an opensouce, there is no safe encryption to keep the password safe
  2. Since I think OpenHab would be used in a home automated system, I don’t think it’s exposed public.
    So, because these points, I don’t think the effort to encrypt the password will make a difference to the audience for this opensource.
    Please, checkout the last version of the binding !

Marry Christmas

Awesome, thanks for the fix! I’ll be sure to let you know if it does happen again :smiley:

Also, I suppose that’s a fair assessment. If you’re not completely opposed to it, I might take a look and offer a PR sometime.

  • Eugene

Of course. You can send PRs

This could be an action method (can be fired from the UI)

@nemer thanks for putting in the work to develop this binding!

I have an LG dishwasher and just installed the binding. I wanted to note, that after I dropped it into my /usr/share/openhab/addons directory, I could see it was installed in mainUI->Add on store → Bindings → Other Bindings. I could also see it in the openhab console,

openhab> list | grep LG
337 │ Active │  80 │ 4.3.0.202501102046    │ openHAB Add-ons :: Bundles :: LG Thinq Binding

However, if I went to things and wanted to create a new thing, there was no option for this binding. I restarted my system (openhabian) and then it appeared as an option to create a new thing for this binding.

Now, I’ve created my bridge and it automatically found my only LG device, my dishwasher. Looking at the channels, I don’t see one for rinse agent low or rinse agent level. Essentially the only thing I use the app for is to get notifications when the rinse agent it low (the little physical light on the control panel is hard to notice…), so I was hoping this might be available in this new binding. Do you know if this is something exposed in the UI?

I had noted that my new thing I created for my dishwasher was showing as offline. I figured it was normal since my dishwasher was powered off.

I powered on the dishwasher and let it stay powered on for approx 5 mins and never got a connection. Not sure if I have a config issue, but since the binding was able to connect to the API and find my device I thought it was configured OK.

Then i checked my logs and I see this repeating every 10 seconds or so:

2025-02-01 17:42:31.821 [ERROR] [nal.handler.LGThinQDishWasherHandler] - Error updating thing Dishwasher/987d8c50-4040-11e8-98ed-203dbd5fd1f3 from LG API. Thing goes OFFLINE until next retry: Error getting monitor data for the device:987d8c50-4040-11e8-98ed-203dbd5fd1f3
org.openhab.binding.lgthinq.lgservices.errors.LGThinqApiException: Error getting monitor data for the device:987d8c50-4040-11e8-98ed-203dbd5fd1f3
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.getSnapshotDeviceAdapter(LGThinQAbstractDeviceHandler.java:704) ~[bundleFile:?]
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.updateThingStateFromLG(LGThinQAbstractDeviceHandler.java:491) [bundleFile:?]
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler$UpdateThingStateFromLG.run(LGThinQAbstractDeviceHandler.java:484) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.lang.IllegalArgumentException: DeviceTypeUuid [lgthinq:dishwasher-204] not expected for WashingTower/Machine
	at org.openhab.binding.lgthinq.internal.handler.LGThinQDishWasherHandler.getDeviceType(LGThinQDishWasherHandler.java:147) ~[bundleFile:?]
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.getSnapshotDeviceAdapter(LGThinQAbstractDeviceHandler.java:689) ~[bundleFile:?]
	... 8 more

Is this broken for anyone else since 20/02/25 ? All I get from the bridge is:

COMMUNICATION_ERROR
Error getting device list from the account

I tried to remove Things, Items and Binding, but I can’t get it up and running again. I received an update on the mobile app around the same time. Maybe API has been changed?

1 Like

Same issue for me. Don’t know till what date but it definetly worked a few days ago