[go: up one dir, main page]

Skip to content

LG SmartThinq library to communicate to LG smart devices through the LG api

License

Notifications You must be signed in to change notification settings

evaanp/EP94.LgSmartThinq

Repository files navigation

EP94.LgSmartThinq

Package is deprecated, please use https://github.com/evaanp/EP94.ThinqSharp instead.

LG SmartThinq library to communicate to LG devices through the LG api Note: it is tested with apiv2, not v1. Library is in a very early stage and only ac is currently supported.

Please feel free to contribute if you have improvements, bugfixes, or want to create a client for a device other than an ac.

Install:

dotnet add package EP94.LgSmartThinq --version 0.1.1

Usage:

SmartThinqLogger.OnNewLogMessage += (message, logLevel, args) =>
{
    Console.WriteLine(message, args);
};
SmartThinqClient smartThinqClient = new SmartThinqClient();
smartThinqClient.OnInitializationSuccessful += async () =>
{
    List<Device> devices = await smartThinqClient.GetDevices();
    Device device = devices.First();
    var client = smartThinqClient.GetDeviceClient(device) as AcClient;

    Snapshot desired = new Snapshot()
    {
        IsOn = true,
        TargetTemperature = 25
    };
    bool success = await client.SetSnapshot(desired);
    Console.WriteLine("Success: " + success);
};
await smartThinqClient.Initialize("name@email.com", "password", "US", "en-US");

About

LG SmartThinq library to communicate to LG smart devices through the LG api

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages