home-assistant.io/source/_components/sensor.apcupsd.markdown
Tomek985 f1b4cc4493 Added required dependency (#877)
* Added required dependency

Since release 0.27.1 it became mandatory to define apcupsd and associated server and port. Missing configuration was not caught by validation script and it prevented all other sensors from loading. See more here:
https://community.home-assistant.io/t/0-27-1-broke-customize

* Updated per review

Followed @Landrash advise for cleaner approach
2016-09-01 14:58:01 +02:00

2.3 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category
layout title description date sidebar comments sharing footer logo ha_category
page APCUPSd Sensor Instructions on how to set up APCUPSd sensors within Home Assistant. 2016-02-10 18:28 true false true true apcupsd.png Sensor

The apcupsd sensor platform allows you to monitor a UPS (battery backup) by using data from the apcaccess command.

To use this sensor platform, you first have to set up apcupsd and add the following to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: apcupsd
    resources:
      - bcharge
      - linev
      - loadpct
      - nominv
      - nompower
      - numxfers
      - outputv
      - status
      - timeleft
      - tonbatt

Configuration variables:

  • resources array (Required): Contains all entries to display.

{% linkable_title Example %}

Given the following output from apcaccess:

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
SENSE    : High
DWAKE    : 0 Seconds
DSHUTD   : 180 Seconds
DLOWBATT : 2 Minutes
LOTRANS  : 196.0 Volts
HITRANS  : 253.0 Volts
RETPCT   : 15.0 Percent
ITEMP    : 30.6 C
ALARMDEL : Low Battery
BATTV    : 27.6 Volts
LINEFREQ : 50.0 Hz
LASTXFER : High line voltage
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 336
STATFLAG : 0x0500000A
DIPSW    : 0x00
REG1     : 0x00
REG2     : 0x00
REG3     : 0x00
MANDATE  : 07/13/99
SERIALNO : GS9888761008
BATTDATE : 13/11/15
NOMOUTV  : 230 Volts
NOMBATTV : 24.0 Volts
EXTBATTS : 0
FIRMWARE : 70.11.I
END APC  : 2016-02-09 17:13:46 +0000

Use the (case insensitive) values from the left hand column:

sensor:
  - platform: apcupsd
    resources:
      - linev
      - loadpct
      - itemp