Contribution - LG ThinQ Binding

Start/stop, pick program, some program settings (spin speed, temperature etc).
I hardly ever use the app though.

Hi,

I really would like to use your binding because it’s exactly what I was looking for. I have 4AC units at home to automate. However I can’t connect to my LG account as my language and country are not supported in your binding. Is it possible to include this please? I’m from Belgium so the country code should be “BE” and the language “nl” (dutch).

Error:
2022-03-10 20:00:44.866 [ERROR] [internal.api.OauthLgEmpAuthenticator] - Error login into account. The reason is:{
“error” : {
“request” : “/emp/v2.0/account/session/xxxxxxx@xxxxxxx.xx”,
“code” : “MS.001.03”,
“message” : “BE”
}
}

Many thanks!

Of course I can. I gonna do this tonight. Try to visit my repo again tomorrow.
Regards,

i have a washer and a dryer ,country Greece and Lanquage english,how can i test the binding?Will the latest jar work with my region?

Nope. I’m planing to release today a new version with optional text fields that you can enter based on your country/language account configuration. I will let you know in this topic when it’s done

2 Likes

@Constantinos_Contis, you can download the new version (.jar) from my personal repository and install as already instructed in this topic. Then, in the configuration of the bridge, put “Other” in the language and country combo boxes, and fill out “Manual Language …” and “Manual Country …” input texts with yours. You can follow the ISO here (ISO-3166 Country Codes and ISO-639 Language Codes). Just remember that for language, *you must fill with composite language, ie, language-country. eg:

  • Brasilian Portuguese: pt-BR
  • Luxembourg German: de-LU
  • German (Standard): de-DE

In your case, i think country gonna be GR and language en-US (if you registered your account in the LG with American English). But to be honest, I think that language is not so important to LG API’s integration, but the country is essencial.

Try it out and let me know !

Cheers !

1 Like

thnx mate works just fine!washer and dryer detected…many thnx

You are welcome ! Enjoy the binding. If you have some problem, let me know.

1 Like

what the “Pooling Discovery Interval (>300)” setting do?Is it optional?After openhab reboot bridge come online but washer and dryer not.I had to refresh bridge for both come online again…

It is absolutely correct that washer and dryer are not always online. After a washing cycle, the washer switches itself of and openHAB state will change to OFFLINE - Disconnected. (Same in LG APP)
Same should apply to the dryer.

both devices were online the time that i checked so thats not it.But in general yes my washer goes offline after some time.My dryer at the other hand is always online…

In that case, we need a debug log…

The interval is related to the time the bridge wait until go again to the LG API to see if there is some new device registered available to the OpenHab discovery process. There is a default time internal (300 sec). If will fill in this field something less than this the biding will consider 300 sec.

This is because LG is clear when ask developers to do not hit in their API so frequent, and this is reasonable because this would take more resource of them.

About the status… when the Bridge goes online, it asks the related things to try to go online also. It’s a strange situation you are reporting. I suggest you to try send the steps to reproduce the same scenario and, preferable, showing the debug log.

BTW, when you say “bridge come online but washer and dryer not” whats is the current status of the thigs ? “Offline”, “Offline - Disconnected” ( in this case, you have to position the mouse in the top of “Offline” tag and you can see the detailed off the status) or “Error: …” ?

it was saying “Offline” and under that “BRIDGE Offline” but the bridge was online.I only pressed the “Save” at top right and the thing came Online immediately.

OK, Thanks. I will try to simulate this.

now that we have a very nice working binding for Lgthinq ,how can i remove the LG Thinq MQTT Proxy service?Is it enough to just delete the script folder from my openhab-conf\scripts?It is starting and running as a service,how can i remove that?

sudo systemctl stop thinq-mqtt-proxy.service
sudo systemctl disable thinq-mqtt-proxy.service

Hi folks. Jus to be documented here and update the README after, yesterday LG update the user’s aggreements and the LG Thinq Bridge started to show the following error:

org.openhab.binding.lgthinq.internal.errors.LGThinqApiException: Error starting device monitor in LG API for the device:d27cc560-7149-11d3-80b6-7440bec3653e
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.getSnapshotDeviceAdapter(LGThinQAbstractDeviceHandler.java:336) ~[?:?]
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.updateThingStateFromLG(LGThinQAbstractDeviceHandler.java:246) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	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:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: org.openhab.binding.lgthinq.internal.errors.LGThinqApiException: Status error executing endpoint. resultCode must be 0000, but was:null
	at org.openhab.binding.lgthinq.lgservices.LGThinQAbstractApiClientService.handleV1GenericErrorResult(LGThinQAbstractApiClientService.java:268) ~[?:?]
	at org.openhab.binding.lgthinq.lgservices.LGThinQAbstractApiClientService.startMonitor(LGThinQAbstractApiClientService.java:392) ~[?:?]
	at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.getSnapshotDeviceAdapter(LGThinQAbstractDeviceHandler.java:320) ~[?:?]
	... 7 more

This happens because LG API accept authentication, but doesn’t return any payload from their endpoints until you accept the aggreements.
The binding doesn’t handle with the user’s account management. Then, you must to open the official LG Thinq App and in the very first access, it will ask you to accept the new agreements. After this, the binding will start to work again.

Regards.

2 Likes

Thanks, this info saved me a lot of sleeping hours :slight_smile:

Hi,
it is posible to add the LG-refrigerators to the binding?
thx