Skip to main content

rpi-bad-power

A Python library to detect bad power supply on Raspberry Pi. This library is mainly built for the Raspberry Pi Power Supply Checker integration of HomeAssistant. It should also work for other purpose.

Compatibility

This library only works on kernel 4.14+. It supports getting the under voltage bit from different entries.

Related PRs:

Usage

Here is an example on how to use this library.

from rpi_bad_power import new_under_voltage

under_voltage = new_under_voltage()
if under_voltage is None:
    print("System not supported.")
elif under_voltage.get():
    print("Under voltage detected.")
else:
    print("Voltage is normal.")

Credits

Some of the code are based on custom-components/sensor.rpi_power maintained by @swetoast.

Release files for rpi-bad-power 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpi-bad-power 0.1.0
File Size Uploaded
rpi-bad-power-0.1.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rpi-bad-power 0.1.0
File Interpreter ABI Platform
rpi_bad_power-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size:8.1 kB

Release files / rpi-bad-power-0.1.0.tar.gz

Download URL rpi-bad-power-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8d9f6e2c3a4f213e4c61acf618880d6fd2a384fe26b4f35a64a9fdfa3a38d079
BLAKE2b-256 checksum
How to use checksums
93e4e6ab9c81148da6d1cbb7237402df6713c8b53852678285ee8ac826063347
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.9

Release files / rpi_bad_power-0.1.0-py3-none-any.whl

Download URL rpi_bad_power-0.1.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6deedda247d48c44cd62d5c6c67c80d774eab34e706262b05f5e6518a00f19b
BLAKE2b-256 checksum
How to use checksums
464d826fe801a1b6bc2fa352747a94f91fd4b85307ae962e226c208ec05046fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page