Contribution - LG ThinQ Binding

Hummm… Because of these tests, I increase the pooling to 30 seconds. Then, the synchronization can take some time. I created a proxy mock to simulate LG API and to produce data to validate the channels since I don’t have (unfortunately) this Washer and for me it’s been synced.
To be in the same page, I back the pooling period to 10s and I’ve included Temp Level and Door Lock to Washer channels. To proceed with the test, can you:

  1. Delete de current Washer Thing
  2. Update the Binding
  3. Create Washer Thing again (to force re-discovery, you can disable-enable the bridge) linking the new channels
  4. Setup your Washer machine, wait 10s and see if the Washer Thing has been synced.

If not, please, update the datatrace file in your git area to help me to troubleshoot.

Thanks.

Will do tomorrow morning.

Hi nemer. I would like to try your binding. I have an LG dryer and I registered the account in Italy. I’m already using the MQTT connector without problems.

Hi, Riccardo. Currently the binding is supporting Air Conditioners and Washers (this last one still in development). But, I can map your Dryer as well. To do so, I will registry Dryer device in the binding and I will need your help to get the datatrace generated. Is it ok foi you ?

I’ll be happy to help. Thanks a lot.

OK. First, download the latest version of the binding in:

Then:

  1. install the binding in the addons diretory in the OH3 instalation.
  2. After this, follow the instructions in: Contribution - LG Thinq Binding - #52 by nemer
  3. Finally, you can enter in the OH3 UI, install the LG Thinq Binder e fill with the informations of your account. Discovery your devices e add its. The devices Thing should apper as OnLine, but without channels. I need to map then. To do so, you must provide me all the files with postfix “-cap.json” and “-datatrace.json” in the $OH3_USERDATA/thinq directory in your OH3 instalation.

Just installed the latest binding and linked some items to the WM thing… It seems to run pretty smooth…

2022-02-10 22:59:27.870 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasPower' changed from OFF to ON
2022-02-10 22:59:27.871 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasState' changed from POWEROFF to INITIAL
2022-02-10 22:59:27.872 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasCourse' changed from MIXEDFABRIC to COTTON
2022-02-10 22:59:38.073 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasTempLeve' changed from NO_TEMP to TEMP_40
2022-02-10 22:59:48.286 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasCourse' changed from COTTON to COTTONPLUS
2022-02-10 22:59:48.291 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasTempLeve' changed from TEMP_40 to TEMP_60
2022-02-10 22:59:58.506 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasCourse' changed from COTTONPLUS to MIXEDFABRIC
2022-02-10 22:59:58.507 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasTempLeve' changed from TEMP_60 to TEMP_40
2022-02-10 23:00:08.716 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasCourse' changed from MIXEDFABRIC to COTTONPLUS
2022-02-10 23:00:08.726 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasTempLeve' changed from TEMP_40 to TEMP_60
2022-02-10 23:14:05.035 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasPower' changed from ON to OFF
2022-02-10 23:14:05.045 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasState' changed from INITIAL to POWEROFF
2022-02-10 23:14:05.047 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VaskeMasTempLeve' changed from TEMP_60 to NO_TEMP

I have tried to add the Dryer as well, but I guess it has not been implented yet… Here is the json files for the dryer:

thinq-a6fc6dc7-34e8-147a-8f50-44cb8b0819e7-cap.json.txt (51.8 KB)
thinq-a6fc6dc7-34e8-147a-8f50-44cb8b0819e7-datatrace.json.txt (2.3 KB)

I think there is a bug…
When I disabled and enabled the bridge to get the json files for the dryer… WM wont come back online… It says bridge is offline… But the bridge is online just fine.

EDIT - If I disable and enable the WM thing, it came back online just fine again.

Btw. Here is a pic of the WM and Dryer:

Thank you very much for these files!
I’ve already gotten this bug. When the error is classified as Communication Error, the thing doesn’t come back to online regardless bridge does. Its easy to fix and a will addresa it in a sequence.
About de Dryer, its just a “skeleton” of the Thing to collect the information needed to map the channels. Based in your files, i hope to get this device support in this weekend.

Cheers

Nemer

1 Like

Isn’t it spelt ThinQ with a capital Q?

:+1:

Ok @nemer this is the file you asked for:

thinq-a6fc6dc7-34e8-147a-8f50-44cb8b0819e7-cap.json.txt (51.8 KB)

Yes. Thanks !

Ricky, this device (Dryer) has a lot of capabilities to monitor. For now, it’s not reasonable to map in channel all of them. Then I ask you and @Kim_Andersen (that have ThinQ Dryer also) and, if you have yours device monitored by LG App, what are the set of properties that you guys consider relevant to map into Channels for now ?

I collect more obvious properties:

  • state (POWER_OFF, INITIAL, RUNNING, etc)
  • remainTime
  • dryLevel (IRON, CUPBOARD, EXTRA)
  • error (point to an error code, if so).
  • course (ALLERGYCARE, TOWELS, etc)
  • smartCourse ( SHOESFABRICDOLL, BABYWEAR, etc).

But there are many other else. Do you think some of them are relevant ?

  • ecoHybrid
  • ecoHybridCottonVery
  • ecoHybridCottonIron
  • ecoHybridEasyCareCub
  • antiCrease
  • childLock
  • handIron
  • selfClean
  • dampDryBeep

I’ll choose the first 6 you posted and add these:

processState
initialTime
remoteStart
EnergyMonitoring

I agree with Riccardo. Usually I dont use many of the options, but I think these are good ones to have.

Btw…
For some reason the binding no longer updates anything. I dont see any errors or anything in the log, but nothing happens when I turn on my WM.
The ThinQ app is working fine though, so I guess there is a communication issue somewhere… Any idea?
I will turn on debug logging to see if I get anything from that.

Turning on the debug logging didnt provide anything. So I restarted the binding, and then it start working again.
Here is the debug log:
LGThinQ debug logging.txt (60.4 KB)

@nemer We just started a new washing and I noticed a difference between your binding and the other sources:
Course
Binding COTTONPLUS
MQTT Proxy eco 40-60
ThinQ App eco 40-60

Switches now reflect correct state.

Best
Hans-Jörg

If I understand correctly your approach, there is need to provide cap.json files for each model you want to support. Please take a look on how it is implemented in Thinq-MQTT-Proxy, were there are no such files.

Hi @nemer, Thanks for your efforts! a ThinQ binding is awesome!
I followed your instructios but could’nt get the gateway to log in. I tried all different combinations. Once i changed my language to NL via the thing-Code the gateway logged in and went online. Maybe thats an option you can include?

Here’s the code:

UID: lgthinq:bridge:af26aa09a9

label: LGThinq GatewayBridge
thingTypeUID: lgthinq:bridge
configuration:
  country: NL
  password: ************
  language: nl-NL
  username: ****************

Also i have severall AC’s ,a washer and Dryer and all turned up and gave appropiate channels. The Dryer however only has a power channel. Is there anything i can do or supply in order to get this dryer to work?

EDIT: I see that i have (almost) the same dryer as mentioned above (mine’s a: RC90V9_WW) . Ill wait if those channels work for my dryer first.

Thanks, Hans ! I will fix it.

Hi Michal. I’ve already analysed (almost all) open sources that handle partially the integration with LG API. They are help me a lot and I’m very happy to count with theirs great work. However, I’m doing an effort to produce a nearly to professional work to improve the OpenHab LG user’s experience. Thus, even they having these great works done, I’m reviewing all the things, step by step, to see if we are going to the correct way. Thinq-MQTT-Proxy is a great project, and of couse, is one of the projects that I always consult to grab some information, but, this work was done based on a specif vision. When I ask to send the cap file, is to see all the functionalities of specific equipment/model (include new ones) really have, and maybe map more interesting parts, including LG API V1 and sending commands, that Thinq-MQTT-Proxy doesn’t cover (at least, not fully). But, the cap file is not so important at all. As you said, I can consult the basic things in the existent projects. For me, the most important file is the datatraces, that contains the monitoring information sent by LG API. I can consult Thinq-MQTT-Proxy for some of the attributes come from LG API also, but is pretty much easier for me if I have the json file. With it, I can map the channels in almost 1 day.