Has anyone tried to repair the plug?
I include a working script
https://github.com/sampsyo/wideq
nice if someone adapted it to domoticz

Moderator: leecollings
Address in use normally means that something is already listening on that port so please check. Also, can you let me know what you have done up to that point? Was everything correctly installed (sudo pip3 install -e . and wideq.py data edited, what do you get if you issue python3 example.py ls and so on).johnny86 wrote: ↑Monday 25 January 2021 10:28 thanks for the info.
Through https://github.com/sampsyo/wideq I can, for example, turn on the air conditioning.
Unfortunately, something is not working for me https://github.com/heggink/LGAC_SmartT
maybe because I already have python 3.7?
It normally displays refresh_token and AC Device Number
On trial
python3 ./LGACServerNew.py
I have
if I give
sudo python3 testServer.py
can anyone help? I will be very grateful:)
Address in use normally means that something is already listening on that port so please check. Also, can you let me know what you have done up to that point? Was everything correctly installed (sudo pip3 install -e . and wideq.py data edited, what do you get if you issue python3 example.py ls and so on).
GATEWAY_URL = 'https://kic.lgthinq.com:46030/api/common/gatewayUriList'
APP_KEY = 'wideq'
SECURITY_KEY = 'nuts_securitykey'
DATA_ROOT = 'lgedmRoot'
COUNTRY = 'PL'
LANGUAGE = 'en-EN'
SVC_CODE = 'SVC202'
CLIENT_ID = 'LGAO221A02'
OAUTH_SECRET_KEY = 'c053c2a6ddeb7ad97cb0eed0dcb31cf8'
OAUTH_CLIENT_KEY = 'LGAO221A02'
DATE_FORMAT = '%a, %d %b %Y %H:%M:%S +0000'
OK, so when you say "wideq didn't edit", I did not create this plugin but worked on it in order to get it functioning again. I also just copied the installation instructions. In my case, I changed wideq.py to change the country to NL but not sure if that would make a difference. Did you also run this part of the installation instructions?johnny86 wrote: ↑Monday 25 January 2021 11:59 ok
my mistake because I ran lgac_server
Address in use normally means that something is already listening on that port so please check. Also, can you let me know what you have done up to that point? Was everything correctly installed (sudo pip3 install -e . and wideq.py data edited, what do you get if you issue python3 example.py ls and so on).
sudo systemctl stop lgac_server
Now I have
tried to change port but it didn't help - same error
wideq.py didn't edit, only LGACServerNew.py
GATEWAY_URL = 'https://kic.lgthinq.com:46030/api/common/gatewayUriList'
APP_KEY = 'wideq'
SECURITY_KEY = 'nuts_securitykey'
DATA_ROOT = 'lgedmRoot'
COUNTRY = 'PL'
LANGUAGE = 'en-EN'
SVC_CODE = 'SVC202'
CLIENT_ID = 'LGAO221A02'
OAUTH_SECRET_KEY = 'c053c2a6ddeb7ad97cb0eed0dcb31cf8'
OAUTH_CLIENT_KEY = 'LGAO221A02'
DATE_FORMAT = '%a, %d %b %Y %H:%M:%S +0000'
after changing the port and rebooting it is a little better
I don't know if it was supposed to be like that, but it's only a few minutes;)
UPDATE
I stopped at it
![]()
Code: Select all
Authenticate with the SmartThing service to get a refresh token by running the WideQ example script.Run this in the wideq directory:
sudo python3 example.py
The script will ask you to open a browser, log in, and then paste the URL you're redirected to. It will then write a JSON file called wideq_state.json.
Look inside this file for a key called "refresh_token" and copy the value.
2. Minor problem but may cause problem with ptk2021-01-25 15:36:26.399 (Klimatyzacja) Got: {b'state': b'off', b'mode': b'COOL', b'temp_actual': b'23.5', b'temp_setpoint': b'18', b'wind_strength': b'6', b'air_ionizer': b'0', b'cmd': b'status'}
2021-01-25 15:27:26.312 Error: Python Plugin System: (Klimatyzacja) 'onMessage' failed 'KeyError'.
2021-01-25 15:27:26.312 Error: Python Plugin System: (Klimatyzacja) ----> Line 336 in '/home/pi/domoticz/plugins/LG-SThinq-AC/plugin.py', function onMessage
2021-01-25 15:27:26.312 Error: Python Plugin System: (Klimatyzacja) ----> Line 129 in '/home/pi/domoticz/plugins/LG-SThinq-AC/plugin.py', function onMessage
# unpacker = Unpacker(encoding='utf-8')
unpacker = Unpacker()
In ssh is ok,unpacker = Unpacker(encoding='utf-8')
#unpacker = Unpacker()
It helped meself.unpacker = msgpack.Unpacker(encoding='utf-8')
Have you checked your token? May be has expired?When i stop and manually start the LGACServerNew.py I can see Domoticz requests but then the connection immediatly closes
Just put a link to your github repository here and i will add it to the Wiki plugins page.majki wrote: ↑Monday 19 July 2021 15:06 Hi. I have developed LG ThinQ domoticz plugin for v2 API. It's working with my Air Conditioner (PC12SQ).
What should I do to get this submitted to official plugin list on wiki? I tried to PM warren, but I can't and it seems that my account needs more reputation.
Excellent news. Is this compatible with the v1 logins as well? What is your GitHub repo? Love to see it.majki wrote:Hi. I have developed LG ThinQ domoticz plugin for v2 API. It's working with my Air Conditioner (PC12SQ).
What should I do to get this submitted to official plugin list on wiki? I tried to PM warren, but I can't and it seems that my account needs more reputation.
Users browsing this forum: No registered users and 1 guest