Python Plugin: LG Smart AC (SmartThinQ) Topic is solved
Moderator: leecollings
Re: Python Plugin: LG Smart AC (SmartThinQ)
Nobody? Why do I need to restart the Domoticz service in order to get the LG Plugin going again? Does anyone else has this issue with this plugin? It works for around 2 to 3 hours, then I need to restart domoticz. I do not change anything in the Plugin configuration, so that stays the same; only the Domoticz restart seems to fix it.
-
hoeby
- Posts: 531
- Joined: Saturday 02 June 2018 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.1
- Location: Echt, Netherlands
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Did your search in the log files if there is an error?
By restarting domoticz, i think you also restart the plugin.
How is everything responding when you disable the plugin and enable it again?
By restarting domoticz, i think you also restart the plugin.
How is everything responding when you disable the plugin and enable it again?
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Re: Python Plugin: LG Smart AC (SmartThinQ)
Thanks for the reply, I didn't test this option earlier on.hoeby wrote: Monday 05 June 2023 12:14 Did your search in the log files if there is an error?
By restarting domoticz, i think you also restart the plugin.
How is everything responding when you disable the plugin and enable it again?
I have two airconditioning LG units (multisplit) and therefor I have 2 LG hardware items within Domoticz. When I disable and Re-enable the first Airco; it responds back OK, so this seems to also fix the issue. But the strange thing is, at that same time, the other airconditioning Unit does not work using the same plugin. When I disable and re-enable the other one als it works. Any idea what can cause this behavior and what could be the fix.
I want to use my Domoticz setup to automate my Airco's
In the Domoticz log I see this error when it is not working
Basically it says not logged in I guess; but the plugin uses that Wideq file for authentication. I don't know exactly how this works, but I would not suggest that restarting a service of Domoticz (or the hardware) should fix the issue. So I think there something else causing the failture after some time.Error: LG: Call to function 'onCommand' failed, exception details:
Error: LG: Traceback (most recent call last):
Error: LG: File "/home/<username>/domoticz/plugins/domoticz_lg_thinq_plugin/plugin.py", line 575, in onCommand
Error: LG: _plugin.onCommand(Unit, Command, Level, Hue)
Error: LG: File "/home/<username>/domoticz/plugins/domoticz_lg_thinq_plugin/plugin.py", line 201, in onCommand
Error: LG: self.lg_device.set_on(True)
Error: LG: File "/home/<username>/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/ac.py", line 327, in set_on
Error: LG: self._set_control("airState.operation", op_value, command="Operation")
Error: LG: File "/home/<username>/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/client.py", line 470, in _set_control
Error: LG: self.client.session.device_control(
Error: LG: File "/home/<username>/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/core.py", line 601, in device_control
Error: LG: res = self.post(controlPath, data)
Error: LG: File "/home/<username>/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/core.py", line 492, in post
Error: LG: return thinq_request(
Error: LG: File "/home/<username>/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/core.py", line 281, in thinq_request
Error: LG: raise API_ERRORS
Error: LG: wideq.core.NotLoggedInError: 0102
Re: Python Plugin: LG Smart AC (SmartThinQ)
A new update from this Plugin fixed the issue that I had!
-
majki
- Posts: 21
- Joined: Monday 19 July 2021 14:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Krakow, PL
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Guys, please let me introduce new feature that I recently added to this plugin. It is for getting energy consumption data from LG servers (even 2 years back!) and putting it to domoticz. Great way to have energy history in our domoticz, isn't it? 
Details here
https://github.com/majki09/domoticz_lg_ ... ory-script
Enjoy!
Details here
Enjoy!
Re: Python Plugin: LG Smart AC (SmartThinQ)
Awesome Thanks! But unfortunately this will not work on a Multisplit model. Because when connecting to a multi-split model the kWh settings are disabled by default as far as I know. Tested it; but unfortunately 0 kwh reading.majki wrote: Thursday 20 July 2023 13:41 Guys, please let me introduce new feature that I recently added to this plugin. It is for getting energy consumption data from LG servers (even 2 years back!) and putting it to domoticz. Great way to have energy history in our domoticz, isn't it?
Details herehttps://github.com/majki09/domoticz_lg_ ... ory-script
Enjoy!
-
majki
- Posts: 21
- Joined: Monday 19 July 2021 14:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Krakow, PL
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Oh, that's not good. I didn't have an idea that it would not work on different models. Do you have any power history on official LG mobile app? On the app, do you have single device or many? The script basically uses the same API as app does. Unfortunately I don't have multisplit, I supposed it works the same like single split (from the app side of view).CronoS wrote: Monday 07 August 2023 12:13 Awesome Thanks! But unfortunately this will not work on a Multisplit model. Because when connecting to a multi-split model the kWh settings are disabled by default as far as I know. Tested it; but unfortunately 0 kwh reading.
-
hoeby
- Posts: 531
- Joined: Saturday 02 June 2018 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.1
- Location: Echt, Netherlands
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
I only have 1 LG unit.CronoS wrote: Wednesday 07 June 2023 12:31 I have two airconditioning LG units (multisplit) and therefor I have 2 LG hardware items within Domoticz. When I disable and re-enable the other one als it works. Any idea what can cause this behavior and what could be the fix.
But you have 2, on hardware tab you made 2 rows?
We have to ask the designer if that is possible. Because the plugin has to switch between this rows (correct?)
Are the logins maintained, or is it making this problem?
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Re: Python Plugin: LG Smart AC (SmartThinQ)
In the LG thin Q app there is nothing related to power consumption, other functions are present. In the App I have two airco units, both are the latest models. If you use these models in a Single Split setup, then you have the energy consumption. But in a Multisplit setup this is functionality is disabled on the LG by default. Using a Shelly to measure the powermanagemet of it as a workaroundmajki wrote: Tuesday 08 August 2023 10:25Oh, that's not good. I didn't have an idea that it would not work on different models. Do you have any power history on official LG mobile app? On the app, do you have single device or many? The script basically uses the same API as app does. Unfortunately I don't have multisplit, I supposed it works the same like single split (from the app side of view).CronoS wrote: Monday 07 August 2023 12:13 Awesome Thanks! But unfortunately this will not work on a Multisplit model. Because when connecting to a multi-split model the kWh settings are disabled by default as far as I know. Tested it; but unfortunately 0 kwh reading.
Re: Python Plugin: LG Smart AC (SmartThinQ)
Yes; when setting up the Plugin I get two device ID's. Added both to Domoticz in the Hardware setup page. With the latest version of the plugin this works OK by default.hoeby wrote: Tuesday 08 August 2023 12:48I only have 1 LG unit.CronoS wrote: Wednesday 07 June 2023 12:31 I have two airconditioning LG units (multisplit) and therefor I have 2 LG hardware items within Domoticz. When I disable and re-enable the other one als it works. Any idea what can cause this behavior and what could be the fix.
But you have 2, on hardware tab you made 2 rows?
We have to ask the designer if that is possible. Because the plugin has to switch between this rows (correct?)
Are the logins maintained, or is it making this problem?
-
majki
- Posts: 21
- Joined: Monday 19 July 2021 14:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Krakow, PL
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Thanks for clarification. It seems that even when you have many LG IDs and you can control them separately from domoticz plugin, it's not possible to readout the power consumption in multi-split setup. I suppose multisplit doesn't distinguish power consumption between each devices, maybe that's why LG disables itCronoS wrote: Tuesday 08 August 2023 21:53 In the LG thin Q app there is nothing related to power consumption, other functions are present. In the App I have two airco units, both are the latest models. If you use these models in a Single Split setup, then you have the energy consumption. But in a Multisplit setup this is functionality is disabled on the LG by default. Using a Shelly to measure the powermanagemet of it as a workaround.
Glad that you handle it with Shelly
-
piefje
- Posts: 11
- Joined: Wednesday 03 November 2021 10:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
I can't get it working anymore
2024-08-06 09:39:04 ERROR [wideq.example] wideq_state file not found. Trying to load default STATE_FILE: wideq_state.json
2024-08-06 09:39:04 INFO [wideq.example] wideq_state will be loaded from: wideq_state.json
2024-08-06 09:39:04 ERROR [wideq.example] No state file found (tried: '/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq_state.json')
2024-08-06 09:39:04 ERROR [wideq.example] wideq_state file not found. Trying to load default STATE_FILE: wideq_state.json
2024-08-06 09:39:04 INFO [wideq.example] wideq_state will be loaded from: wideq_state.json
2024-08-06 09:39:04 ERROR [wideq.example] No state file found (tried: '/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq_state.json')
-
piefje
- Posts: 11
- Joined: Wednesday 03 November 2021 10:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Could NOT log in. Probably you need to accept new agreement in the mobile app.
Re: Python Plugin: LG Smart AC (SmartThinQ)
I have the problem that after a few weeks the plugin no longer works.
Restarting the plugin is not a solution, only after domoticz.service is restarted does it work again.
Now I would like to update the plugin, but what is the best way to do that?
(sorry for my bad english)
- barts2108
- Posts: 26
- Joined: Wednesday 17 June 2020 18:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Arnhem
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Not sure if this plugin is still giving issues, but I found that LG has opened up a public API
https://www.lg.com/my/about-lg/press-an ... nnovation/
That may be a good option to get better plugins ?
https://www.lg.com/my/about-lg/press-an ... nnovation/
That may be a good option to get better plugins ?
-
edwin1234
- Posts: 330
- Joined: Sunday 09 October 2016 20:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Nederland
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
When i try python3 example.py -c NL -l en-US
I got this error when i paste the page:
What could be wrong?
I got this error when i paste the page:
Code: Select all
File "example.py", line 423, in <module>
main()
File "example.py", line 419, in main
ret = example(args.country, args.language, args.verbose, cmd=args.cmd, args=args.args)
File "example.py", line 335, in example
resp = example_command(client, cmd, args)
File "example.py", line 283, in example_command
return func(client, *args)
File "example.py", line 59, in ls
thinq1_devices = [dev for dev in client.devices if dev.platform_type == "thinq1"]
File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/client.py", line 135, in devices
self._devices = self.session.get_devices()
File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/core.py", line 525, in get_devices
return get_list(self.get("service/application/dashboard"), "item")
File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/core.py", line 516, in get
language=self.auth.gateway.language,
File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/core.py", line 281, in thinq_request
raise API_ERRORS[code](code)
wideq.core.AgreementError: 0110
What could be wrong?
-
elmortero
- Posts: 248
- Joined: Sunday 29 November 2015 20:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.9639
- Location: Spain
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Hi, I was having the same (for longer than I was aware of) and after logging in the LG THinQ app on my phone - it forced entering the credentials again - I was able to generate the wideq_state.json file againedwin1234 wrote: Friday 21 November 2025 5:40 When i try python3 example.py -c NL -l en-US
I got this error when i paste the page:Code: Select all
File "example.py", line 423, in <module> wideq.core.AgreementError: 0110
What could be wrong?
Who is online
Users browsing this forum: Google [Bot] and 1 guest