DobissSharp is a C# .NET wrapper for the domotics system Dobiss NXT. It contains a REST api wrapper (MichelMichels.DobissSharp.Api
) and an opiniated C# library which consumes previous wrapper (MichelMichels.DobissSharp
).
Table of Contents
- .NET 8.0
- A Dobiss NXT system
Warning
Package MichelMichels.DobissSharp
is in development and is subject to breaking changes. Use this at own risk.
Package name | Version | Description |
---|---|---|
MichelMichels.DobissSharp.Api |
Reference implementation of the REST API | |
MichelMichels.DobissSharp |
Opiniated C# class library |
Get the NuGet packages from nuget.org or search for MichelMichels.DobissSharp
in the GUI package manager in Visual Studio.
You can also use the cli of the package manager with following command:
Install-Package MichelMichels.DobissSharp.Api
Install-Package MichelMichels.DobissSharp
Creating the API client:
DobissClientOptions options = new()
{
BaseUrl = @"http://dobiss.local/",
SecretKey = "your-secret-api-key",
};
DobissClient apiClient = new(options);
Calls:
// Discover
DiscoverResponse response = await apiClient.Discover();
// Status
StatusResponse response = await apiClient.Status();
// Action
ActionRequest body = new()
{
AddressId = 0,
ChannelId = 12,
ActionId = ActionId.Toggle,
};
ActionResponse response = await apiClient.Action(body);
Creating the service:
// See previous code example for creating the API client
DobissService dobiss = new(apiClient);
See the interface IDobissService
for more information. This is still in development and subject to breaking changes.
Visit the API documentation page of Dobiss NXT for more in-depth information about the API.
- Created by Michel Michels.