Contribution - LG Thinq [WasherDryer] [WIP]

Now I get the error already when I turn on the washing machine:

2023-04-13 22:55:11.204 [ERROR] [al.handler.LGThinQWasherDryerHandler] - System error in pooling thread (UpdateDevice) for device LG Waschi/df859ecc-64d7-1fe2-bca0-4cbce9d99ee3. Filtering to do not stop the thread

java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5

at java.lang.String.checkBoundsBeginEnd(String.java:3319) ~[?:?]

at java.lang.String.substring(String.java:1874) ~[?:?]

at org.openhab.core.library.types.DateTimeType.(DateTimeType.java:106) ~[bundleFile:?]

at org.openhab.binding.lgthinq.internal.handler.LGThinQWasherDryerHandler.updateDeviceChannels(LGThinQWasherDryerHandler.java:212) ~[bundleFile:?]

at org.openhab.binding.lgthinq.internal.handler.LGThinQWasherDryerHandler.updateDeviceChannels(LGThinQWasherDryerHandler.java:1) ~[bundleFile:?]

at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler.updateThingStateFromLG(LGThinQAbstractDeviceHandler.java:304) [bundleFile:?]

at org.openhab.binding.lgthinq.internal.handler.LGThinQAbstractDeviceHandler$UpdateThingStateFromLG.run(LGThinQAbstractDeviceHandler.java:282) [bundleFile:?]

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) [?:?]

Letā€™s see how it behaves with the new version.

I am interested in implementing the Thinq binding. I have read thru the posts and looked at the code on GitHub. Itā€™s not clear to me where to find the binding to load.

Please provide some clues about where I can locate the addon.

Much appreciated.

Here is the latest build of Nemerā€™s binding for LG ThinQ devices.

Thanks for the guidance. Iā€™ve implemented the binding, and all seems to be working. I have an LG washer and am only interested in reporting the status and time left. Very handy.

I really appreciate the work done on this binding. I hope someday soon it becomes an official openhab binding.

Hello,

I just installed the binding and tried adding the bridge. I get this error:

2023-05-03 19:28:37.854 [ERROR] [internal.api.OauthLgEmpAuthenticator] - Error login into account. The reason is:{
ā€œerrorā€ : {
ā€œrequestā€ : ā€œ/emp/v2.0/account/session/email@email.comā€,
ā€œcodeā€ : ā€œMS.001.03ā€,
ā€œmessageā€ : ā€œCAā€
}
}

I tried changing the country to be sure its not that (Iā€™m in Canada) but when I put something else then USA, I get precondition error thus itā€™s not that.

If I change username, I get wrong username error. Thus what is ā€œCAā€ error?

Thank you!

OKā€¦ when you created your account on LG Thinq Portal, what country and language you choose ?

This error message says your account is from CA (Canada) and thanā€¦ you have to registry your language as you choose in the LG Account Portal, you canā€™t choose a language that is not official in your country and is not associated with your account. Thanā€¦ in your case can be FR or EN.
Soā€¦ in the Bridge configuration, you mas choose User Country->Other and put ā€œCAā€ in Manual Contry and in the User Language->Other and put ā€œFRā€ or ā€œENā€ in Manual Language based on the language you associate your account. Thatā€¦ can be something like this:

Ah, CA was the problem. Funny thing is if I put something else then US, it throw another error totally, thatā€™s why I though it wasnā€™t that. And when I tried, I put Canada instead of CA. Didnā€™t need to put FR since itā€™s in english.

To be honest, my account was created over a year ago from the apps, so I really donā€™t know what were the option and the apps doesnā€™t show me anything beside language thus I didnā€™t knew what region I had (and when Canada isnā€™t in the option, I put USA). I never been to the LG Account Portal, was create through the android app for my washer.

American English did work for language, bridge is now online. Maybe we could add Canada in the list?

Thank you!

Sure

1 Like

Hello again,

Iā€™m having some weird stuff on my washer (Iā€™ll check dryer later). Hereā€™s my sitemap:

Default item=Laveuse_Power label="Power"
                Text item=Laveuse_Washer_State label="Washer State"
                Selection item=Laveuse_Washer_Course label="Cycle"
                Default item=Laveuse_Remaining_Time label="Temps Restant"
                Selection item=Laveuse_Temperature_Level label="Temperature"
                Selection item=Laveuse_Spin label="Spin"
                Selection item=Laveuse_Rinse label="Rinse"
                Text item=Laveuse_Standby_Mode label="Standby Mode"
                Default item=Laveuse_Remote_Start label="Remote Start"
                Default item=Laveuse_Delay_Time label="DĆ©lais"
                Default item=Laveuse_Washer_Door_Lock label="Door Lock"

Items are defined in the gui from the thing directly

When Iā€™m on my phone, I see this:

Rinse doesnā€™t seems to want to appear as a select box.
The content of Cycle, Spin and Temperature are weird and include foreign language (that Iā€™m probably sure donā€™t even work with mine since I donā€™t see them in the app, unless this include also downloadable one?)


modelid: F3P3CYK2_
thinq2
url: https://objectcontent.lgthinq.com/02d56291-3bca-4922-a46b-a35eb0a15e4a?hdnts=exp=1717203

edit: I also found this in the log when starting openhab

[WARN ] [dryer.WasherDryerCapabilityFactoryV2] - Data node not found in the WasherDryer definition. It's most likely a bug

Hi guys, I uploaded a new version of the binding with the following new features for WM/Dryer

  • Dynamic features (channels) for WM/Dryer remote start: when you configure the course and enable remote start (with standby off), the a Group called (Remote Start) will come up with the parameterized features (rinse, spin, temperature, etc) depending on the Course capability defined and supported by the device.
  • To start the WM in remote start function, just put in ON the Remote Start/Stop switch
  • Fixed support for custom Zoned Date/Time. For some cases, in some countries/languages, OH canā€™t parse the date/time for the binding that couses erros to present Remaining and Delay time.

OBS: The remote start for VW/Dryer V1 was not implemented yet. Itā€™s a little more complicated because needs to create a bitmap to send. Itā€™s a TODO for now.

1 Like

Strange results.Can you update the binding with the latest version from my github space ? Than after, put the binding in debug mode and collect the following files to me:

  • OH3_USERDATA/thinq/thinq-*-cap.json
  • OH3_USERDATA/thinq/thinq-*-datatrace.json

Than I can simulate here.

Tx.

do I need to delete the thing and remove the current binding before installing the new version?
And, how do I put in debug?
Thanks!

This new binding has some considered changes in the WM definitions, channels, etc. Then, itā€™s a good approach to unlink and remove the items and complete delete the thing. Then install the new binding and discovery again the Thing.
To put the binding in debug mode, first you need to log into openhab console. To do so, go to the OH server and type:

$ openhab-cli console

Then it will ask you about the password of openhab user, normally is ā€œhabopenā€
So, logged in the console, type the command:

log:set DEBUG org.openhab.binding.lgthinq

Thats it.

You can follow the log in the console as well (I prefer when Iā€™m debuging the code) with the command:

log:tail

got it, here are the files
thinq-606aba23-6dd3-1b7f-addb-24e853e73887-datatrace.json (2.6 KB)
thinq-0d689db0-f5a3-10c2-9665-24e853c95ab2-cap.json (92.4 KB)
thinq-0d689db0-f5a3-10c2-9665-24e853c95ab2-datatrace.json (4.0 KB)
thinq-606aba23-6dd3-1b7f-addb-24e853e73887-cap.json (60.9 KB)

weird is the .cap file are dated on may 3rd while the other are 12th (today).

I installer the new binding with restart and all, now the ui show the rinse cycle, but all selection box are empty.
But as soon as I restarted, it got back to the screenshot above. Could it be due to persistence? Iā€™ll try to disable influxdb on these values.

edit: tried without persistance and samething after reboot

The first cap is about a Washer, and the second one, a Dryer. Do you have these 2 devices or itā€™s a WashTower ? Can you provide me the comercial name of the product ? Because, the description files are quite different comparing to what the Binding is expecting.

It is 2 seperate device.

Dryer model: DLEX4200B Washer model: WM4100HBA
dryer: 7.4 cu. ft. Capacity Gas Dryer
washer: LG 5.2 cu.ft. Ultra Large Capacity Front Load Washer with AI DDā„¢ | LG Canada

Updated to the latest vercion and something is wrong,washer,dryer and refrigerator seems online but no state updatesā€¦

@Nodiaque, your devices has different schema descriptions. I did an update and hope you can see the channels better right now. Please, update your addon with the latest from my repository and let me know

Very strangeā€¦ I recommend you to get the latest version, with some bug fixes and complete remove and reinstall the LgThinq thing & items associated. (the bridge is not necessary)

OBS: Itā€™s always a good practice to make a security backup before update the binding, because itā€™s still WIP.

Hi @nemer , do you plan to deliver a v4.0 of this binding ?