I have written plugin for LG Smart AC devices. It is in it's early stage (for me it is operating in Domoticz for past few months). Finally I have finished readme

https://github.com/olinek2/LGAC_SmartT
Best regards,
Olek
Moderator: leecollings
Code: Select all
apt-get install python3 python3-dev
apt-get install libffi-dev libssl-dev
apt-get install python3-gevent python3-msgpack python3-greenlet python-gevent-websocket python-setuptools
Code: Select all
#! /bin/sh
### BEGIN INIT INFO
# Provides: perso
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Home Automation System
# Description: This daemon will start the Server LG AC
### END INIT INFO
case "$1" in
start)
echo "Start LG Server"
# run application you want to start
nohup python3 (***)/LGAC_SmartT/LGACServerNew.py &
;;
stop)
echo "Stopping LG Server"
# kill application you want to stop
killall python3
;;
*)
echo "Usage: /etc/init.d/lgac_server{start|stop}"
exit 1
;;
esac
exit 0
Code: Select all
sys.path.append('/usr/lib/python3/dist-packages')
Code: Select all
2019-02-17 08:54:01.205 Error: (Clim - Salle) 'onMessage' failed 'TypeError'.
2019-02-17 08:54:01.205 Error: (Clim - Salle) ----> Line 329 in /domoticz/plugins/LG-SThinq-AC/plugin.py, function onMessage
2019-02-17 08:54:01.205 Error: (Clim - Salle) ----> Line 209 in /domoticz/plugins/LG-SThinq-AC/plugin.py, function onMessage
2019-02-17 08:54:07.079 Error: (Clim - Chambre 1) 'onMessage' failed 'TypeError'.
2019-02-17 08:54:07.079 Error: (Clim - Chambre 1) ----> Line 329 in /domoticz/plugins/LG-SThinq-AC/plugin.py, function onMessage
2019-02-17 08:54:07.079 Error: (Clim - Chambre 1) ----> Line 209 in /domoticz/plugins/LG-SThinq-AC/plugin.py, function onMessage
2019-02-17 08:54:12.156 Error: (Clim - Chambre 2) 'onMessage' failed 'TypeError'.
2019-02-17 08:54:12.156 Error: (Clim - Chambre 2) ----> Line 329 in /domoticz/plugins/LG-SThinq-AC/plugin.py, function onMessage
2019-02-17 08:54:12.156 Error: (Clim - Chambre 2) ----> Line 209 in /domoticz/plugins/LG-SThinq-AC/plugin.py, function onMessage
So in my case format of AC Device Number is slightly different that in your example:wideq.TokenError
2019-04-14T07:03:27Z <Greenlet at 0x7591c718: ac_commands_handler('AC_XXXXXX_PL', 'd27b3ec0-XXXX-XXXX-XXXX-XXXXXXXXXXXX', <Queue at 0x75ee3b20>)> failed with TokenError
Code: Select all
server: Starting server on 127.0.0.1 22233
Traceback (most recent call last):
File "./LGACServerNew.py", line 105, in ac_commands_handler
ac.monitor_start()
File "/srv/LGAC_SmartT/wideq.py", line 888, in monitor_start
self.mon.start()
File "/srv/LGAC_SmartT/wideq.py", line 391, in start
self.work_id = self.session.monitor_start(self.device_id)
File "/srv/LGAC_SmartT/wideq.py", line 302, in monitor_start
'workId': gen_uuid(),
File "/srv/LGAC_SmartT/wideq.py", line 281, in post
return lgedm_post(url, data, self.auth.access_token, self.session_id)
File "/srv/LGAC_SmartT/wideq.py", line 122, in lgedm_post
raise APIError(code, message)
wideq.APIError: ('0106', '\uc7a5\uce58\uac00 \uc811\uc18d\uc911\uc774 \uc544\ub2d9\ub2c8\ub2e4.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
File "./LGACServerNew.py", line 136, in ac_commands_handler
ac.monitor_stop()
File "/srv/LGAC_SmartT/wideq.py", line 893, in monitor_stop
self.mon.stop()
File "/srv/LGAC_SmartT/wideq.py", line 394, in stop
self.session.monitor_stop(self.device_id, self.work_id)
AttributeError: 'Monitor' object has no attribute 'work_id'
2019-08-12T17:52:54Z <Greenlet at 0x7fa6958148: ac_commands_handler('xxxx', 'yyyy, <Queue at 0x7fa68e48d0>)> failed with AttributeError
Hello 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.
Users browsing this forum: Bing [Bot], pfloryann and 1 guest