Python Plugin: LG Smart AC (SmartThinQ) Topic is solved

Python and python framework

Moderator: leecollings

CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: LG Smart AC (SmartThinQ)

Post by CronoS »

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: 528
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)

Post by hoeby »

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?
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: LG Smart AC (SmartThinQ)

Post by CronoS »

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?
Thanks for the reply, I didn't test this option earlier on.
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
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
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.
CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: LG Smart AC (SmartThinQ)

Post by CronoS »

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)

Post by majki »

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 :arrow: https://github.com/majki09/domoticz_lg_ ... ory-script

Enjoy!
CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: LG Smart AC (SmartThinQ)

Post by CronoS »

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 here :arrow: https://github.com/majki09/domoticz_lg_ ... ory-script

Enjoy!
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
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)

Post by majki »

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.
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).
hoeby
Posts: 528
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)

Post by hoeby »

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.
I only have 1 LG unit.
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)
CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: LG Smart AC (SmartThinQ)

Post by CronoS »

majki wrote: Tuesday 08 August 2023 10:25
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.
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).
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 ;).
CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: LG Smart AC (SmartThinQ)

Post by CronoS »

hoeby wrote: Tuesday 08 August 2023 12:48
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.
I only have 1 LG unit.
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?
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.
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)

Post by majki »

CronoS 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 ;).
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 it :(
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)

Post by piefje »

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')
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)

Post by piefje »

Could NOT log in. Probably you need to accept new agreement in the mobile app.
MMSoft
Posts: 14
Joined: Sunday 22 September 2019 8:20
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: LG Smart AC (SmartThinQ)

Post by MMSoft »

CronoS wrote: Monday 26 June 2023 17:02 A new update from this Plugin fixed the issue that I had!
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)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest