From 35b3be3a13f94a5cfb915f0ff110c2b66aac6c15 Mon Sep 17 00:00:00 2001 From: Yuxin Wang Date: Mon, 14 Apr 2025 21:03:29 -0400 Subject: [PATCH 1/8] Add prerequsite to APCUPSD --- source/_integrations/apcupsd.markdown | 30 ++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/source/_integrations/apcupsd.markdown b/source/_integrations/apcupsd.markdown index 862dec901ffe..b2662077540e 100644 --- a/source/_integrations/apcupsd.markdown +++ b/source/_integrations/apcupsd.markdown @@ -20,22 +20,38 @@ ha_integration_type: integration [apcupsd](http://www.apcupsd.org/) status information can be integrated into Home Assistant when the Network Information Server (NIS) is configured on the APC device. -There is currently support for the following device types within Home Assistant: +## Prerequisites -- [Binary sensor](#binary-sensor) -- [Sensor](#sensors) +1. **Install apcupsd** -## Home Assistant add-on installation + First, install [apcupsd](http://www.apcupsd.org/) on the machine connected to your UPS. It works on Linux, macOS, Windows, BSD, Solaris, and more. + You can usually install it through your operating system’s package manager. For example: -Install this [unofficial add-on](https://github.com/korylprince/hassio-apcupsd/) to use this integration with Home Assistant. Keep in mind that we can't give you support for this add-on. + - **Ubuntu/Debian**: `sudo apt install apcupsd` + - **Red Hat/Fedora**: `sudo dnf install apcupsd` + - **macOS** (with Homebrew): `brew install apcupsd` + - **Windows**: Download the installer from the [apcupsd website](http://www.apcupsd.org/) -After installation, follow the instructions on the GitHub page to configure the plugin. Then continue to follow the integration configurations below. +2. **Configure apcupsd for network access** + + Open the `apcupsd.conf` file (usually found in `/etc/apcupsd/`) and make sure it’s set to listen for network connections. + Look for the line: `NISIP 0.0.0.0` + This setting allows it to accept connections on all network interfaces. + If you prefer, you can set this to a specific IP address that Home Assistant can reach. + +3. **Start the apcupsd service** + + Once it’s configured, start the service: + + - **Linux (systemd)**: `sudo systemctl start apcupsd` + - **macOS**: Use `brew services start apcupsd` + - **Windows**: apcupsd usually starts automatically, or you can start it via the Services panel. {% include integrations/config_flow.md %} {% note %} -If you get `ConnectionRefusedError: Connection refused` errors in the Home Assistant logs, ensure the [apcupsd](http://www.apcupsd.org/) configuration directives used by its Network Information Server is set to permit connections from all addresses NISIP 0.0.0.0, else non-local addresses will not connect. +If you get `ConnectionRefusedError: Connection refused` errors in the Home Assistant logs, it means that Home Assistant is not able to connect to the daemon. Please check if the `NISIP` is properly configured. {% endnote %} From 4f92c39af693942741c20df1f32cda78381fc215 Mon Sep 17 00:00:00 2001 From: Yuxin Wang Date: Thu, 17 Apr 2025 23:16:13 -0400 Subject: [PATCH 2/8] Update source/_integrations/apcupsd.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/apcupsd.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/apcupsd.markdown b/source/_integrations/apcupsd.markdown index b2662077540e..e6749be54088 100644 --- a/source/_integrations/apcupsd.markdown +++ b/source/_integrations/apcupsd.markdown @@ -22,7 +22,7 @@ ha_integration_type: integration ## Prerequisites -1. **Install apcupsd** +1. Install apcupsd. First, install [apcupsd](http://www.apcupsd.org/) on the machine connected to your UPS. It works on Linux, macOS, Windows, BSD, Solaris, and more. You can usually install it through your operating system’s package manager. For example: From e932faa53b2218b9314cf7f643e72f7d5d4a2393 Mon Sep 17 00:00:00 2001 From: Yuxin Wang Date: Thu, 17 Apr 2025 23:16:38 -0400 Subject: [PATCH 3/8] Update source/_integrations/apcupsd.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/apcupsd.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/apcupsd.markdown b/source/_integrations/apcupsd.markdown index e6749be54088..9476ddbe0327 100644 --- a/source/_integrations/apcupsd.markdown +++ b/source/_integrations/apcupsd.markdown @@ -25,7 +25,7 @@ ha_integration_type: integration 1. Install apcupsd. First, install [apcupsd](http://www.apcupsd.org/) on the machine connected to your UPS. It works on Linux, macOS, Windows, BSD, Solaris, and more. - You can usually install it through your operating system’s package manager. For example: + You can usually install it through your operating system’s package manager. - **Ubuntu/Debian**: `sudo apt install apcupsd` - **Red Hat/Fedora**: `sudo dnf install apcupsd` From 3ad016383deb9d24b8128008b3859b6ea8e394b7 Mon Sep 17 00:00:00 2001 From: Yuxin Wang Date: Thu, 17 Apr 2025 23:16:44 -0400 Subject: [PATCH 4/8] Update source/_integrations/apcupsd.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/apcupsd.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/apcupsd.markdown b/source/_integrations/apcupsd.markdown index 9476ddbe0327..c1b7477af492 100644 --- a/source/_integrations/apcupsd.markdown +++ b/source/_integrations/apcupsd.markdown @@ -32,7 +32,7 @@ ha_integration_type: integration - **macOS** (with Homebrew): `brew install apcupsd` - **Windows**: Download the installer from the [apcupsd website](http://www.apcupsd.org/) -2. **Configure apcupsd for network access** +2. Configure apcupsd for network access. Open the `apcupsd.conf` file (usually found in `/etc/apcupsd/`) and make sure it’s set to listen for network connections. Look for the line: `NISIP 0.0.0.0` From a84a3daaf0775115a8d5ec4bc6f2ac552f70436c Mon Sep 17 00:00:00 2001 From: Yuxin Wang Date: Thu, 17 Apr 2025 23:16:55 -0400 Subject: [PATCH 5/8] Update source/_integrations/apcupsd.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/apcupsd.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/_integrations/apcupsd.markdown b/source/_integrations/apcupsd.markdown index c1b7477af492..be2e52880c22 100644 --- a/source/_integrations/apcupsd.markdown +++ b/source/_integrations/apcupsd.markdown @@ -34,10 +34,10 @@ ha_integration_type: integration 2. Configure apcupsd for network access. - Open the `apcupsd.conf` file (usually found in `/etc/apcupsd/`) and make sure it’s set to listen for network connections. - Look for the line: `NISIP 0.0.0.0` - This setting allows it to accept connections on all network interfaces. - If you prefer, you can set this to a specific IP address that Home Assistant can reach. + - Open the `apcupsd.conf` file (usually found in `/etc/apcupsd/`) and make sure it’s set to listen for network connections. + - Look for the line: `NISIP 0.0.0.0`. + - This setting allows it to accept connections on all network interfaces. + - If you prefer, you can set this to a specific IP address that Home Assistant can reach. 3. **Start the apcupsd service** From 1a4bce1d46b65a41e871c2740a349e70278f001a Mon Sep 17 00:00:00 2001 From: Yuxin Wang Date: Thu, 17 Apr 2025 23:17:01 -0400 Subject: [PATCH 6/8] Update source/_integrations/apcupsd.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/apcupsd.markdown | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/_integrations/apcupsd.markdown b/source/_integrations/apcupsd.markdown index be2e52880c22..577a06544a53 100644 --- a/source/_integrations/apcupsd.markdown +++ b/source/_integrations/apcupsd.markdown @@ -41,12 +41,6 @@ ha_integration_type: integration 3. **Start the apcupsd service** - Once it’s configured, start the service: - - - **Linux (systemd)**: `sudo systemctl start apcupsd` - - **macOS**: Use `brew services start apcupsd` - - **Windows**: apcupsd usually starts automatically, or you can start it via the Services panel. - {% include integrations/config_flow.md %} {% note %} From 888ae9b6b8bee5617bcfb320efa9466511896a40 Mon Sep 17 00:00:00 2001 From: Yuxin Wang Date: Thu, 17 Apr 2025 23:17:06 -0400 Subject: [PATCH 7/8] Update source/_integrations/apcupsd.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/apcupsd.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/apcupsd.markdown b/source/_integrations/apcupsd.markdown index 577a06544a53..5167336405ef 100644 --- a/source/_integrations/apcupsd.markdown +++ b/source/_integrations/apcupsd.markdown @@ -39,7 +39,7 @@ ha_integration_type: integration - This setting allows it to accept connections on all network interfaces. - If you prefer, you can set this to a specific IP address that Home Assistant can reach. -3. **Start the apcupsd service** +3. Start the apcupsd service. {% include integrations/config_flow.md %} From ecebdfc03ceb1a4d86904d669e9341490a513ce3 Mon Sep 17 00:00:00 2001 From: Yuxin Wang Date: Thu, 17 Apr 2025 23:17:12 -0400 Subject: [PATCH 8/8] Update source/_integrations/apcupsd.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/apcupsd.markdown | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/_integrations/apcupsd.markdown b/source/_integrations/apcupsd.markdown index 5167336405ef..4ff8c0edebcd 100644 --- a/source/_integrations/apcupsd.markdown +++ b/source/_integrations/apcupsd.markdown @@ -27,10 +27,6 @@ ha_integration_type: integration First, install [apcupsd](http://www.apcupsd.org/) on the machine connected to your UPS. It works on Linux, macOS, Windows, BSD, Solaris, and more. You can usually install it through your operating system’s package manager. - - **Ubuntu/Debian**: `sudo apt install apcupsd` - - **Red Hat/Fedora**: `sudo dnf install apcupsd` - - **macOS** (with Homebrew): `brew install apcupsd` - - **Windows**: Download the installer from the [apcupsd website](http://www.apcupsd.org/) 2. Configure apcupsd for network access.