Ipercube.NUT.Ups.Query
1.0.1
dotnet add package Ipercube.NUT.Ups.Query --version 1.0.1
NuGet\Install-Package Ipercube.NUT.Ups.Query -Version 1.0.1
<PackageReference Include="Ipercube.NUT.Ups.Query" Version="1.0.1" />
<PackageVersion Include="Ipercube.NUT.Ups.Query" Version="1.0.1" />
<PackageReference Include="Ipercube.NUT.Ups.Query" />
paket add Ipercube.NUT.Ups.Query --version 1.0.1
#r "nuget: Ipercube.NUT.Ups.Query, 1.0.1"
#:package Ipercube.NUT.Ups.Query@1.0.1
#addin nuget:?package=Ipercube.NUT.Ups.Query&version=1.0.1
#tool nuget:?package=Ipercube.NUT.Ups.Query&version=1.0.1
Ipercube.NUT.Ups.Query
This package provides the external command-line tool upsc.exe and all required native libraries used to query UPS devices via Network UPS Tools (NUT).
The executable upsc is included as-is from the NUT project and is fully portable.
It does not depend on any specific .NET Framework or .NET runtime.
📦 Purpose
This package is designed to simplify UPS status queries from .NET applications by automatically deploying the following files into the output directory:
upsc.exelibusbclient-7.dlllibwinpthread-1.dlllibystre-0.dlllibtre-5.dll
Your application can then execute upsc.exe using standard .NET Process APIs.
🛠 Usage
Once the package is referenced, the upsc tool is automatically copied to:
bin\Debug\netX.Y\upsc.exe
Example usage in VB.NET:
Imports System.Diagnostics
Public Class NutUpsQuery
Public Function Query(queryString As String) As String
' queryString examples:
' return the battery.charge value: "ups@localhost battery.charge"
' return all availble values: "ups@localhost"
Dim psi As New ProcessStartInfo()
psi.FileName = "upsc.exe"
psi.Arguments = queryString
psi.RedirectStandardOutput = True
psi.UseShellExecute = False
psi.CreateNoWindow = True
Using p As Process = Process.Start(psi)
Dim output As String = p.StandardOutput.ReadToEnd()
p.WaitForExit()
Return output
End Using
End Function
End Class
📁 Included Files
All files are installed under a private nut folder inside the project and copied to the
output folder at build time:
tools/nut/upsc.exe
tools/nut/libusbclient-7.dll
tools/nut/libwinpthread-1.dll
tools/nut/libystre-0.dll
tools/nut/libtre-5.dll
🧩 Compatible With
- Any .NET Framework version
- Any .NET Core / .NET runtime version
- WinForms, WPF, Service apps, Console apps
The package contains native tools only, with no dependencies on .NET assemblies.
👤 Author
Ipercube
https://github.com/ipercube
⚠️ This package includes only the
upscquery tool.
It does not provide a full NUT client implementation or socket protocol support.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
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 |
|---|---|---|
| 1.0.1 | 199 | 11/26/2025 |