In development: LG SmartThinQ component


I can only talk about my AC devices, but yes, they must connect to the cloud for control. They join my Wi-Fi network to talk to LG servers; my reverse engineering work works the same way as the mobile app, which also talks to LG servers, which in turn send commands back to the device.

Another fun project might be to analyze the traffic between the LG device and the server—maybe you can mimic and then replace the server with a local controller. Seems hard, but perhaps possible!


Hah… In that case I’ll pass in buying LG appliances. It will be very hard to look for large appliances that can communicate locally when it comes to failing gracefully, so I might as well forget about it.



I’m new to HA and found this post here. Great work !!!
I found a strange behaviour by using wideq in HA.
If a AC device is only monitored it is possible to control it also with the original App.
But if it is turned on or any setting is changed, after it is around 20 to 60 Minutes blockt for using it with the original app. I tryed also with 2 smart phones if it is the same by using the original app. The result was as long as the device is opend for contolling it is blocked for other users that are connected. After the device in the app is closed and you are in the app start screen everybody can take control.
Maybe there is something missing in the communication in wideq that after changing a setting the device is released in a way that others can also control it and don’t stay in the used state.
I tryed to look into the code and also tryed to record the communication but I did not succeed.



Interesting! I have seen something similar occasionally, where controlling the device on one machine prevents contacting it with another machine. But I’m not sure what else to do—we aren’t keeping the connection open, except to monitor the device’s status. Some more investigation is probably required.


It seems that if the device list is shown in the App that the monitoring is active and if the device is opend in the app an additionally status is send to the api server.
you can see the item deviceState = ‘E’ as long as the app is displaying the device list. If the device is selected the item deviceState changes to ‘U’ and back to ‘E’ is closed.
It seems that at this time a statusupdate is send that is missing in wideq.
In the js files from the zip file from appModuleUri in the device json is at function goBackPage a function call removeControlPermission(). Unfortunally the function itself is not included in any file in the zip.

I try again to sniff the traffic, if I have success and see the missing link I will provide the info here :wink:


Great idea! Any chance to make accessible the homebot wifi as well, including the history maps and the access to the surveillance camera on board?



I found the missing link to make it possible to control the HVAC from HA and the APP.
This solves the issue that the device stay in state used after send a command or request a state with wideq.

There are 2 ways:
First way:
Add 'isControlFree': 'Y', to the SET and GET calls after data in functions set_device_controls and get_device_config

Second way:
Call two times:
API_URI + 'rti/delControlPermission' with Payload: {"deviceid": "your_device_id"}
and immedetially after call start monitoring.
This way to delete the control permission of the own session have the advantage to change different settings in different calls.
I forgot to call one time start monitoring after and my HVAC was beeping every second until I did a hardreset by switching the fuse off and on. :wink:

Please be carefull - I was only able to test it on my AC device here in Austria. Maybe other types or other firmware versions it can be different.

One additionally hint is to cover each function call in with try: except with restarting the monitoring to catch timeouts or errors device in use and so on.

Regards Walter


Very cool! Thank you for looking into it! I like the first solution quite a bit—if it works, that, would be a simple change that would cleanly address the problem. Would you mind opening a pull request on GitHub and I’ll try it out on my devices?


I’ve installed wideq, etc and changed COUNTRY to “SP” and LANGUAGE to “es-SP” and obtain the URL

but when tried lo log in … appears an error to obtain the json file :frowning:

I’ve just created a new account in USA server, tried with several browsers but the problem remains :frowning:

It seems very strange because i’´s suggesting that there’s no network connection but, as you can see, I can surf without any problem but not from that URL :frowning:

Thank you in advance for your help


I’ve added fan speed on my fork. Haven’t had time to figure out how to set the existing speed when the unit starts. I’ve never used python so sorry if it’s not A1 code!

For those that want to give it a go clone my repo:

I’ll do a PR once I sort out the existing fan speed issue (or someone chips in with a fix :slight_smile: )


Solved problem using


but the component doesn’t work in HA as I explain here: It can’t find the WIDEQ :frowning:

Thank you in advance for your help


Same issue with IFTTT here in the US. I too would be wiling to help. I have a LG washer Model: WT7200CW


I’ve got my SmartThinQ account tied to my google account and the URL which Wideq sends me to seems to not like it.

I get a page not found when I authenticate with google and when I past that URL into the I get the following:

Traceback (most recent call last):
File "", line 177, in <module>
File "", line 163, in example
example_command(client, args)
File "", line 140, in example_command
File "", line 25, in ls
for device in client.devices:
File "C:\Users\Dazz\wideq\", line 474, in devices
self._devices = self.session.get_devices()
File "C:\Users\Dazz\wideq\", line 465, in session
self._session, self._devices = self.auth.start_session()
File "C:\Users\Dazz\wideq\", line 257, in start_session
return Session(self, session_id), as_list(session_info['item']) 
KeyError: 'item'

I’ve tried different combinations of the URL parameters and I’m able to get different responses, but none of them work with this process, nor do any of the refresh or bearer tokens from google work with the HA integration.


Hmm! What does the URL you’re redirected to look like? (You’ll probably want to redact the actual tokens, but seeing the format of the URL would be helpful.)


This is the URL I’m sent to:

It just comes up with a “Page not found”. No tokens in it. I have to remove the “division” and other url params to get anything approaching a bearer or refresh token.


Hmm; that indeed doesn’t look right. Is there any chance you can associate a password with your account and try logging in that way?


Just for shits and giggles, I created a new account with a different email address but did not associate any devices.

Even though it said “Page not Found”, I got this URL instead (of course I have redacted and changed the tokens):

Running the sill gives an error.


Huh! Exactly the same error traceback? Sounds like it could just be a coincidence. I may have to look into it a little more deeply.


Ok; after adding a device it works.
Looks like the python does not like empty collections.

Still does not work with a google account integration


Aha, got it. Was it the same error before (with the same traceback)? If so, we should detect that and just report zero devices.