Smdn.TPSmartHomeDevices.Primitives
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package Smdn.TPSmartHomeDevices.Primitives --version 1.0.0
NuGet\Install-Package Smdn.TPSmartHomeDevices.Primitives -Version 1.0.0
<PackageReference Include="Smdn.TPSmartHomeDevices.Primitives" Version="1.0.0" />
paket add Smdn.TPSmartHomeDevices.Primitives --version 1.0.0
#r "nuget: Smdn.TPSmartHomeDevices.Primitives, 1.0.0"
// Install Smdn.TPSmartHomeDevices.Primitives as a Cake Addin #addin nuget:?package=Smdn.TPSmartHomeDevices.Primitives&version=1.0.0 // Install Smdn.TPSmartHomeDevices.Primitives as a Cake Tool #tool nuget:?package=Smdn.TPSmartHomeDevices.Primitives&version=1.0.0
Smdn.TPSmartHomeDevices.Primitives 1.0.0
Smdn.TPSmartHomeDevices.Primitives
is a library common to the Smdn.TPSmartHomeDevices.Tapo and Smdn.TPSmartHomeDevices.Kasa
that provides types such as abstraction interfaces, extension methods and custom JsonConverter
s.
This library provides no specific implementations to operate Tapo and Kasa devices.
Contributing
This project welcomes contributions, feedbacks and suggestions. You can contribute to this project by submitting Issues or Pull Requests on the GitHub repository.
Notice
License
This project is licensed under the terms of the MIT License.
Disclaimer
(An English translation for the reference follows the text written in Japanese.)
本プロジェクトは、TP-Linkとは無関係の非公式なものです。
This is an unofficial project that has no affiliation with TP-Link.
本プロジェクトが提供するソフトウェアは、デバイスの設定の取得・変更等、製品仕様の範囲内での操作のみを行うものであり、ファームウェアの改変・修正および製品の改造や製品仕様の変更を引き起こさないものの、製品使用上の許諾事項に抵触する可能性は否定できないため、使用の際はその点にご留意ください。
The software provided by this project is intended only for operations within the scope of the product specifications, such as acquiring and changing device settings, and while it does not cause altering the product itself, product's firmware or operating specifications. Nevertheless, please note that the possibility of violating terms of use of the product cannot be dismissed when using the software provided by this project.
Tapo、Kasa、および各製品名の著作権はTP-Linkに帰属します。
Tapo, Kasa and all respective product names are copyright of TP-Link.
Credit
This project incorporates implementations partially ported from the following projects. See also ThirdPartyNotices.md for detail.
- fishbigger/TapoP100
- europowergenerators/Tapo-plug-controller
- plasticrake/tplink-smarthome-api
- plasticrake/tplink-smarthome-crypto
API List
List of APIs exposed by assembly Smdn.TPSmartHomeDevices.Primitives-1.0.0
(net6.0)
// Smdn.TPSmartHomeDevices.Primitives.dll (Smdn.TPSmartHomeDevices.Primitives-1.0.0)
// Name: Smdn.TPSmartHomeDevices.Primitives
// AssemblyVersion: 1.0.0.0
// InformationalVersion: 1.0.0+2f8665ad485a16dee6305868cbf80f3089f4d60d
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Text.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
#nullable enable annotations
using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Smdn.TPSmartHomeDevices;
using Smdn.TPSmartHomeDevices.Json;
namespace Smdn.TPSmartHomeDevices {
public interface IDeviceEndPoint {
ValueTask<EndPoint?> ResolveAsync(CancellationToken cancellationToken = default);
}
public interface IDeviceEndPointFactory<TAddress> where TAddress : notnull {
IDeviceEndPoint Create(TAddress address);
}
public interface IDynamicDeviceEndPoint : IDeviceEndPoint {
void Invalidate();
}
public static class DeviceEndPoint {
public static IDeviceEndPoint Create(EndPoint endPoint) {}
public static IDeviceEndPoint Create(IPAddress ipAddress) {}
public static IDeviceEndPoint Create(string host) {}
public static IDeviceEndPoint Create<TAddress>(TAddress address, IDeviceEndPointFactory<TAddress> endPointFactory) where TAddress : notnull {}
}
public static class DeviceEndPointFactoryServiceCollectionExtensions {
public static IServiceCollection AddDeviceEndPointFactory<TAddress>(this IServiceCollection services, IDeviceEndPointFactory<TAddress> endPointFactory) where TAddress : notnull {}
}
public class DeviceEndPointResolutionException : Exception {
public DeviceEndPointResolutionException(IDeviceEndPoint deviceEndPoint) {}
public DeviceEndPointResolutionException(IDeviceEndPoint deviceEndPoint, string message, Exception? innerException) {}
public IDeviceEndPoint DeviceEndPoint { get; }
}
public static class IDeviceEndPointExtensions {
public static ValueTask<EndPoint> ResolveOrThrowAsync(this IDeviceEndPoint deviceEndPoint, int defaultPort, CancellationToken cancellationToken = default) {}
}
public sealed class StaticDeviceEndPoint : IDeviceEndPoint {
public StaticDeviceEndPoint(EndPoint endPoint) {}
public ValueTask<EndPoint?> ResolveAsync(CancellationToken cancellationToken = default) {}
public override string? ToString() {}
}
}
namespace Smdn.TPSmartHomeDevices.Json {
public sealed class GeolocationInDecimalDegreesJsonConverter : JsonConverter<decimal?> {
public GeolocationInDecimalDegreesJsonConverter() {}
public override decimal? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) {}
public override void Write(Utf8JsonWriter writer, decimal? @value, JsonSerializerOptions options) {}
}
public sealed class MacAddressJsonConverter : JsonConverter<PhysicalAddress> {
public MacAddressJsonConverter() {}
public override PhysicalAddress? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) {}
public override void Write(Utf8JsonWriter writer, PhysicalAddress @value, JsonSerializerOptions options) {}
}
public sealed class TimeSpanInMinutesJsonConverter : TimeSpanJsonConverter {
public TimeSpanInMinutesJsonConverter() {}
protected override TimeSpan ToTimeSpan(int @value) {}
}
public sealed class TimeSpanInSecondsJsonConverter : TimeSpanJsonConverter {
public TimeSpanInSecondsJsonConverter() {}
protected override TimeSpan ToTimeSpan(int @value) {}
}
public abstract class TimeSpanJsonConverter : JsonConverter<TimeSpan?> {
protected TimeSpanJsonConverter() {}
public override TimeSpan? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) {}
protected abstract TimeSpan ToTimeSpan(int @value);
public override void Write(Utf8JsonWriter writer, TimeSpan? @value, JsonSerializerOptions options) {}
}
}
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.2.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.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 | 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 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- System.Text.Json (>= 6.0.0)
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- System.Text.Json (>= 6.0.0)
-
net6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- System.Text.Json (>= 6.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Smdn.TPSmartHomeDevices.Primitives:
Package | Downloads |
---|---|
Smdn.TPSmartHomeDevices.Tapo
Provides APIs for operating Tapo devices, the TP-Link smart home devices. |
|
Smdn.TPSmartHomeDevices.Kasa
Provides APIs for operating Kasa devices, the TP-Link smart home devices. |
|
Smdn.TPSmartHomeDevices.MacAddressEndPoint
An extension library to add a service to Smdn.TPSmartHomeDevices.Tapo and Smdn.TPSmartHomeDevices.Kasa that enables the resolution of devices' endpoints by MAC address. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.1.1 | 108 | 10/9/2024 |
1.1.0 | 675 | 1/23/2024 |
1.1.0-preview3 | 167 | 1/18/2024 |
1.1.0-preview2 | 179 | 1/16/2024 |
1.1.0-preview1 | 212 | 1/8/2024 |
1.0.1 | 202 | 5/2/2023 |
1.0.0 | 870 | 5/2/2023 |
1.0.0-rc1 | 415 | 4/27/2023 |