GithubHelp home page GithubHelp logo

custom-components / sensor.rpi_power Goto Github PK

View Code? Open in Web Editor NEW
103.0 15.0 32.0 121 KB

A Custom component for Home-Assistant that checks if your Raspberry Pi power supply is giving enough voltage from the kernel.

License: MIT License

Python 100.00%
power sensor homeassistant component raspberry-pi community-driven

sensor.rpi_power's Introduction

Raspberry Pi Power Supply Checker

GitHub Release License Project Maintenance ContributorsDonate using Liberapay Discord

A sensor for Home Assistant that checks your power supply and reports back to your setup this simple sensor reports values from the kernel and if it reports anything else then 0 then there are issues with the power supply.

Breaking change: this project went from sensor to binary_sensor.

  • Manually download and install the files from the aforementioned URL into your custom_components\rpi_power
  • Modify your config.yaml and make sure that - platform: rpi_power is under binary_sensor: section (create if missing) instead of sensor: (that's the breaking change the author is referring to in the readme)
  • Restart Home Assistant
  • Replace in your lovelace cards / automations / scripts / whatever... any mention to sensor.rpi_power_status by binary_sensor.rpi_power_status

For more information about Raspberry Pi Power supplies check the following link.

Getting started

โš ๏ธ This requires kernel 4.14 or higher.

Place the component at this location on your setup:

  • Home Assistant (former Hass.io): /custom_components/rpi_power/binary_sensor.py

  • Home Assistant Core / Hassbian / Other: <config directory>/custom_components/rpi_power/binary_sensor.py

    _init_.py and manifest.json needs to be in the same folder

and then restart Home Assistant to make sure the component loads.

Here is a list of the current values the component checks for:

Value Description
0 Everything is working as intended
1000* Under-voltage was detected, consider getting a uninterruptible power supply for your Raspberry Pi.
2000* Your Raspberry Pi is limited due to a bad power supply, replace the power supply.
3000* Your Raspberry Pi is limited due to a bad power supply, replace the power supply.
4000* Your Raspberry Pi is throttled due to a bad power supply this can lead to corruption and instability, please replace your charger and cables.
5000* Your Raspberry Pi is throttled due to a bad power supply this can lead to corruption and instability, please replace your charger and cables.
8000* Your Raspberry Pi is overheating, consider getting a fan or heat sinks.

Due to how custom_components are loaded, it is normal to see a ModuleNotFoundError error on first boot after adding this, to resolve it, restart Home Assistant.

sensor.rpi_power's People

Contributors

fabaff avatar hmmbob avatar ikifar2012 avatar jurajnyiri avatar ludeeus avatar narfel avatar netweaver1970 avatar nickm324 avatar pinkywafer avatar rdbahm avatar swetoast avatar tjorim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.