thinq2-python icon indicating copy to clipboard operation
thinq2-python copied to clipboard

URL and JSON format for controlling v2 devices

Open stefxx opened this issue 5 years ago • 10 comments

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!

stefxx avatar May 16 '20 16:05 stefxx

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!

stefxx avatar May 19 '20 20:05 stefxx

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?

tinkerborg avatar May 20 '20 01:05 tinkerborg

No worries, your work and commitment to this project is highly appreciated!

Yes, I have a rooted phone.

stefxx avatar May 20 '20 06:05 stefxx

Hi, just curious on the progress of controlling v2 devices. Any update?

Thanks!

stefxx avatar May 27 '20 21:05 stefxx

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...

stefxx avatar Jun 04 '20 09:06 stefxx

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!!

stefxx avatar Jun 14 '20 09:06 stefxx

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}

stefxx avatar Jun 18 '20 14:06 stefxx

@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

sheppy99 avatar Oct 24 '20 00:10 sheppy99

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 avatar Oct 24 '20 06:10 stefxx

@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 :-)

sheppy99 avatar Oct 24 '20 23:10 sheppy99