WiserHeatAPIv2 1.1.0.5
See the version list below for details.
dotnet add package WiserHeatAPIv2 --version 1.1.0.5
NuGet\Install-Package WiserHeatAPIv2 -Version 1.1.0.5
<PackageReference Include="WiserHeatAPIv2" Version="1.1.0.5" />
<PackageVersion Include="WiserHeatAPIv2" Version="1.1.0.5" />
<PackageReference Include="WiserHeatAPIv2" />
paket add WiserHeatAPIv2 --version 1.1.0.5
#r "nuget: WiserHeatAPIv2, 1.1.0.5"
#:package WiserHeatAPIv2@1.1.0.5
#addin nuget:?package=WiserHeatAPIv2&version=1.1.0.5
#tool nuget:?package=WiserHeatAPIv2&version=1.1.0.5
WiserHeatAPIv2
A .NET client library for the Drayton Wiser Heating local REST API, enabling discovery, monitoring, scheduling, and control of Wiser hubs, rooms, devices, hot water, smart plugs, lights, shutters, and related entities.
Drayton, Wiser, and Schneider Electric are trademarks of Schneider Electric SE, its subsidiaries, or affiliated companies. This project is an independent, unofficial .NET library and is not affiliated with or endorsed by Schneider Electric.
Release History
See the changelog for version history and fixes, and GitHub releases for release notes and packages.
Supported Platforms
| Target Framework | Supported |
|---|---|
| .NET 10 | ✅ |
| .NET Framework 4.7.2 | ✅ |
Overview
WiserHeatAPIv2 provides a strongly typed .NET wrapper around the local Wiser hub API. It supports:
- Direct connection to a Wiser hub by IP address and secret
- Local network discovery of Wiser hubs
- Reading and refreshing hub state
- Access to rooms, devices, schedules, hot water, system information, and capabilities
- Control operations for supported device types
- YAML and structured schedule import helpers
This .NET library is an adaptation of the original Python project wiserHeatAPIv2 by Mark Parker.
Installation
dotnet add package WiserHeatAPIv2
The official NuGet package is built with all optional feature areas enabled.
Conditional Features
The source project contains several feature areas controlled by compilation symbols:
SHUTTER— shutter-related types and functionalityLIGHT— lighting-related types and functionalityHEATACTUATOR— heating actuator supportOPENTHERM— OpenTherm-related support
The published NuGet package includes all of these optional capabilities.
Some direct dependencies currently resolve to prerelease package versions. These were introduced through vulnerability remediation recommended by Visual Studio and have been retained to avoid reintroducing the original security or compatibility issues without further validation.
Quick Start
Obtaining the Wiser secret
The Wiser hub secret is required to authenticate with the local API.
Reference: https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#controlling-the-system
To obtain it:
- Press the setup button on the HeatHub so that the light starts flashing.
- Look for the Wi-Fi network (SSID) called
WiserHeatXXXXXX, whereXXXXXXis the last 6 digits of the MAC address. - Connect to that network from a Windows, Linux, macOS, Android, or iPhone device.
- Open a browser and navigate to
http://192.168.8.1/secret. - The hub will return a string containing your system secret. Store this somewhere safe. If you are using the console test utility, place this value together with the hub IP address in
wiserkeys.params. - Press the setup button on the HeatHub again to return it to normal operation.
- Copy the secret and save it somewhere safe.
If you already know the hub IP address, you can connect directly. Otherwise, use the discovery helper shown below to find the hub first.
Connect to a hub
using WiserHeatApiV2;
var api = new WiserAPI("192.168.1.50", "your-wiser-secret");
await api.InitializeAsync();
Console.WriteLine($"System version: {api.System?.ActiveSystemVersion}");
Console.WriteLine($"Room count: {api.Rooms.All.Count}");
Discover hubs on the local network
using WiserHeatApiV2;
List<WiserDiscoveredHub> hubs = await WiserDiscovery.DiscoverHubAsync(60, 2);
foreach (var hub in hubs)
{
Console.WriteLine(hub.Url);
}
Inspect rooms and devices
using WiserHeatApiV2;
var api = new WiserAPI("192.168.1.50", "your-wiser-secret");
await api.InitializeAsync();
foreach (var room in api.Rooms.All)
{
Console.WriteLine($"{room.Name}: {room.CurrentTemperature}°C -> {room.CurrentTargetTemperature}°C");
}
foreach (var device in api.Devices.All)
{
Console.WriteLine($"{device.ProductType} #{device.Id}");
}
Refresh hub data
await api.ReadHubDataAsync();
Automated Tests
WiserHeatAPIv2.Tests is an offline NUnit 4 suite included in the main Visual Studio solution. It targets .NET Framework 4.7.2 and .NET 10, uses LangVersion=latest, and runs through Visual Studio Test Explorer with the NUnit adapter.
On Windows, with the .NET 10 SDK and .NET Framework 4.7.2 targeting pack installed:
dotnet test WiserHeatAPIv2.Tests/WiserHeatAPIv2.Tests.csproj --configuration Release
To run only one target, add --framework net472 or --framework net10.0. In Visual Studio, build the solution, open Test > Test Explorer, and run WiserHeatAPIv2.Tests.
The suite covers HTTP verbs, authentication, redirects, retry limits and response disposal, cancellation versus timeouts, JSON response handling, temperature and telemetry models, room and device commands, heating schedule export and assignment, initialization, refresh, and disposal. Synthetic hub responses are supplied through an in-memory HTTP handler; no hub, network access, secret, or local settings file is required. The tests do not operate physical devices.
GitHub CI runs both framework targets and uploads test results before packing the library. The test project is not packable and is not published to NuGet. This suite verifies client behavior against simulated responses; it does not validate discovery, real firmware behavior, or every device family.
Test Console
The solution includes WiserHeatAPIv2Test, a console application that exercises hub discovery, initialization, device listing, room inspection, and general API validation against a real Wiser installation.
Documentation
Full API documentation is published at oznetmaster.github.io/WiserHeatAPIv2.
Repository Contents
WiserHeatAPIv2— the main library project published to NuGetWiserHeatApp.Wpf— a WPF desktop application for interacting with and monitoring a Wiser systemWiserHeatAPIv2.Tests— automated offline NUnit tests for both supported frameworksWiserHeatAPIv2Test— a console-based test utility for exercising the API against a real hub
Acknowledgements
This is an independent .NET implementation, written from scratch. Behavioral and compatibility reference work in this project draws on the upstream Python wiserHeatAPIv2 project and its public documentation.
License
MIT © 2026 Neil Colvin — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Hafner.Compatibility.MetaPackage (>= 1.9.0)
- log4net (>= 3.3.1)
- Microsoft.Bcl.AsyncInterfaces (>= 11.0.0-preview.4.26230.115)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- Microsoft.Bcl.Memory (>= 11.0.0-preview.4.26230.115)
- Newtonsoft.Json (>= 13.0.5-beta1)
- System.Net.Http (>= 4.3.4)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- System.Threading.Tasks.Extensions (>= 4.6.3)
- YamlDotNet (>= 18.0.0)
-
net10.0
- log4net (>= 3.3.1)
- Newtonsoft.Json (>= 13.0.5-beta1)
- YamlDotNet (>= 18.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fix HTTP retry content disposal, preserve authentication and endpoint errors, distinguish caller cancellation from transport timeouts, apply updated secrets to subsequent requests, preserve Unicode response names, and retain HTTP/1.0 for redirected schedule requests. Add 112 offline NUnit tests for net472 and net10.0. See CHANGELOG.md for details.