Re: Python Plugin: LG Smart AC (SmartThinQ)
Posted: Saturday 29 February 2020 1:12
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
Open source Home Automation System
https://forum.domoticz.com/
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?
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?
Code: Select all
python3 example.py -c CA -l en-CA
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"
},
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"
},
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
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
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
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" },