Constructors
constructor
- new RawNUTClient(host, port?): RawNUTClient
Parameters
- host: string
- port: number = 3493
Accessors
client
- get client(): Socket | TLSSocket
Returns Socket | TLSSocket
connected
- get connected(): boolean
Returns boolean
- set connected(value): void
Returns void
Methods
connect
- connect(username, password): Promise<void>
Parameters
- username: string
- password: string
Returns Promise<void>
getCommandDescription
- getCommandDescription(ups, command): Promise<string>
Parameters
- ups: string
- command: string
Returns Promise<string>
getNumLogins
- getNumLogins(ups): Promise<number>
Returns Promise<number>
getVariable
- getVariable(ups, variable): Promise<string>
Parameters
- ups: string
- variable: string
Returns Promise<string>
getVariableDescription
- getVariableDescription(ups, variable): Promise<string>
Parameters
- ups: string
- variable: string
Returns Promise<string>
getVariableEnum
- getVariableEnum(ups, variable): Promise<string[]>
Parameters
- ups: string
- variable: string
Returns Promise<string[]>
getVariableRange
- getVariableRange(ups, variable): Promise<string[]>
Parameters
- ups: string
- variable: string
Returns Promise<string[]>
getVariableType
- getVariableType(ups, variable): Promise<string>
Parameters
- ups: string
- variable: string
Returns Promise<string>
help
- help(): Promise<string>
Returns Promise<string>
listClients
- listClients(ups): Promise<string[]>
Returns Promise<string[]>
listCommands
- listCommands(ups): Promise<string[]>
Returns Promise<string[]>
listUPS
- listUPS(): Promise<string[]>
Returns Promise<string[]>
listVariables
- listVariables(ups): Promise<string[]>
Returns Promise<string[]>
listWriteableVariables
- listWriteableVariables(ups): Promise<string[]>
Returns Promise<string[]>
login
- login(ups): Promise<string>
Returns Promise<string>
logout
- logout(): Promise<string>
Returns Promise<string>
netVersion
- netVersion(): Promise<string>
Returns Promise<string>
runCommand
- runCommand(ups, command): Promise<string>
Parameters
- ups: string
- command: string
Returns Promise<string>
send
- send(cmdParts, timeout?): Promise<string>
Parameters
- cmdParts: string[]
Optional
timeout: number
Returns Promise<string>
setVariable
- setVariable(ups, variable, value): Promise<string>
Parameters
- ups: string
- variable: string
- value: unknown
Returns Promise<string>
startTLS
- startTLS(tlsOptions?): Promise<void>
Parameters
Optional
tlsOptions: Omit<ConnectionOptions, "socket" | "host" | "port">
Returns Promise<void>
version
- version(): Promise<string>
Returns Promise<string>
Reserved for advanced uses, use NUTClient