CyberPower UPS - PowerPanel Cloud

Hi everyone,

I have been searching the forums for information on monitoring of CyberPower UPS via home assistant. There are a couple of setups that use the USB connection to the UPS that are either (a) directly connected to the home assistant instance, (b) connected to a Windows client or (c) connected to a Raspberry Pi running NUT.

For my usage, I was thinking of going the Raspberry Pi route with RPi Zero W (given the location). However, I stumbled on the RWCCARD100 wireless network card that works with CyberPower’s Power Panel Cloud service. I don’t like the cloud monitoring option (security, resilience, etc.) so I am not really looking for an integration with the cloud service (you get 3 year free service with the card purchase). However, I am wondering if there is a way to use the network connection internally?

I am tempted to buy the wireless card to try and see if there is a way to just use it locally on a the network with home assistant. However, I thought I ask to see if anyone else has experience with this and can tell me if this is wasted effort.

Many thanks :slight_smile:

1 Like

I’m using my Cyberpower UPS with RMCARD-205. I have it connected to PowerPanel appliance running as VM on ESX server (to manage shutdowns of MS, including HA itself) and also via USB to Synology NAS running NUT server. For connection with HA I use NUT integration from Synology. Other option is to use SNMP sensors - remote mansgemnt cards from Cyberpower expose quite a lot of information (more than NUT) this way. And it is obviously cloud-less…

Thanks for this explanation. It is helpful to know the options that are available. I guess my followup question is: does anyone have any experience with the RWCCARD100 wireless network card and what are the differences between options that card provides and the RMCARD205 . RMCARD205 is quite a bit more expensive and I suspect that the the wireless card can’t be used locally so you are forced to pay a cloud subscription fee.

The cloud card is actually on sale where I am, so I might actually buy it and see what I can find out!

1 Like

Just a quick update. The wireless cloud card works fine and comes with a three year subscription to their monitoring service. The cloud service is pretty easy to use and reliable in detecting the various conditions for the UPS almost immediately.

I’ve been trying to find an endpoint but haven’t had any success yet and unfortunately, Cyberpower doesn’t currently offer any APIs or officially documented ways of accessing the card.

The cards are super cheap where I am which is what makes this appealing but I suspect that might be because they want to get more users for their cloud monitoring.

I know that this is an old thread, but I am in a similar boat, having just bought the RCCARD100 cloud module. For posterity’s sake, here are my findings:

As far as I can tell there are exactly ZERO integrations points available with this card. I tried hacking around a bit with nmap to see if there is anything going on with the card in terms of ports open. The only thing of ANY interest that I can see with the card itself is that it does have port 80 open which hosts just a very simple debug page at /. Its possible that there are other endpoints exposed on that port, as I have not tried anything in terms of enumeration on it. The card was cheap enough that ill probably hang on to it, but I have already wired up a simple Pi zero to it to act as a NUT slave to my main NUT host. The card definitely isn’t hosting anything fun like SNMP (as I was led to believe by other posts online). That said, the level of information exposed by their cloud service, definitely isn’t what one would come to expect from NUT or anything similar. If you are looking to do networked monitoring, I would suggest either buying the RMCARD202 new (which is something like USD $400) or buying a $20 Pi Zero and a USB OTG cable and call it a day. Another possible option that is a little more expensive than the RCCARD100 is to go on eBay and find a used RMCARD202 for in the neighborhood of $80-$100 USD. Its a little more plug and play but will integrate with NUT directly as well as SNMP.

1 Like

Hi I am thinking of doing the same thing you did with your Cyberpower cloud management card, but I came across an open-source project called NUT and setting up your NUT server Network UPS monitoring with NUT server I will be running this on unraid

If you have a linux or windows pc with the Cyberpower UPS connected via USB, you can install the Cyberpower PowerPanel Business software (its free on their website) and then enable SNMP and use the SNMP integration in HA to read the data from the UPS.

Here is the configuration YAML that I use for retrieve the data from my Cyberpower UPS:

  ###############################
  #            UPS              #
  ###############################
  - platform: snmp
    host: 192.168.1.5
    baseoid: .1.3.6.1.4.1.3808.1.1.1.4.2.1.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Output Voltage
    value_template: '{{ (value | int / 10 ) }}'
    unit_of_measurement: "V"
    scan_interval: 60
  - platform: snmp
    host: 192.168.1.5
    baseoid: .1.3.6.1.4.1.3808.1.1.1.3.2.1.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Input Voltage
    value_template: '{{ (value | int / 10 ) }}'
    unit_of_measurement: "V"
    scan_interval: 60
  - platform: snmp
    host: 192.168.1.5
    baseoid: .1.3.6.1.4.1.3808.1.1.1.1.1.1.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Model
    scan_interval: 60
  - platform: snmp
    host: 192.168.1.5
    baseoid: .1.3.6.1.4.1.3808.1.1.1.4.1.1.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Status
    value_template: >
      {% set vals = {'1': 'unknown', '2':'onLine', '3':'onBattery', '4':'onBoost', '5':'sleep', '6':'off', '7':'rebooting'} %}
      {{vals[value]}}
    scan_interval: 30
  - platform: snmp
    host: 192.168.1.5
    baseoid:  .1.3.6.1.4.1.3808.1.1.1.3.2.6.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Advanced Status
    value_template: >
      {% set vals = {'1': 'normal', '2':'Over Voltage', '3':'Under Voltage', '4':'Frequency failure', '5':'Blackout'} %}
      {{vals[value]}}
    scan_interval: 60
  - platform: snmp
    host: 192.168.1.5
    baseoid: .1.3.6.1.4.1.3808.1.1.1.4.1.1.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Battery Status
    value_template: >
      {% set vals = {'1': 'unknown', '2':'Normal', '3':'Battery Low'} %}
      {{vals[value]}}
    scan_interval: 60
  - platform: snmp
    host: 192.168.1.5
    baseoid: .1.3.6.1.4.1.3808.1.1.1.2.2.1.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Battery Capacity
    value_template: '{{ (value | float) }}'
    unit_of_measurement: "%"
    scan_interval: 60
  - platform: snmp
    host: 192.168.1.5
    baseoid:  .1.3.6.1.4.1.3808.1.1.1.4.2.3.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Load
    value_template: '{{ (value | float) }}'
    unit_of_measurement: "%"
    scan_interval: 60
  - platform: snmp
    host: 192.168.1.5
    baseoid:  .1.3.6.1.4.1.3808.1.1.1.2.2.2.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Battery Voltage
    value_template: '{{ (value | int / 10 ) }}'
    unit_of_measurement: "V"
    scan_interval: 60
  - platform: snmp
    host: 192.168.1.5
    baseoid: .1.3.6.1.4.1.3808.1.1.1.2.2.4.0
    accept_errors: 'true'
    community: public
    port: 1161
    name: UPS Run Time Remaining
    value_template: >-
      {% set time = (value | int) | int %}
      {% set minutes = ((time % 360000) / 6000) | int%}
      {% set hours = ((time % 8640000) / 360000) | int %}
      {% set days = (time / 8640000) | int %}
      {%- if time < 60 -%}
        Less then 1 min
        {%- else -%}
        {%- if days > 0 -%}
          {{ days }}d
        {%- endif -%}
        {%- if hours > 0 -%}
          {%- if days > 0 -%}
            {{ ' ' }}
          {%- endif -%}
          {{ hours }}hr
        {%- endif -%}
        {%- if minutes > 0 -%}
          {%- if days > 0 or hours > 0 -%}
            {{ ' ' }}
          {%- endif -%}
          {{ minutes }}min
        {%- endif -%}
      {%- endif -%}
    scan_interval: 60
  - platform: template
    sensors:
      ups_battery_capacity:
        unit_of_measurement: "%"
        value_template: "{{ states('sensor.ups_battery_capacity_2') }}"
        friendly_name: "Battery Capacity"
        icon_template: >
          {% set level = states('sensor.ups_battery_capacity_2') | float | multiply(0.1) | round(0,"floor") | multiply(10)| round(0) %}
          {% if is_state('sensor.ups_status', 'onLine') and is_state('sensor.ups_battery_capacity_2' , '100.0' ) %}
            mdi:battery
          {% elif is_state('sensor.ups_status', 'onLine')  %}
            mdi:battery-charging-{{level}}
          {% else %}
            mdi:battery-{{level}}
          {% endif %}
3 Likes

Thank you for the contribution! I am having some difficulty getting this to work in HA though.

I have verified that SNMP is okay by running snmpwalk manually from my HA machine to the machine that has the UPS connected to it, and all the values you reference in the configuration come back with actual values, a few examples:

bill@raspberrypi:~/homeassistant/config $ snmpwalk -c public -v1 192.168.x.x .1.3.6.1.4.1.3808.1.1.1.1.1.1.0
iso.3.6.1.4.1.3808.1.1.1.1.1.1.0 = STRING: "CP1500PFCRM2U"
bill@raspberrypi:~/homeassistant/config $ snmpwalk -c public -v1 192.168.x.x .1.3.6.1.4.1.3808.1.1.1.4.1.1.0
iso.3.6.1.4.1.3808.1.1.1.4.1.1.0 = INTEGER: 2
bill@raspberrypi:~/homeassistant/config $ snmpwalk -c public -v1 192.168.x.x .1.3.6.1.4.1.3808.1.1.1.3.2.6.0
iso.3.6.1.4.1.3808.1.1.1.3.2.6.0 = INTEGER: 1
bill@raspberrypi:~/homeassistant/config $ snmpwalk -c public -v1 192.168.x.x .1.3.6.1.4.1.3808.1.1.1.4.1.1.0
iso.3.6.1.4.1.3808.1.1.1.4.1.1.0 = INTEGER: 2
bill@raspberrypi:~/homeassistant/config $ snmpwalk -c public -v1 192.168.x.x .1.3.6.1.4.1.3808.1.1.1.2.2.1.0
iso.3.6.1.4.1.3808.1.1.1.2.2.1.0 = Gauge32: 100
bill@raspberrypi:~/homeassistant/config $ snmpwalk -c public -v1 192.168.x.x .1.3.6.1.4.1.3808.1.1.1.2.2.2.0
iso.3.6.1.4.1.3808.1.1.1.2.2.2.0 = INTEGER: 274

However HA spits up a bunch of errors:

Logger: homeassistant.core
Source: core.py:1571
First occurred: 6:49:20 PM (1 occurrences)
Last logged: 6:49:20 PM

Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.<locals>._matched_event at 0x7ffec4e02b60> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.<locals>._matched_event at 0x7ffec4e02b60>>>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 658, in state
    numerical_value = int(value)
                      ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'unknown'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 661, in state
    numerical_value = float(value)
                      ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unknown'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1571, in async_fire_internal
    self._hass.async_run_hass_job(job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1429, in __call__
    self.hass.async_run_hass_job(self.listener_job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/start.py", line 44, in _matched_event
    hass.async_run_hass_job(at_start_job, hass)
  File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 487, in _async_template_startup
    result_info.async_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1065, in async_refresh
    self._refresh(None)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1251, in _refresh
    self.hass.async_run_hass_job(self._job, event, updates)
  File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 435, in _handle_results
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1009, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
    state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1015, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 665, in state
    raise ValueError(
ValueError: Sensor sensor.ups_battery_capacity_2 has device class 'None', state class 'None' unit '%' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unknown' (<class 'str'>)

This is the only sensor in my configuration.yaml

Any ideas? I do Linux admin and write yaml for a living, but am an total HA newbie.

The data shows up now. I set default_value to 0 for each sensor and that fixed it. The battery capacity was showing up ‘unknown’.

That’s odd that the Battery Capacity is not showing in HA for you.
I got the SNMP config from the following thread which may assist you further:

1 Like

It does now. I wonder if it was because nothing was plugged in. I just got it and was still on the initial suggested 8 hour charge-up.

Thanks again for providing this solution!

2 Likes

I know this is older thread but @bill1972 do you by chance have the lovelace card code you are using for that. Thanks!