MiHomeLib 4.0.1

Requires NuGet 2.6 or higher.

dotnet add package MiHomeLib --version 4.0.1
                    
NuGet\Install-Package MiHomeLib -Version 4.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MiHomeLib" Version="4.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MiHomeLib" Version="4.0.1" />
                    
Directory.Packages.props
<PackageReference Include="MiHomeLib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MiHomeLib --version 4.0.1
                    
#r "nuget: MiHomeLib, 4.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MiHomeLib@4.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MiHomeLib&version=4.0.1
                    
Install as a Cake Addin
#tool nuget:?package=MiHomeLib&version=4.0.1
                    
Install as a Cake Tool

4.0.1

This release changes timing only; the public API is unchanged.

  • MQTT gateways no longer occupy a thread-pool thread while connecting and sending. Opening the connection, the CONNECT/CONNACK and SUBSCRIBE/SUBACK handshake, publishes and acknowledgements are awaited end to end.
  • A CancellationToken passed to an MQTT device command now also cancels waiting for the gateway connection and the write, not just the work before it.
  • Internal cleanup: one asynchronous device-discovery interface replaces the synchronous and asynchronous pair.

4.0.0

This is a breaking changes release. Review the release notes and migration guide before upgrading.

  • Removed the synchronous API and every other member marked obsolete in 3.5.0. Use the asynchronous methods and the typed replacements (LeftChannel/RightChannel, Contact, LightState, MotionDateUtc, GetInfoAsync).
  • Device and gateway constructors no longer access the network. Configure them with MiioDeviceOptions, Gateway2Options or MqttGatewayOptions, open the connection with ConnectAsync/DiscoverDevicesAsync and read miIO information with GetInfoAsync.
  • ToString() makes no network requests: XiaomiAirHumidifierV1 and XiaomiRobotVacuumCleanerV1 describe only the model and address; read the state with GetStatusAsync.
  • Events that reported a value now receive ValueChange<T> with Previous, Current and TimestampUtc. Event names and raising conditions are unchanged.
  • Every asynchronous method accepts an optional CancellationToken.
  • Inheritance is closed except for MiotGenericDevice, the supported base class for custom MIoT devices. Transport and discovery types are internal.
  • GetDevices() returns IReadOnlyList<GatewaySubDeviceBase>, and the library is annotated for nullable reference types.

Supported targets: .NET Standard 2.0, .NET Framework 4.6.1 and 4.6.2, and .NET 10.

Release notes and breaking changes: https://github.com/sergey-brutsky/mi-home/wiki/Release-Notes-4.0 Migration guide: https://github.com/sergey-brutsky/mi-home/wiki/Migration-4.0 Gateway setup guide: https://github.com/sergey-brutsky/mi-home/wiki/Gateway-Setup Worker Service guide: https://github.com/sergey-brutsky/mi-home/wiki/Worker-Service

Product 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 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 was computed. 
.NET Framework net461 is compatible.  net462 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.1 51 12/4/2026
4.0.0 100 12/3/2026
3.5.0 91 12/1/2026
3.4.1 134 11/30/2026
3.4.0 123 11/29/2026
3.3.1 127 11/28/2026
3.3.0 118 11/27/2026
3.2.1 98 11/25/2026
3.2.0 135 11/24/2026
3.1.0 189 11/23/2026
3.0.1 99 11/20/2026
3.0.0 108 11/18/2026
2.3.12 131 11/6/2026
2.3.11 156 9/30/2026
2.3.10 123 9/23/2026
2.3.9 130 9/13/2026
2.3.8 124 9/11/2026
2.3.7 150 9/9/2026
2.3.6 140 9/5/2026
2.3.5 288 10/13/2025
Loading failed

4.0.1
This release changes timing only; the public API is unchanged.
- MQTT gateways no longer occupy a thread-pool thread while connecting and sending. Opening the connection, the CONNECT/CONNACK and SUBSCRIBE/SUBACK handshake, publishes and acknowledgements are awaited end to end.
- A CancellationToken passed to an MQTT device command now also cancels waiting for the gateway connection and the write, not just the work before it.
- Internal cleanup: one asynchronous device-discovery interface replaces the synchronous and asynchronous pair. No public API was added or removed.

4.0.0
This is a breaking changes release. Review the release notes and migration guide before upgrading.
- Removed the synchronous API and every other member marked obsolete in 3.5.0. Use the asynchronous methods and the typed replacements (LeftChannel/RightChannel, Contact, LightState, MotionDateUtc, GetInfoAsync).
- Device and gateway constructors no longer access the network. Configure them with MiioDeviceOptions, Gateway2Options or MqttGatewayOptions, open the connection with ConnectAsync/DiscoverDevicesAsync and read miIO information with GetInfoAsync.
- ToString() makes no network requests: XiaomiAirHumidifierV1 and XiaomiRobotVacuumCleanerV1 describe only the model and address; read the state with GetStatusAsync.
- Events that reported a value now receive ValueChange<T> with Previous, Current and TimestampUtc. Event names and raising conditions are unchanged.
- Every asynchronous method accepts an optional CancellationToken.
- Inheritance is closed except for MiotGenericDevice, the supported base class for custom MIoT devices. Transport and discovery types are internal.
- GetDevices() returns IReadOnlyList<GatewaySubDeviceBase>, and the library is annotated for nullable reference types.

Supported targets: .NET Standard 2.0, .NET Framework 4.6.1 and 4.6.2, and .NET 10.
Release notes and breaking changes: https://github.com/sergey-brutsky/mi-home/wiki/Release-Notes-4.0
Migration guide: https://github.com/sergey-brutsky/mi-home/wiki/Migration-4.0