Skip to content

cacofish/rpi_waveshare_ups

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Waveshare UPS for Raspberry Pi

Home Assistant integration for the Waveshare UPS for Raspberry Pi.

Description

This integration can be used to get information over i2c for the Waveshare UPS for the Raspberry Pi. The integration assumes that you have followed the instructions for enabling i2c on your Raspberry Pi. These instructions will differ depending on how you are running Home Assistant.

If you are running Home Assistant OS see here.

If you are running Raspberry Pi OS see here.

Entities Provided

Binary Sensors

  • Battery State - whether the battery is charging or not.

Sensors

  • Battery Level - percentage of power left in the battery
  • Current
  • Load Voltage - the voltage on V- (load side)
  • Power
  • PSU Voltage - Load Voltage + Shunt Voltage
  • Shunt Voltage - voltage between V+ and V- across the shunt

Setup

Add Integration button

Clicking the Add Integration button will cause the integration to start looking for available devices on i2c.

Initial Setup Screen

Once the detection process has finished the following information will be required.

Selection Screen

  • Name - friendly name for the configuration entry
  • Address of the HAT - if only a single address was found it will be selected. If multiple addresses are found the first is selected and you'll need to pick the correct one to use.
  • Version of the HAT - defaults to B. You should pick the version that you have.
  • Update interval - defaults to 10s. Defines how often to query the UPS.

On successful set up the following screen will be seen detailing the device.

Final Setup Screen

Configurable Options

It is possible to configure the following options for the integration.

Configure Options

  • Update interval - defaults to 10s. Defines how often to query the UPS.
  • Mimimum current value for charging - defaults to -100mA. In my usage I've found that whilst the documentation for the HAT states a negative current means that the Pi is being powered by the batteries it can drop below 0 on normal use. This value allows you to mitigate this.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%