thinq2-python
thinq2-python copied to clipboard
URL and JSON format for controlling v2 devices
Another question. Does anyone already know the URL and JSON format for controlling v2 devices? I guess it starts with the thinq2Uri from the gateway-uri response...
Thanks!
Too bad, nobody knows yet. I would love to do some additional debugging but I am unable to remove the certificate pinning in the LG ThinQ APK. I tried but I am just not smart enough :(
Any suggestions are appreciated!
Sorry, not ignoring you, I'm just better explaining with code than with words. :) I'm ramping up dev work on this project this week, and will be adding control features that you should be able to use as an example.
Is your phone rooted?
No worries, your work and commitment to this project is highly appreciated!
Yes, I have a rooted phone.
Hi, just curious on the progress of controlling v2 devices. Any update?
Thanks!
Hi, any clue on how to work around the certificate pinning in the LG app? I would love to see how far I can get by tracing the API calls from it...
Hi @tinkerborg ! Not sure how far you are with the controlling of v2 devices, and I know you are better with code than with words but perhaps you could share a little around this topic? Maybe just a json example we can work with? Thanks!!
Found it!
POST: https://eic-service.lgthinq.com:46030/v1/service/devices/[your-device-id]/control-sync (for the base URL, use the thinq2Uri from the gateway-uri response)
On: {"command":"Operation","ctrlKey":"basicCtrl","dataKey":"airState.operation","dataValue":"1"} Off: {"command":"Operation","ctrlKey":"basicCtrl","dataKey":"airState.operation","dataValue":"0"} Set Temp: {"command": "Set","ctrlKey": "basicCtrl","dataKey": "airState.tempState.target","dataValue": 22}
@tinkerborg @stefxx did you make any progress on controlling things with this? With help from an OpenHAB Community thread I've got this reporting the status of my washer, and being able to start it remotely without the app would help a lot
Controlling fans and other appliances can be done with the info above. Starting a washer is much more complicated, and since I don't see any benefit in it, I never tried. I did grab the required json command here: https://github.com/ollo69/ha-smartthinq-sensors/issues/47
@stefxx Thanks for the reply, it gives me a clue and where to keep an eye on. The benefit is it would allow the washer to start when I have spare Solar Power and theres nobody home. We have a lot of localised long white clouds around here, and powers not cheap :-)