Python Plugin: LG Smart AC (SmartThinQ) Topic is solved
Moderator: leecollings
Re: Python Plugin: LG Smart AC (SmartThinQ)
Finally it works with ONE ac.. now I want to add my second ac. Anybody knows how to do that?
Many thanks in advance
Many thanks in advance
RFXcom433e ver1009,Raspberry Pi,Domoticz v3.5877
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
Re: Python Plugin: LG Smart AC (SmartThinQ)
Yeeaaahhhhhh, finally got it all to work.
When you have multiple AC's and you want to control them all in Domoticz you need to make some adjustments.
Copy for each AC the file LGACServerNew.py to LGACServerNew2.py (or LGACServerNew3.py and so on)
In this file you should change 127.0.0.1 to 127.0.0.2 ( or 127.0.0.3 and so on)
Also change 22233 to 22234 (or 22235 and so on)
And put the devicenumber of that airco in that file.
Do the same steps as LGACServerNew.py, but now with 2 (or 3 added)
So make it executable and test this file
Also copy the file TestServer.py to TestServer2.py (or 3 and so on)
Also change here the ip-adress and portnumber as above
Then make the systemd-file.... also the same as above. Copy this file and call it: LGAC_server2.service
Change the Execstart path with the right file. ExecStart=/usr/bin/python3 /home/pi/LGAC_SmartT/LGACServerNew2.py
Also add 2 or 3 after the filenames:
sudo systemctl daemon-reload
sudo systemctl enable lgac_server.service
sudo systemctl start lgac_server
sudo systemctl status lgac_server
So.... basicly it's all copying the existing files to a file with a higher number. Change the ip-adresses and portnumbers with a higher number.
After all this copying and pasting, run Domoticz.
Go to Hardware as described and select LG AC....
Now at the fields with ip-adress and portnumber, use the ip-adresses and portnumbers with the higher number.
Now you can see Domoticz added new AC to the switches.....
So you add bij Hardware for every AC a device.....
No faults in the log of Domoticz, and everything works great.
I've tested and use this on a Raspberry with the latest Stretch-version. Buster gave me some troubles in the beginning (but maybe I made some mistakes as you can see by my questions above in this topic)
When you have multiple AC's and you want to control them all in Domoticz you need to make some adjustments.
Copy for each AC the file LGACServerNew.py to LGACServerNew2.py (or LGACServerNew3.py and so on)
In this file you should change 127.0.0.1 to 127.0.0.2 ( or 127.0.0.3 and so on)
Also change 22233 to 22234 (or 22235 and so on)
And put the devicenumber of that airco in that file.
Do the same steps as LGACServerNew.py, but now with 2 (or 3 added)
So make it executable and test this file
Also copy the file TestServer.py to TestServer2.py (or 3 and so on)
Also change here the ip-adress and portnumber as above
Then make the systemd-file.... also the same as above. Copy this file and call it: LGAC_server2.service
Change the Execstart path with the right file. ExecStart=/usr/bin/python3 /home/pi/LGAC_SmartT/LGACServerNew2.py
Also add 2 or 3 after the filenames:
sudo systemctl daemon-reload
sudo systemctl enable lgac_server.service
sudo systemctl start lgac_server
sudo systemctl status lgac_server
So.... basicly it's all copying the existing files to a file with a higher number. Change the ip-adresses and portnumbers with a higher number.
After all this copying and pasting, run Domoticz.
Go to Hardware as described and select LG AC....
Now at the fields with ip-adress and portnumber, use the ip-adresses and portnumbers with the higher number.
Now you can see Domoticz added new AC to the switches.....
So you add bij Hardware for every AC a device.....
No faults in the log of Domoticz, and everything works great.
I've tested and use this on a Raspberry with the latest Stretch-version. Buster gave me some troubles in the beginning (but maybe I made some mistakes as you can see by my questions above in this topic)
RFXcom433e ver1009,Raspberry Pi,Domoticz v3.5877
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
Re: Python Plugin: LG Smart AC (SmartThinQ)
Both ac's can be controlled in Domoticz. But after a few hours or days one or both ac's can't be controlled. Got some errors in Domoticz log. After a restart both ac's can be controlled again.
Who's got the same problem.and knows how to fix this?
Who's got the same problem.and knows how to fix this?
RFXcom433e ver1009,Raspberry Pi,Domoticz v3.5877
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
-
- Posts: 71
- Joined: Tuesday 30 April 2019 16:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Portugal
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
I have the plugin running from 2 months ago and only once I had and issue with the AC. Works very well. Do you have good wireless coverage at home?Melissen wrote:Both ac's can be controlled in Domoticz. But after a few hours or days one or both ac's can't be controlled. Got some errors in Domoticz log. After a restart both ac's can be controlled again.
Who's got the same problem.and knows how to fix this?
Sent from my SM-G973F using Tapatalk
Re: Python Plugin: LG Smart AC (SmartThinQ)
When I start (or restart) Domoticz:
After a while:
After a while:
RFXcom433e ver1009,Raspberry Pi,Domoticz v3.5877
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
-
- Posts: 71
- Joined: Tuesday 30 April 2019 16:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Portugal
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
When you receive {'cmd': 'status', 'exception': "python-LGAC: 'Monitor' object has no attribute 'work_id'"} seems you loose connection with the server but don´t know why.
I would try to get a new "refresh_token".
I would try to get a new "refresh_token".
Re: Python Plugin: LG Smart AC (SmartThinQ)
It's strange, because when I reboot the Pi (not my AC's) everyting is running good again...
I'm going to make a fresh install again... but now installing this 'scripts' at the end of all my other devices (P1 meter, KWh-meter, GPIO-settings, Zigbee, MQTT etc...)
Also making different folders for my two airco-units. Hopefully this helps... Or has someone also 2 of more airco's running in Domoticz without any problems?
I'm going to make a fresh install again... but now installing this 'scripts' at the end of all my other devices (P1 meter, KWh-meter, GPIO-settings, Zigbee, MQTT etc...)
Also making different folders for my two airco-units. Hopefully this helps... Or has someone also 2 of more airco's running in Domoticz without any problems?
RFXcom433e ver1009,Raspberry Pi,Domoticz v3.5877
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
-
- Posts: 71
- Joined: Tuesday 30 April 2019 16:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Portugal
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
You can check the server status when you get the error with the following telnet command:Melissen wrote:It's strange, because when I reboot the Pi (not my AC's) everyting is running good again...
I'm going to make a fresh install again... but now installing this 'scripts' at the end of all my other devices (P1 meter, KWh-meter, GPIO-settings, Zigbee, MQTT etc...)
Also making different folders for my two airco-units. Hopefully this helps... Or has someone also 2 of more airco's running in Domoticz without any problems?
sudo systemctl status lgac_server
Maybe you get more info.
I only have one LG AC connected to Domoticz
Re: Python Plugin: LG Smart AC (SmartThinQ)
Do you plan to support washer and dryer ?
I can see them with https://github.com/gladhorn/wideq/tree/api2_merged and it works.
this is the command i used to register
this is the washing machien when using it
And this is the dryer when i use it :
I can see them with https://github.com/gladhorn/wideq/tree/api2_merged and it works.
this is the command i used to register
Code: Select all
python3 example.py -c CA -l en-CA
this is the washing machien when using it
Code: Select all
[code] "washerDryer": {
"extraRinse": "EXTRARINSE_OFF",
"stainCare": "STAINCARE_OFF",
"initialTimeMinute": 6.0,
"smartCourseTLBaseUS": "NOT_SELECTED",
"waterPlus": "WATERPLUS_OFF",
"addGarment": "ADDGARMENT_OFF",
"remoteStart": "REMOTE_START_OFF",
"state": "RUNNING",
"doorLock": "DOOR_LOCK_ON",
"wifiSDS": "WIFI_SDS_OFF",
"smallUE": "SMALLUE_OFF",
"turboWash": "TURBOWASH_ON",
"preState": "DETECTING",
"spin": "SPIN_EXTRA_HIGH",
"initialBit": "INITIAL_BIT_OFF",
"reserveTimeMinute": 0.0,
"initialTimeHour": 1.0,
"reserveTimeHour": 0.0,
"error": "ERROR_NO",
"remainTimeHour": 1.0,
"courseTLBaseUS": "PREWASH_PLUS",
"rinse": "NO_RINSE",
"soilWash": "SOILWASH_NORMAL",
"dnnReady": "DNNREADY_OFF",
"preWash": "PREWASH_OFF",
"soak": "SOAK_OFF",
"TCLCount": 1.0,
"temp": "TEMP_TAP_COLD",
"fabricSoftener": "FABRICSOFTENER_OFF",
"downloadedCourseTLBaseUS": "SMALL_LOAD",
"soakBit": "SOAK_OFF",
"coldWash": "COLDWASH_OFF",
"saveEnergy": "SAVE_ENERGY_OFF",
"remainTimeMinute": 3.0,
"steam": "STEAM_OFF",
"childLock": "CHILDLOCK_OFF"
},
And this is the dryer when i use it :
Code: Select all
"washerDryer": {
"dampDrySignal": "DAMPDRYSIGNAL_OFF",
"initialTimeMinute": 59.0,
"antiBacterial": "ANTIBACTERIAL_OFF",
"remoteStart": "REMOTE_START_OFF",
"state": "DRYING",
"energySaver": "ENERGYSAVER_OFF",
"easyIron": "EASYIRON_OFF",
"moreLessTime": 0.0,
"turboSteam": "TURBOSTEAM_OFF",
"courseDryer27inchBase": "NORMAL",
"wrinkleCare": "WRINKLECARE_OFF",
"preState": "INITIAL",
"initialBit": "INITIAL_BIT_OFF",
"loadItem": "LOADITEM_OFF",
"initialTimeHour": 0.0,
"downloadedCourseDryer27inchBase": "SUPERDRY",
"error": "ERROR_NO",
"remainTimeHour": 0.0,
"reduceStatic": "REDUCESTATIC_OFF",
"smartCourseDryer27inchBase": "NOT_SELECTED",
"dryLevel": "DRYLEVEL_VERYDRY",
"temp": "TEMP_MEDIUM",
"timeDry": "TIMEDRY_OFF",
"remainTimeMinute": 57.0,
"childLock": "CHILDLOCK_OFF"
},
Re: Python Plugin: LG Smart AC (SmartThinQ)
Hi,
After the Domoticz upgrade to 2020.1.. I need to have Buster installed.
Now I get errors on :
pi@raspberrypi:~/LGAC_SmartT $ sudo systemctl status lgac_serverW
● lgac_serverW.service - LG AC Device Server
Loaded: loaded (/lib/systemd/system/lgac_serverW.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2020-04-02 20:12:45 CEST; 10min ago
Process: 1643 ExecStart=/usr/bin/python3 /home/pi/LGAC_SmartT/LGACServerNewW.py (code=exited, status=1/FAILURE)
Main PID: 1643 (code=exited, status=1/FAILURE)
apr 02 20:12:44 raspberrypi systemd[1]: Started LG AC Device Server.
apr 02 20:12:45 raspberrypi python3[1643]: Traceback (most recent call last):
apr 02 20:12:45 raspberrypi python3[1643]: File "/home/pi/LGAC_SmartT/LGACServerNewW.py", line 12, in <module>
apr 02 20:12:45 raspberrypi python3[1643]: import msgpack
apr 02 20:12:45 raspberrypi python3[1643]: ModuleNotFoundError: No module named 'msgpack'
apr 02 20:12:45 raspberrypi systemd[1]: lgac_serverW.service: Main process exited, code=exited, status=1/FAILURE
apr 02 20:12:45 raspberrypi systemd[1]: lgac_serverW.service: Failed with result 'exit-code'.
So I need a solution for "IMPORT MSGPACK"
How can I solve this in Buster.... (in Stretch there are no problems)
After the Domoticz upgrade to 2020.1.. I need to have Buster installed.
Now I get errors on :
pi@raspberrypi:~/LGAC_SmartT $ sudo systemctl status lgac_serverW
● lgac_serverW.service - LG AC Device Server
Loaded: loaded (/lib/systemd/system/lgac_serverW.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2020-04-02 20:12:45 CEST; 10min ago
Process: 1643 ExecStart=/usr/bin/python3 /home/pi/LGAC_SmartT/LGACServerNewW.py (code=exited, status=1/FAILURE)
Main PID: 1643 (code=exited, status=1/FAILURE)
apr 02 20:12:44 raspberrypi systemd[1]: Started LG AC Device Server.
apr 02 20:12:45 raspberrypi python3[1643]: Traceback (most recent call last):
apr 02 20:12:45 raspberrypi python3[1643]: File "/home/pi/LGAC_SmartT/LGACServerNewW.py", line 12, in <module>
apr 02 20:12:45 raspberrypi python3[1643]: import msgpack
apr 02 20:12:45 raspberrypi python3[1643]: ModuleNotFoundError: No module named 'msgpack'
apr 02 20:12:45 raspberrypi systemd[1]: lgac_serverW.service: Main process exited, code=exited, status=1/FAILURE
apr 02 20:12:45 raspberrypi systemd[1]: lgac_serverW.service: Failed with result 'exit-code'.
So I need a solution for "IMPORT MSGPACK"
How can I solve this in Buster.... (in Stretch there are no problems)
RFXcom433e ver1009,Raspberry Pi,Domoticz v3.5877
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
-
- Posts: 1
- Joined: Sunday 21 June 2020 23:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
fix for errors with ssl:
sudo sed -i "s|TLSv1.2|TLSv1.0|g" /etc/ssl/openssl.cnf
sudo sed -i "s|TLSv1.2|TLSv1.0|g" /etc/ssl/openssl.cnf
-
- Posts: 16
- Joined: Thursday 23 January 2014 21:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Hi,
Anybody use a LG washer (new model) with this plugin ?
I have found this fork who display washer in list item but i don't how send an ON command :
https://github.com/tinkerborg/wideq
Sincerely
Anybody use a LG washer (new model) with this plugin ?
I have found this fork who display washer in list item but i don't how send an ON command :
https://github.com/tinkerborg/wideq
Sincerely
Re: Python Plugin: LG Smart AC (SmartThinQ)
Any update how to get this working on buster? The scripts are giving a lot of errors.
Re: Python Plugin: LG Smart AC (SmartThinQ)
How did you solve this? get the same error. With both Buster and StretchThierry33700 wrote: ↑Sunday 03 November 2019 15:41Hello luckymr2201,luckymr2201 wrote: ↑Monday 26 August 2019 8:53 Thierry,
Once you logged in using the provided URL you should see that the resulting URL has 3 data in it. access_token, refresh_token and oauth2_backend_url
This is all that would go in the resulting json file anyway.
I suggest you simply move to the next step using the raw information from the URL that you can copy / paste in a text editor.
I hope this will be enough to get you out of trouble.
Thanks for your help, unfortunately i was not able to go next step, i created a wideq_state.json file like follow :
"{
"access_token": "1ca3e111112234e543cfada616f65ee60493d136640adc1e1f841989a7fe9cf3350594da1c6ae485e6e6e8182f4f42451d",
"refresh_token": "194be3b7596111111a5eb8ee484e180d3adb4644a63fc4f8ce9709e3f1c696fb20d1329e022d56daab51ac820893bd7",
"oauth2_backend_url": "https://gb.lgeapi.com/"
}
"
But i had the same issue when running 'python3 example.py ls' :
Traceback (most recent call last):
File "example.py", line 214, in <module>
example(sys.argv[1:])
File "example.py", line 200, in example
example_command(client, args)
File "example.py", line 180, in example_command
func(client, *args[1:])
File "example.py", line 25, in ls
for device in client.devices:
File "/root/LGAC_SmartT/wideq.py", line 474, in devices
self._devices = self.session.get_devices()
File "/root/LGAC_SmartT/wideq.py", line 465, in session
self._session, self._devices = self.auth.start_session()
File "/root/LGAC_SmartT/wideq.py", line 257, in start_session
return Session(self, session_id), as_list(session_info['item'])
KeyError: 'item'
Can't go further. Hope someone has the same issue and help
Thx.
Thierry
-
- Posts: 4
- Joined: Sunday 18 August 2019 15:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Hello, i did not solve this problem,, can't use the plugin ;-(stingone wrote: ↑Saturday 27 June 2020 21:51How did you solve this? get the same error. With both Buster and StretchThierry33700 wrote: ↑Sunday 03 November 2019 15:41Hello luckymr2201,luckymr2201 wrote: ↑Monday 26 August 2019 8:53 Thierry,
Once you logged in using the provided URL you should see that the resulting URL has 3 data in it. access_token, refresh_token and oauth2_backend_url
This is all that would go in the resulting json file anyway.
I suggest you simply move to the next step using the raw information from the URL that you can copy / paste in a text editor.
I hope this will be enough to get you out of trouble.
Thanks for your help, unfortunately i was not able to go next step, i created a wideq_state.json file like follow :
"{
"access_token": "1ca3e111112234e543cfada616f65ee60493d136640adc1e1f841989a7fe9cf3350594da1c6ae485e6e6e8182f4f42451d",
"refresh_token": "194be3b7596111111a5eb8ee484e180d3adb4644a63fc4f8ce9709e3f1c696fb20d1329e022d56daab51ac820893bd7",
"oauth2_backend_url": "https://gb.lgeapi.com/"
}
"
But i had the same issue when running 'python3 example.py ls' :
Traceback (most recent call last):
File "example.py", line 214, in <module>
example(sys.argv[1:])
File "example.py", line 200, in example
example_command(client, args)
File "example.py", line 180, in example_command
func(client, *args[1:])
File "example.py", line 25, in ls
for device in client.devices:
File "/root/LGAC_SmartT/wideq.py", line 474, in devices
self._devices = self.session.get_devices()
File "/root/LGAC_SmartT/wideq.py", line 465, in session
self._session, self._devices = self.auth.start_session()
File "/root/LGAC_SmartT/wideq.py", line 257, in start_session
return Session(self, session_id), as_list(session_info['item'])
KeyError: 'item'
Can't go further. Hope someone has the same issue and help
Thx.
Thierry
Re: Python Plugin: LG Smart AC (SmartThinQ)
[/quote]
How did you solve this? get the same error. With both Buster and Stretch
[/quote]
Hello, i did not solve this problem,, can't use the plugin ;-(
[/quote]
Seems to be a APIv2 issue that is not implemented in this plugin.
How did you solve this? get the same error. With both Buster and Stretch
[/quote]
Hello, i did not solve this problem,, can't use the plugin ;-(
[/quote]
Seems to be a APIv2 issue that is not implemented in this plugin.
- heggink
- Posts: 972
- Joined: Tuesday 08 September 2015 21:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12451
- Location: NL
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Since this repo had not been updated for quite a while and there were a bunch of issues I encountered, Forked it and made a couple of changes:
- update to the latest msgpack (which has utf8 by default)
- that in turn allows plugin restart (thanks @dnpwwo!!!)
- some connection management optimisations
- general logging improvements
Tested on rpi3 / buster. Still many thanks to olinek2 for doing the work to begin with.
https://github.com/heggink/LGAC_SmartT
H
- update to the latest msgpack (which has utf8 by default)
- that in turn allows plugin restart (thanks @dnpwwo!!!)
- some connection management optimisations
- general logging improvements
Tested on rpi3 / buster. Still many thanks to olinek2 for doing the work to begin with.
https://github.com/heggink/LGAC_SmartT
H
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
-
- Posts: 4
- Joined: Sunday 18 August 2019 15:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ) - SOLVED
Hi,stingone wrote: ↑Saturday 27 June 2020 21:51How did you solve this? get the same error. With both Buster and StretchThierry33700 wrote: ↑Sunday 03 November 2019 15:41Hello luckymr2201,luckymr2201 wrote: ↑Monday 26 August 2019 8:53 Thierry,
Once you logged in using the provided URL you should see that the resulting URL has 3 data in it. access_token, refresh_token and oauth2_backend_url
This is all that would go in the resulting json file anyway.
I suggest you simply move to the next step using the raw information from the URL that you can copy / paste in a text editor.
I hope this will be enough to get you out of trouble.
Thanks for your help, unfortunately i was not able to go next step, i created a wideq_state.json file like follow :
"{
"access_token": "1ca3e111112234e543cfada616f65ee60493d136640adc1e1f841989a7fe9cf3350594da1c6ae485e6e6e8182f4f42451d",
"refresh_token": "194be3b7596111111a5eb8ee484e180d3adb4644a63fc4f8ce9709e3f1c696fb20d1329e022d56daab51ac820893bd7",
"oauth2_backend_url": "https://gb.lgeapi.com/"
}
"
But i had the same issue when running 'python3 example.py ls' :
Traceback (most recent call last):
File "example.py", line 214, in <module>
example(sys.argv[1:])
File "example.py", line 200, in example
example_command(client, args)
File "example.py", line 180, in example_command
func(client, *args[1:])
File "example.py", line 25, in ls
for device in client.devices:
File "/root/LGAC_SmartT/wideq.py", line 474, in devices
self._devices = self.session.get_devices()
File "/root/LGAC_SmartT/wideq.py", line 465, in session
self._session, self._devices = self.auth.start_session()
File "/root/LGAC_SmartT/wideq.py", line 257, in start_session
return Session(self, session_id), as_list(session_info['item'])
KeyError: 'item'
Can't go further. Hope someone has the same issue and help
Thx.
Thierry
After lot of several new tests, i succeded. Here is what i did to make it work.
First, i deleted /home/pi/LGAC_SmartT folder:
sudo rm -rf LGAC_SmartT/
then i choosed fork from https://github.com/heggink/LGAC_SmartT. - Thanks to heggink !!!
I followed mostly his installation process, get the same problem ... BUT then i had the idea to change this line in the installation process :
python3 example.py
was changed into
sudo python3 example.py
then everything worked for the server.
Then in domoticz, i get the following errors in domoticz's logs :
...
2020-10-04 11:42:09.327 Error: (LG-SmartThinq-AC) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/LG-SThinq-AC/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2020-10-04 11:42:09.328 Error: (Clim_Salon) Module Import failed, exception: 'AttributeError'
2020-10-04 11:42:09.328 Error: (Clim_Salon) Error Line details not available.
2020-10-04 11:43:20.329 Error: Clim_Salon hardware (7) thread seems to have ended unexpectedly
..
I found a similar issue there : https://github.com/mrin/domoticz-mirobo ... /issues/26
So i followed to type :
sudo pip3 install -U --ignore-installed msgpack=="0.6.2"
Then domoticz started to use the plugin !!
Next i'll add others Climatisers by creating duplications of the server scripts as explain.
And i will now prepare or look for a script to manage start and stop within a given temperature in the room.
Thanks to all developpers that worked on this.
Thierry
-
- Posts: 20
- Joined: Sunday 30 December 2018 19:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Oss NL
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
I'm still getting the same error
...
7&oauth2_backend_url=https://gb.lgeapi.com/
Traceback (most recent call last):
File "example.py", line 214, in <module>
example(sys.argv[1:])
File "example.py", line 200, in example
example_command(client, args)
File "example.py", line 177, in example_command
ls(client)
File "example.py", line 25, in ls
for device in client.devices:
File "/home/pi/LGAC_SmartT/wideq.py", line 474, in devices
self._devices = self.session.get_devices()
File "/home/pi/LGAC_SmartT/wideq.py", line 465, in session
self._session, self._devices = self.auth.start_session()
File "/home/pi/LGAC_SmartT/wideq.py", line 257, in start_session
return Session(self, session_id), as_list(session_info['item'])
KeyError: 'item'
pi@raspberrypi:~/LGAC_SmartT $
I used the sudo python3 example.py
anyone else?
...
7&oauth2_backend_url=https://gb.lgeapi.com/
Traceback (most recent call last):
File "example.py", line 214, in <module>
example(sys.argv[1:])
File "example.py", line 200, in example
example_command(client, args)
File "example.py", line 177, in example_command
ls(client)
File "example.py", line 25, in ls
for device in client.devices:
File "/home/pi/LGAC_SmartT/wideq.py", line 474, in devices
self._devices = self.session.get_devices()
File "/home/pi/LGAC_SmartT/wideq.py", line 465, in session
self._session, self._devices = self.auth.start_session()
File "/home/pi/LGAC_SmartT/wideq.py", line 257, in start_session
return Session(self, session_id), as_list(session_info['item'])
KeyError: 'item'
pi@raspberrypi:~/LGAC_SmartT $
I used the sudo python3 example.py
anyone else?
-
- Posts: 34
- Joined: Friday 02 February 2018 16:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: LG Smart AC (SmartThinQ)
Thank you! works . Domoticz plugin expected?mattl0 wrote: ↑Wednesday 25 March 2020 5:49 Do you plan to support washer and dryer ?
I can see them with https://github.com/gladhorn/wideq/tree/api2_merged and it works.
this is the command i used to registerCode: Select all
python3 example.py -c CA -l en-CA
this is the washing machien when using it
Code: Select all
[code] "washerDryer": { "extraRinse": "EXTRARINSE_OFF", "stainCare": "STAINCARE_OFF", "initialTimeMinute": 6.0, "smartCourseTLBaseUS": "NOT_SELECTED", "waterPlus": "WATERPLUS_OFF", "addGarment": "ADDGARMENT_OFF", "remoteStart": "REMOTE_START_OFF", "state": "RUNNING", "doorLock": "DOOR_LOCK_ON", "wifiSDS": "WIFI_SDS_OFF", "smallUE": "SMALLUE_OFF", "turboWash": "TURBOWASH_ON", "preState": "DETECTING", "spin": "SPIN_EXTRA_HIGH", "initialBit": "INITIAL_BIT_OFF", "reserveTimeMinute": 0.0, "initialTimeHour": 1.0, "reserveTimeHour": 0.0, "error": "ERROR_NO", "remainTimeHour": 1.0, "courseTLBaseUS": "PREWASH_PLUS", "rinse": "NO_RINSE", "soilWash": "SOILWASH_NORMAL", "dnnReady": "DNNREADY_OFF", "preWash": "PREWASH_OFF", "soak": "SOAK_OFF", "TCLCount": 1.0, "temp": "TEMP_TAP_COLD", "fabricSoftener": "FABRICSOFTENER_OFF", "downloadedCourseTLBaseUS": "SMALL_LOAD", "soakBit": "SOAK_OFF", "coldWash": "COLDWASH_OFF", "saveEnergy": "SAVE_ENERGY_OFF", "remainTimeMinute": 3.0, "steam": "STEAM_OFF", "childLock": "CHILDLOCK_OFF" },
And this is the dryer when i use it :
Code: Select all
"washerDryer": { "dampDrySignal": "DAMPDRYSIGNAL_OFF", "initialTimeMinute": 59.0, "antiBacterial": "ANTIBACTERIAL_OFF", "remoteStart": "REMOTE_START_OFF", "state": "DRYING", "energySaver": "ENERGYSAVER_OFF", "easyIron": "EASYIRON_OFF", "moreLessTime": 0.0, "turboSteam": "TURBOSTEAM_OFF", "courseDryer27inchBase": "NORMAL", "wrinkleCare": "WRINKLECARE_OFF", "preState": "INITIAL", "initialBit": "INITIAL_BIT_OFF", "loadItem": "LOADITEM_OFF", "initialTimeHour": 0.0, "downloadedCourseDryer27inchBase": "SUPERDRY", "error": "ERROR_NO", "remainTimeHour": 0.0, "reduceStatic": "REDUCESTATIC_OFF", "smartCourseDryer27inchBase": "NOT_SELECTED", "dryLevel": "DRYLEVEL_VERYDRY", "temp": "TEMP_MEDIUM", "timeDry": "TIMEDRY_OFF", "remainTimeMinute": 57.0, "childLock": "CHILDLOCK_OFF" },
Who is online
Users browsing this forum: No registered users and 0 guests