Optionaloptions: INUTClientOptionsAllow to authenticate user on the UPS
{string}
{string}
Destroy the client and release all resources. After calling destroy(), the client cannot be reused.
get the description of a command
Check if this client is master for the UPS
get number of clients logged (using LOGIN command)
Get the description of a UPS (from ups.conf desc= field).
The name of the UPS
The UPS description string
get the description of a variable
get the range of the variable
get the type of variable ... Defined by the NUT driver, default to NUMBER
get help
List the logged clients on the UPS
list the available commands on the UPS
List all the variables of the UPS
{string}
will log out from the server
get network protocol version
Optionalevent: keyof NUTClientEventsrun a command on the UPS
Optionalparam: string
Optional command parameter (e.g., delay in seconds)
Optionaloptions: TrackingOptions
Optional tracking options (followTracking, trackingTimeout, trackingPollInterval)
allow to send custom command
{string[]} the command to send
Optionaltimeout: number
{number} timeout for this command
Enable or disable command tracking for idempotent write operations.
When tracking is enabled, write commands (SET VAR, INSTCMD) return
OK TRACKING <uuid> instead of OK. The UUID can be polled via
getTracking to check the command outcome.
true to enable tracking, false to disable
allow to set a variable
Optionaloptions: TrackingOptions
Optional tracking options (followTracking, trackingTimeout, trackingPollInterval)
get server version
StaticcreateStatic factory method that creates a NUTClient and optionally authenticates when credentials are provided in options. Credentials are cleared from stored options after successful authentication to reduce the risk of credential leaks.
hostname or IP address
Optionalport: number
port number (default 3493)
Optionaloptions: INUTClientOptions
client options including optional credentials
Check if the client is currently connected to the NUT server.