APC UPS information

Has anyone been succesfull in pulling temperature information from APC UPS? I’ve installed the Network UPS Tools Add-On and the NUT integration but it doesn’t show temperature. I have the APC Network Card, the information is available via the Web Page, possibly can be also sent by setting SNMP traps into HA?

You need to include you APC-UPS model and the network card model. There can be differences but with NO info hard to say.
Otherwise, yes it all works fine.

Hi,
Side question…May I ask what card this is?
Just as an FYI, I installed NUT Server/driver on Ubuntu machine connected to an APC
via USB (No Ethernet available) and running the upsc command on Ubuntu, (this command gets all the supported parameters) in my case there isn’t any temperature. I have the NUT Integration installed on HA and connected to the NUT Server and the HA sensors created are very similar to those listed in the upsc command.

Any details? Below is my current add-on config:

- name: smt1500i
  driver: usbhid-ups
  port: auto
  config:
    - vendorid = "051d*"

Do I need another section similar to this?

driver: snmp-ups
port: 166.99.224.132:170
...

It’s an AP9630 UPS Network Management Card 2. Not sure if the battery temperature information is a feature of the network card. Battery temperature is displayed both the UPS front screen (by cycling through the status) or via the Web portal of the card.

This is my APC-UPS:

Right two panels are via the NUT, the left is via SMTP

My card is the very old 9600.

This is in my configuration.yaml file, it is for the SMTP.

# snmp apc smartups 1000xl
#sensor:
  - platform: snmp
    name: ups_smart_capacity
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.2.2.1.0
    accept_errors: true
    unit_of_measurement: '%'
  - platform: snmp
    name: ups_smart_runtime_remaining
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.2.2.3.0
    accept_errors: true
    value_template: >-
      {% set time = (value | int) / 100 | int %}
      {% set minutes = ((time % 3600) / 60) | int %}
      {% set hours = ((time % 86400) / 3600) | int %}
      {% set days = (time / 86400) | int %}
    
      {%- if time < 60 -%}
        Less than a minute
        {%- else -%}
        {%- if days > 0 -%}
          {{ days }}d
        {%- endif -%}
        {%- if hours > 0 -%}
          {%- if days > 0 -%}
            {{ ' ' }}
          {%- endif -%}
          {{ hours }}h
        {%- endif -%}
        {%- if minutes > 0 -%}
          {%- if days > 0 or hours > 0 -%}
            {{ ' ' }}
          {%- endif -%}
          {{ minutes }}m
        {%- endif -%}
      {%- endif -%}
  - platform: snmp
    name: ups_smart_load_percentage
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.4.2.3.0
    accept_errors: true
    unit_of_measurement: '%'
  - platform: snmp
    name: ups_smart_battery_temperature
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.2.2.2.0
    accept_errors: true
    unit_of_measurement: '°C'
  - platform: snmp
    name: ups_smart_battery_status
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.2.2.4.0
    accept_errors: true
    value_template: >-
      {%if value == '1' %}
        Good
      {% elif value == '2' %}
        Failed
      {% endif %}
  - platform: snmp
    name: ups_smart_type
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.1.1.1.0
    accept_errors: true
  - platform: snmp
    name: ups_smart_input_voltage
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.3.2.1.0
    accept_errors: true
    unit_of_measurement: 'V'
  - platform: snmp
    name: ups_smart_last_transfer_reason
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.3.2.5.0
    accept_errors: true
    value_template: >-
      {%if value == '1' %}
        No events
      {% elif value == '2' %}
        High line voltage
      {% elif value == '3' %}
        Brownout
      {% elif value == '4' %}
        Loss of mains power
      {% elif value == '5' %}
        Small temporary power drop
      {% elif value == '6' %}
        Large temporary power drop
      {% elif value == '7' %}
        Small spike
      {% elif value == '8' %}
        Large spike
      {% elif value == '9' %}
        UPS self test
      {% elif value == '10' %}
        Excessive input voltage fluctuation
      {% endif %}
  - platform: snmp
    name: ups_smart_output_load
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.4.2.3.0
    accept_errors: true
    unit_of_measurement: '%'
  - platform: snmp
    name: ups_smart_output_current
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.4.2.4.0
    accept_errors: true
    unit_of_measurement: 'A'
  - platform: snmp
    name: ups_smart_last_self_test_result
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.7.2.3.0
    accept_errors: true
    value_template: >-
      {%if value == '1' %}
        OK
      {% elif value == '2' %}
        Failed
      {% elif value == '3' %}
        Invalid Test
      {% elif value == '4' %}
        Test In Progress
      {% endif %}
  - platform: snmp
    name: ups_smart_last_self_test_date
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.7.2.4.0
    accept_errors: true
  - platform: snmp
    name: ups_smart_communication_status
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.8.1.0
    accept_errors: true
    value_template: >-
      {%if value == '1' %}
        on
      {% elif value == '2' %}
        off
      {% endif %}
  - platform: snmp
    name: ups_smart_status
    host: 192.168.1.15
    baseoid: 1.3.6.1.4.1.318.1.1.1.4.1.1.0
    accept_errors: true
    value_template: >-
      {%if value == '1' %}
        Unknown
      {% elif value == '2' %}
        On Line
      {% elif value == '3' %}
        On Battery
      {% elif value == '4' %}
        On Smart Boost
      {% elif value == '5' %}
        Timed Sleeping
      {% elif value == '6' %}
        Software Bypass
      {% elif value == '7' %}
        Off
      {% elif value == '8' %}
        Rebooting
      {% elif value == '9' %}
        Switched Bypass
      {% elif value == '10' %}
        Hardware Failure Bypass
      {% elif value == '11' %}
        Sleeping Until Power Returns
      {% elif value == '12' %}
        On Smart Trim
      {% endif %}

For the NUT, go into devices, find NUT open it and check the entities, I have 27 listed. What is your count?
Some may have to be enabled if they are not.

1 Like