New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rpi-bad-power

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rpi-bad-power

A Python library to detect bad power supply on Raspberry Pi .

  • 0.1.0
  • PyPI
  • Socket score

Maintainers
1

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:

  • raspberrypi/linux#2397: /sys/devices/platform/soc/soc:firmware/get_trottled
  • raspberrypi/linux#2706: /sys/class/hwmon/hwmon0/in0_lcrit_alarm

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc