Skip to content

Configuration

Erik Baauw edited this page Sep 24, 2022 · 1 revision

Best configure Homebridge UPS through the Homebridge UI.

Homebridge UPS is a platform plugin, and needs to be specified the platforms. Only one instance of Homebridge UPS may be configured per Homebridge instance.

The platform configuration takes the following keys:

Key Type Description
platform string The name under which Homebridge UPS has registered itself to Homebridge.
Must be specified and must be UPS.
name string Plugin name as displayed in the Homebridge log.
When missing, UPS will be used.
hosts array Array of host objects, one for each primary computer running NUT's upsd.
When missing, Homebridge UPS assumes a single entry with a host value of localhost:3493.
timeout integer Timeout in seconds to wait for a response from upsd. Default: 15.

Each entry in hosts takes the following keys:

Key Type Description
host string IP address or hostname and, optionally, port of upsd.
The IP address or hostname part is mandatory. The default port is 3493.
name string The name of the host running upsd.
When missing, the hostname or IP address from host is used, so this key is especially useful when specifying an IP address under host. When localhost is specified under host, the system hostname is used.
username string The username for the connection to upsd, as defined in upsd.users.
When missing, the value of UPS_USERNAME environment variable is used.
password string The password for the connection to upsd, as defined in upsd.users.
When missing, the value of UPS_PASSWORD environment variable is used.

Note that username and password are not mandatory, but are needed to control the UPS devices connected to upsd.

Example

{
    "platforms": [
	{
	    "platform": "UPS",
	    "name": "UPS",
	    "hosts": [
	    	{
		    "host": "192.168.xxx.xx1",
                    "name": "ds1",
                    "username": "upsadmin",
                    "password": "secret"
		},
	    	{
		    "host": "ds2",
                    "username": "upsadmin",
                    "password": "secret"
		},
	    	{
		    "host": "pi4",
                    "username": "upsadmin",
                    "password": "secret"
		}
	    ]
	},
        "timeout": 15
    ]
}
Clone this wiki locally