Hi @sampsyo! Thanks for the work on the SmartThinq API. The library doesn't seem to currently work on the v2 API, and until it does, I suggest this small change to the readme so that people aren't creating issues or are confused as to why it doesn't work for them. I was confused for a little bit until I went through the issue tracker to figure out why I wasn't getting any devices. Of course, happy to help get v2 on track.
WideQ
⚠️ New users of LG SmartThinq: This library only works with v1 of the LG SmartThinq API. Work is currently underway to support the v2 API. If you recently created a LG SmartThinq account, this library will likely return 0 devices when you execute the ls
command.
A library for interacting with the "LG SmartThinq" system, which can control heat pumps and such. I reverse-engineered the API from their mobile app.
To try out the API, there is a simple command-line tool included here, called example.py
.
To use it, provide it with a country and language code via the -c
and -l
flags, respectively:
$ python3 example.py -c US -l en-US
LG accounts seem to be associated with specific countries, so be sure to use the one with which you originally created your account.
For Korean, for example, you'd use -c KR -l ko-KR
.
On first run, the script will ask you to log in with your LG account. Logging in with Google does not seem to work, but other methods (plain email & password, Facebook, and Amazon) do.
By default, the example just lists the devices associated with your account. You can also specify one of several other commands:
ls
: List devices (the default).mon <ID>
: Monitor a device continuously, printing out status information until you type control-C. Provide a device ID obtained from listing your devices.ac-mon <ID>
: Likemon
, but only for AC devices---prints out specific climate-related information in a more readable form.set-temp <ID> <TEMP>
: Set the target temperature for an AC or refrigerator device.set-temp-freezer <ID> <TEMP>
: Set the target freezer temperature for a refrigerator.turn <ID> <ONOFF>
: Turn an AC device on or off. Use "on" or "off" as the second argument.ac-config <ID>
: Print out some configuration information about an AC device.
Credits
This is by Adrian Sampson. The license is MIT. I also made a Home Assistant component that uses wideq.