GithubHelp home page GithubHelp logo

cswelin / wideq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ollo69/wideq

0.0 0.0 0.0 283 KB

reverse-engineered client for the LG SmartThinQ API

Home Page: https://pypi.org/project/wideq/

License: MIT License

Python 100.00%

wideq's Introduction

PyPI CircleCI

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, and the discussion can be found here. 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>: Like mon, 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.

Development

This project uses the Black code formatting tool. Before submitting pull requests, please run Black to ensure consistent formatting.

If you like, you can install a git hook to automatically run Black and flake8 every time you commit. Install the pre-commit tool and type pre-commit install to use it.

Credits

This is by Adrian Sampson. The license is MIT. I also made a Home Assistant component that uses wideq.

wideq's People

Contributors

aklimov-work avatar ankushduacodes avatar bindismal avatar boralyl avatar ctih avatar dacrypt avatar dermotduffy avatar ehn avatar eljojo avatar fabiomsouto avatar gholliday avatar gladhorn avatar icolwell avatar krocans avatar krystof-k avatar ncovercash avatar no2chem avatar nordron avatar ollo69 avatar pifou25 avatar sampsyo avatar stboch avatar swails avatar ticky avatar wonchulkang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.