LG Smart ThinQ

I previously wrote the Gree Aircon Binding but now have moved home and have just bought a LG Smarthinq AC.
Anyone know if there is any Java source out there I can start to look at?

I wish you good luck.

I bought a SmartThinQ Monoblock Air-Water-Heatpump last year and tried different github projects to control and query the unit. However, I gave up on most of them as prereqs could not be satisfied etc. Also, I didn’t like the route over LG’s cloud.

Here’s my solution :wink:

i have tried to get access to there api. got rejected 2 x

Just an update for the DIY solution:
The PENKTH000 is enough simulated for the ODU to be power limited just like the real unit.

Hi all, I just got a new LG washing machine. Wanted to see if there was any progress getting ThinQ in openHAB.

Well, using the WideQ code,I’m able to connect and retrieve the status of the Washing Machine like this,

I’vent tried polling it when its performing a cycle.I’ll do that the next time when its running and see what the output is. I think this approach can be used as the base for the binding.

2 Likes

So, i tried it when running, I could get updates on -

  • Time Remaining
  • Previous and Current State eg - Spinning, Running
  • Spin Speed
  • Water Temp
  • Soiling level
  • Rinse Option

image

What I plan to do is send this across via MQTT to OH and display status there. Not planning to create a binding at the moment

1 Like

@arunsudhakar

How would that work? I would like to try this with my washing machine but don’t know where to start, as I am not familiar with MQTT but started doing some googles on it. Any tips or examples on how this is done would be very helpful for connecting LG ThinQ through it. Thanks!

Hi Arun,
I tried to get the WideQ code to run but it failed straight away with a syntax error.
Did you get the same? Am I using wrong version of Python? Something Im missing?

python3 example.py -c US -l en-US cmd ls
File “example.py”, line 258
help=f’one of: {", ".join(EXAMPLE_COMMANDS)}’)
^ (note this arrow points to the single quote at the end of the line)
SyntaxError: invalid syntax

1 Like

Basically, the script will run as a cron job every few minutes to see if the washing machine is running and once its detected as running,it will send out the details via an MQTT message to OpenHab which will then display the status on the dashboard/sitemap… I’ll share the code onces it’s done.

The syntax is

python3 example.py -c SG -l en-SG ls

You needn’t give the cmd ls, just ls is sufficient…

let me know how that goes

very nice idea,we just got an LG dryer,Lg app works just fine,but i need to display the status also.I will wait for your script mate to test,thanx.

I will buy the LG washing machine tommorow. I’m happy to test your script.

great, just got our new LG washer, looking forward to test your code :slight_smile:

@okuemmel Congrats & welcome to the community…

I’ve been a bit busy with other commitments so I’vent been able to devote much time to this. I hope to do some work on it over the next couple of days. Will update here once I’ve something

Thanks for waiting patiently @Phuong & @Constantinos_Contis :slight_smile:

thnx mate for your work,next week i will have both a thinQ washer and a dryer so we can test with both of them.Who knows maybe thats the begining of a nice and very usefull binding :slight_smile:

Hi everyone! @arunsudhakar thanks for your work! Just a question… Which one of the hundreds of forks of wideq are you using? I always get to the state that I can list my device:

python3 example.py ls
d10c76a0-1615-1692-a016-XXXXXXXXXXXX: WASCHMASCHINE (WASHER XXXXXXXXX_XXXX)

But I can’t get mor then the ls command - if I try mon:

python3 example.py mon d10c76a0-1615-1692-a016-XXXXXXXXXXXX
<wideq.client.DeviceInfo object at 0xb5d8fad0>
<wideq.client.ModelInfo object at 0xb5d8fa10>
Traceback (most recent call last):
File “example.py”, line 298, in
main()
File “example.py”, line 294, in main
example(args.country, args.language, args.verbose, args.cmd, args.args)
File “example.py”, line 235, in example
example_command(client, cmd, args)
File “example.py”, line 204, in example_command
func(client, *args)
File “example.py”, line 47, in mon
with wideq.Monitor(client.session, device_id) as mon:
File “/root/wideq.old/wideq/client.py”, line 66, in enter
self.start()
File “/root/wideq.old/wideq/client.py”, line 33, in start
self.work_id = self.session.monitor_start(self.device_id)
File “/root/wideq.old/wideq/core_v2.py”, line 306, in monitor_start
‘workId’: gen_uuid(),
File “/root/wideq.old/wideq/core_v2.py”, line 278, in post
return lgedm_post(url, data, self.auth.access_token, self.session_id)
File “/root/wideq.old/wideq/core.py”, line 203, in lgedm_post
out = res.json()[DATA_ROOT]
KeyError: ‘lgedmRoot’

I used the original version - https://github.com/sampsyo/wideq .Have you tried clearing the json files , or better still just clone a new instance again from git and try again.

Saw this link on the HomeAssistant forums (I hope I’m not committing sacrilege by linking to it here :slight_smile: ) ,where some people seemed to have been able to resolve it with varying levels of success.

That’s the one I have installed… I will research and in worst case raise an issue there! Thanks for your help!

I’ve forked the code to https://github.com/arunsudhakar/wideq and started making changes there

Basically my idea is to dump the complete status from the washer via MQTT to OpenHab and then do the parsing and translation there. So,the MQTT message will be something like

{‘State’: ‘23’, ‘Remain_Time_H’: ‘0’, ‘Remain_Time_M’: ‘0’, ‘Initial_Time_H’: ‘0’, ‘Initial_Time_M’: ‘0’, ‘Course’: ‘0’, ‘Error’: ‘0’, ‘Soil’: ‘0’, ‘SpinSpeed’: ‘0’, ‘WaterTemp’: ‘0’, ‘RinseOption’: ‘0’, ‘DryLevel’: ‘0’, ‘Reserve_Time_H’: ‘0’, ‘Reserve_Time_M’: ‘0’, ‘Option1’: ‘0’, ‘Option2’: ‘132’, ‘Option3’: ‘0’, ‘PreState’: ‘22’, ‘SmartCourse’: ‘0’, ‘TCLCount’: ‘34’, ‘LoadItem’: ‘0’, ‘CourseType’: ‘0’, ‘Standby’: ‘1’}

You can the use your device specific wideq_state.json to determine the values.

Eg PreState 22 is

I’vent added the MQTT bits to the code yet. Right now, it will display the response of the device polling like this