Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

A reverse engineered library for Magic Home enabled smart light devices for .NET Core

License

Notifications You must be signed in to change notification settings

ginomessmer/magic-home-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Magic Home Light SDK for .NET

Build Status https://www.nuget.org/packages/MagicHome.NET

This unofficial library lets you control Magic Home enabled lights that are connected to the same local area network.

Requirements

  • .NET Standard 2.0 or above
  • Magic Home enabled smart home light device that runs on LEDENET

Features

  • Connect to lights in network
  • Read properties of light
  • Set various properties of light such as power state, color
  • Easy to use

Install

Get it from https://www.nuget.org/packages/MagicHome.NET or with your favorite CLI tool:

Install-Package MagicHome.NET
dotnet add package MagicHome.NET

Show me the code

var light = new Light();
await light.ConnectAsync("192.168.0.10");

Console.WriteLine(light.Color);

await light.TurnOnAsync();

await light.SetColorAsync(Color.Red);
await Task.Delay(500);

await light.SetColorAsync(255, 255, 255);
await Task.Delay(500);

await light.RestoreAsync();
light.Dispose();

Credit where credit is due

This project was heavily inspired by

About

A reverse engineered library for Magic Home enabled smart light devices for .NET Core

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages