tplink-smartdevices
1.0.0
See the version list below for details.
dotnet add package tplink-smartdevices --version 1.0.0
NuGet\Install-Package tplink-smartdevices -Version 1.0.0
<PackageReference Include="tplink-smartdevices" Version="1.0.0" />
paket add tplink-smartdevices --version 1.0.0
#r "nuget: tplink-smartdevices, 1.0.0"
// Install tplink-smartdevices as a Cake Addin #addin nuget:?package=tplink-smartdevices&version=1.0.0 // Install tplink-smartdevices as a Cake Tool #tool nuget:?package=tplink-smartdevices&version=1.0.0
tplink-smartdevices-netstandard
.NET Standard 1.6 Library for Discovering and Operating TP-Link Smart Devices
This library allows a developer to discover and operate TP-Link Smart Devices with C# applications such as Xamarin, UWP or .net framework. This includes support for TP-Link Smart Plugs HS100/105/110 as well as TP-Link Smart Bulbs KL/LB: 100/110/120/130.
This project is migrated to .net standard from Anthony Turner's TP-Link Smart Devices SDK: <br> https://github.com/anthturner/TPLinkSmartDevices <br> some minor changes have been made, e.g added asynchronous code, support of newer KL-series bulbs
Consult https://github.com/dotnet/standard/blob/master/docs/versions.md to see which .net platform versions can implement this library before using!
Prerequisites
Before using tplink-smartdevices your devices must be connected to the Wi-Fi network. This can be done using the TP-Link provided mobile app Kasa.
Usage
Use NuGet package manager to add a reference to this project, for example with dotnet cli:
> dotnet add package tplink-smartdevices --version 1.0.0
Discovery
// Runs in a async Task<List<XamarinTPLinkSmartDevice>>
var discoveredDevices = await new TPLinkDiscovery().Discover();
Example Usage
var smartPlug = new TPLinkSmartPlug("100.10.4.1");
smartPlug.OutletPowered = true; // Turn on relay
smartPlug.OutletPowered = false; // Turn off relay
var smartBulb = new TPLinkSmartBulb("100.10.4.2");
smartBulb.PoweredOn = true; // Turn on bulb
smartBulb.PoweredOn = false; // Turn off bulb
or after discovery:
foreach (var item in discoveredDevices)
{
if (item is TPLinkSmartPlug plug)
{
plug.OutletPowered = true;
}
else if (item is TPLinkSmartBulb bulb)
{
bulb.PoweredOn = true;
}
}
Disclaimer
I can not guarantee the functionality of this library as I only tested a HS100 and a KL130 in a Xamarin.Android application yet.
This library has no affiliation with TP-Link. TP-Link and all respective product names are copyright TP-Link Technologies Co, Ltd. and/or its subsidiaries and affiliates.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.6 is compatible. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 1.6
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 12.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.