From 6741a5225b1dfd7c378e7ae5ce47d3c451613895 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Sat, 23 Feb 2019 10:16:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9C=20Merges/Redirect=20Apcupsd=20comp?= =?UTF-8?q?onent=20pages=20(#8697)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_components/apcupsd.markdown | 100 +++++++++++++++++- .../binary_sensor.apcupsd.markdown | 34 ------ source/_components/sensor.apcupsd.markdown | 76 ------------- 3 files changed, 99 insertions(+), 111 deletions(-) delete mode 100644 source/_components/binary_sensor.apcupsd.markdown delete mode 100644 source/_components/sensor.apcupsd.markdown diff --git a/source/_components/apcupsd.markdown b/source/_components/apcupsd.markdown index aba2d754d22..789b81c6a6c 100644 --- a/source/_components/apcupsd.markdown +++ b/source/_components/apcupsd.markdown @@ -8,12 +8,24 @@ comments: false sharing: true footer: true logo: apcupsd.png -ha_category: System Monitor +ha_category: + - System Monitor + - Binary Sensor + - Sensor ha_release: 0.13 +ha_iot_class: "Local Polling" +redirect_from: + - /components/binary_sensor.apcupsd/ + - /components/sensor.apcupsd/ --- [APCUPSd](http://www.apcupsd.org/) status information can be integrated into Home Assistant when the Network Information Server (NIS) [is configured](http://www.apcupsd.org/manual/manual.html#nis-server-client-configuration-using-the-net-driver) is enabled on the APC device. +There is currently support for the following device types within Home Assistant: + +- [Binary Sensor](#binary-sensor) +- [Sensor](#sensor) + ## {% linkable_title Configuration %} To enable this sensor, add the following lines to your `configuration.yaml`: @@ -39,3 +51,89 @@ port:

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](http://www.apcupsd.org/manual/manual.html#configuration-directives-used-by-the-network-information-server), else non-local addesses will not connect. This includes Hass.io running in Docker, even when hosted on the same machine or a virtual machine.

+ +## {% linkable_title Binary sensor %} + +In addition to the [APCUPSd Sensor](#sensor) devices, you may also create a device which is simply "on" when the UPS status is online and "off" at all other times. + +### {% linkable_title Configuration %} + +To enable this sensor, you first have to set up apcupsd component (above), and add the following lines to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +binary_sensor: + - platform: apcupsd +``` + +{% configuration %} +name: + description: Name to use in the frontend. + required: false + type: string + default: UPS Online Status +{% endconfiguration %} + +## {% linkable_title Sensor %} + + The `apcupsd` sensor platform allows you to monitor a UPS (battery backup) by using data from the [apcaccess](http://linux.die.net/man/8/apcaccess) command. + +### {% linkable_title Configuration %} + +To use this sensor platform, you first have to set up apcupsd component (above), and add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: apcupsd + resources: + - bcharge + - linev +``` + +{% configuration %} +resources: + description: Contains all entries to display. + required: true + type: list +{% endconfiguration %} + +### {% linkable_title Example %} + +Given the following output from `apcaccess`: + +```yaml +APC : 001,051,1149 +DATE : 2016-02-09 17:13:31 +0000 +HOSTNAME : localhost +VERSION : 3.14.12 (29 March 2014) redhat +UPSNAME : netrack +CABLE : Custom Cable Smart +DRIVER : APC Smart UPS (any) +UPSMODE : Stand Alone +STARTTIME: 2016-02-09 16:06:47 +0000 +MODEL : SMART-UPS 1400 +STATUS : TRIM ONLINE +LINEV : 247.0 Volts +LOADPCT : 13.0 Percent +BCHARGE : 100.0 Percent +TIMELEFT : 104.0 Minutes +MBATTCHG : 5 Percent +MINTIMEL : 3 Minutes +MAXTIME : 0 Seconds +MAXLINEV : 249.6 Volts +MINLINEV : 244.4 Volts +OUTPUTV : 218.4 Volts +[...] +``` + +Use the (case insensitive) values from the left hand column: + +```yaml +sensor: + - platform: apcupsd + resources: + - linev + - loadpct + - timeleft +``` diff --git a/source/_components/binary_sensor.apcupsd.markdown b/source/_components/binary_sensor.apcupsd.markdown deleted file mode 100644 index 30a124785a2..00000000000 --- a/source/_components/binary_sensor.apcupsd.markdown +++ /dev/null @@ -1,34 +0,0 @@ ---- -layout: page -title: APCUPSd Binary Sensor -description: "Instructions on how to set up an APCUPSd binary sensor within Home Assistant." -date: 2016-02-10 18:47 -sidebar: true -comments: false -sharing: true -footer: true -logo: apcupsd.png -ha_category: System Monitor -ha_release: 0.13 -ha_iot_class: "Local Polling" ---- - -In addition to the [APCUPSd Sensor](/components/sensor.apcupsd/) devices, you may also create a device which is simply "on" when the UPS status is online and "off" at all other times. - -## {% linkable_title Configuration %} - -To enable this sensor, you first have to set up [apcupsd](/components/apcupsd/), and add the following lines to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -binary_sensor: - - platform: apcupsd -``` - -{% configuration %} -name: - description: Name to use in the frontend. - required: false - type: string - default: UPS Online Status -{% endconfiguration %} diff --git a/source/_components/sensor.apcupsd.markdown b/source/_components/sensor.apcupsd.markdown deleted file mode 100644 index 74e2c9735bf..00000000000 --- a/source/_components/sensor.apcupsd.markdown +++ /dev/null @@ -1,76 +0,0 @@ ---- -layout: page -title: "APCUPSd Sensor" -description: "Instructions on how to set up APCUPSd sensors within Home Assistant." -date: 2016-02-10 18:28 -sidebar: true -comments: false -sharing: true -footer: true -logo: apcupsd.png -ha_release: 0.13 -ha_category: System Monitor -ha_iot_class: "Local Polling" ---- - -The `apcupsd` sensor platform allows you to monitor a UPS (battery backup) by using data from the [apcaccess](http://linux.die.net/man/8/apcaccess) command. - -## {% linkable_title Configuration %} - -To use this sensor platform, you first have to set up [apcupsd](/components/apcupsd/), and add the following to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -sensor: - - platform: apcupsd - resources: - - bcharge - - linev -``` - -{% configuration %} -resources: - description: Contains all entries to display. - required: true - type: list -{% endconfiguration %} - -### {% linkable_title Example %} - -Given the following output from `apcaccess`: - -```yaml -APC : 001,051,1149 -DATE : 2016-02-09 17:13:31 +0000 -HOSTNAME : localhost -VERSION : 3.14.12 (29 March 2014) redhat -UPSNAME : netrack -CABLE : Custom Cable Smart -DRIVER : APC Smart UPS (any) -UPSMODE : Stand Alone -STARTTIME: 2016-02-09 16:06:47 +0000 -MODEL : SMART-UPS 1400 -STATUS : TRIM ONLINE -LINEV : 247.0 Volts -LOADPCT : 13.0 Percent -BCHARGE : 100.0 Percent -TIMELEFT : 104.0 Minutes -MBATTCHG : 5 Percent -MINTIMEL : 3 Minutes -MAXTIME : 0 Seconds -MAXLINEV : 249.6 Volts -MINLINEV : 244.4 Volts -OUTPUTV : 218.4 Volts -[...] -``` - -Use the (case insensitive) values from the left hand column: - -```yaml -sensor: - - platform: apcupsd - resources: - - linev - - loadpct - - timeleft -```