• Stars
    star
    179
  • Rank 212,805 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Raspberry Pi status display Card for Home Assistant Lovelace

Lovelace RPi Monitor Card

Project Maintenance

hacs_badge

License

GitHub Release

Release

If you have a number of Raspberry Pis on your network then this might be the card you need to setup your Dashboard for monitoring all of you RPi's. Setup the sensor software on your RPi: See RPi Reporter MQTT2HA Daemon. Then install this card to display the state of your RPi.

About this card

This is a Lovelace card showing you the status of one of the Raspberry Pi's on your network. This card offers a choice of smaller 'glance' style card or the larger 'full' card. You choose which you'd like for each of your RPi's.

Actual Card Layouts

Place one of these cards for each of your RPi's on your network (and install the sensor/daemon script on each RPi) and you can monitor your entire constellation of RPi's "at a glance"!

RPi Health Indicators

All of the card forms (as seen above) now have a row of RPi health indicators. With these indicators you can tell:

  • If the RPi OS has reached end of support (no longer getting security updates) so it probably should be updated
  • OS package updates are available
  • If a new version of the RPi reporter Daemon is avaialble for install
  • When the data shown on the card was last updated


If you like my work and/or this has helped you in some way then feel free to help me out for a couple of β˜•'s or πŸ• slices! Or you can support my work via Patreon!

coffee Β Β  -OR- Β Β  PatreonPatreon.com/IronSheep


Installation

Use HACS (recommended) or download rpi-monitor-card.js from our Latest Release and place it in your www directory.

In your ui-lovelace.yaml (or resources.yaml, whichever you use for resources) add this:

- url: /hacsfiles/lovelace-rpi-monitor-card/rpi-monitor-card.js
  type: module

If you don't use HACS please change the url accordingly.

Configuration

If you wish to override some of the built-in coloring or display of titles/values, etc. The following adjustments are available for you to use.

Name Type Default Description
type string Required custom:rpi-monitor-card
entity string Required Entity State
name string none Overrides default title of the card. (Default: RPi Monitor {FQDN})
name_prefix string 'RPi monitor' Overrides default name prefix(Default: 'RPi Monitor')
card_style string 'glance' or 'full' Card layout desired for this RPi. (Default is full)
temp_scale string 'C' or 'F' Show Temperature in Celsius (C) or Fahrenheit (F). (Default is C)
fs_severity object none A list of severity values. See Severity Coloring.
temp_severity object none A list of severity values. See Severity Coloring.
memory_severity object none A list of severity values. See Severity Coloring.
os_age object none A list of os name and color values. See OS Coloring.
os_update_severity object none A list of update count values. See Severity Options.
show_title boolean true Show / hide the Title for this card. (Default is show - 'true')
show_os_age boolean true Show / hide the os release name (Default is show - 'true')
show_update_age boolean true Show / hide time since last values reported for this card. (Default is show - 'true')
show_daemon_upd boolean true Show / hide Daemon update needed flag. (Default is show - 'true')
show_os_upd_count boolean true Show / hide count of os updates pending. (Default is show - 'true')

Threashold Monitoring

The system temperature, disk space used and memory used values & icons are colored by threshold. The following defaults can be overridden for each card (each RPi.)

The default coloring is

Value/color from to
Storage Used %
default 0 60
orange 61 85
red 86 100
Temperature C
default 0 59
orange 60 79
red 80 100
Memory Used %
default 0 60
orange 61 74
red 75 100

The OS release name is also colored by expiration of support. The following defaults can be overridden for each card (each RPi.) with red meaning the named released is no longer supported / is not getting updates any longer.

The default release coloring is

Value/color Release Exp. Date
OS Release
red wheezy 31 May 2018
red jessie 30 June 2020
red stretch 30 June 2022

NOTE: The release colors are based on when the named released reaches end of support When a release reaches end of support we no longer get security updates. It is best to simply move to the current release (or last release supporting your RPi version) when this happens. These color flags on the OS release let us know when we should be thinking about building a new OS image for the affected RPi.

RPi Daemon update available coloring

The Daemon update needed flag is colored according to version being run vs. the latest release. If the version being run is one back from the latest, the update is colored yellow. If current version is not in the list of most recent versions then it update is colored red. There is currently no override for this coloring.

Count of Pending OS Updates coloring

The number of pending OS updates value is colored by threshold. The following defaults can be overridden for each card (each RPi.)

The default coloring is

Value/color from to
Nbr Updates Pending
default 0 24
orange 25 99
red 100 10000

Severity Coloring

Name Type Default Description
from number Required Defines from which value the color should be displayed.
to number Required Defines to which value the color should be displayed.
color string Required Defines the color to be displayed.

OS Coloring

Name Type Default Description
os string Required Defines for which named release this color is displayed (e.g., 'buster', 'stretch')
color string Required Defines the color to be displayed.

Example card specifications

NOTE: this card must always be attached to the 'sensor.rpimonitor{hostname}' sensor, the other sensors from the same RPi will not work to drive this card!

A 'glance' card example

type: 'custom:rpi-monitor-card'
entity: sensor.rpi_monitor_hostname
card_style: glance
temp_scale: f

A 'full' card example (with additional coloring override example)

type: 'custom:rpi-monitor-card'
entity: sensor.rpi_monitor_hostname
card_style: full
temp_scale: C
fs_severity:
  - color: Green
    from: 0
    to: 25
  - color: Orange
    from: 26
    to: 50
  - color: Red
    from: 51
    to: 100

Example monitoring of specific attributes

While we have the Glance and Full layout cards, you may wish to monitor other values. Here's an example of monitoring the RPi CPU Throttling that can occur or viewing the active network interfaces. Add the sensor(s) as follows:

 - type: attribute
    entity: sensor.rpi_monitor_hostname
    attribute: throttle
    name: Throttle status

or...

 - type: attribute
    entity: sensor.rpi_monitor_hostname
    attribute: networking
    name: Network

This shows the sensor add and the resultant output:

Actual Card Layouts

(Thanks to gihub user @bsimmo for provinding this example.)

Example control of your RPi (avail. in Daemon v1.8.0 and later)

From v1.8.0 and later of the RPi Reporter MQTT2HA Daemon we can enable control over our RPi. We can then expose buttons offering this control with something like:

- type: entities
  entities:
    - entity: button.rpi_command_pip2iotgw_reboot
      name: Reboot pip2iotgw
    - entity: button.rpi_command_pip2iotgw_restart_service
      name: Restart Service pip2iotgw
    - entity: button.rpi_command_pip2iotgw_shutdown
      name: Shutdown pip2iotgw
  title: RPi-pip2iotgw.home

This presents an interface like:

Credits

  • Ian iantrich for the card template and cards you've created which made my implementation effort much easier.
  • Lucas Gluwc for the custom-card: bar-card for his example of how to handle users specifying coloring overrides.

License

Copyright Β© 2022 Iron Sheep Productions, LLC. All rights reserved.
Licensed under the MIT License.

Follow these links for more information:

Copyright | License

More Repositories

1

RPi-Reporter-MQTT2HA-Daemon

Linux service to collect and transfer Raspberry Pi data via MQTT to Home Assistant (for RPi Monitoring)
Python
452
star
2

ISPLowEnergyManager

A pattern for Bluetooth Low Energy Applications - with Demos
Objective-C
89
star
3

lightning-detector-MQTT2HA-Daemon

Linux script to monitor AS3935 lightning detector and report detections to MQTT
Python
34
star
4

lovelace-lightning-detector-card

A Lightning Detection Display Card for Home Assistant Lovelace
TypeScript
23
star
5

P2-HUB75-LED-Matrix-Driver

A driver for HUB75E RGB LED Matrix Panels driven from the Parallax Propeller V2
17
star
6

P2-BLDC-Motor-Control

Single and Two-wheel driver objects P2 Spin2/Pasm2 for our 6.5" Hub Motors with Universal Motor Driver Board
Python
7
star
7

P2-vscode-extensions

VSCode support for SPIN/PASM for Propeller V1 and V2
TypeScript
5
star
8

P2-LED-Matrix-Morphing-Digits

A nod to the HariFun #165 video but implemented using table driven animations with the table generated by python using "segment adjacency" along with "segment on/off changes from digit to digit."
Python
4
star
9

DigiAnaFun

Digital Clock made up of Analog Clock faces - iPhone
Objective-C
3
star
10

RPi-LED-Strings

RPi Linux Application and LKM for driving three WS2812B panels via GPIO
C
3
star
11

P2-FLASH-FS

Chip's Flash FS with a standard API for accessing the FLASH chip on the P2 Edge Module.
Shell
3
star
12

P2-LED-Matrix-Liquid-Binary-Digits

Visually combining fluid, binary digits on an RGB LED Matrix panel
Shell
2
star
13

Omega2-Reporter-MQTT2HA-Daemon

Linux service to collect and transfer Onion Omega device data via MQTT to Home Assistant (for Omega Monitoring)
Python
2
star
14

RPi-scripts

RPi monitoring, control system, and data reporting
Shell
2
star
15

Omega2-GarageDoors-MQTT2HA-Daemon

Linux service providing garage door control on Onion Omega2+ device with data sent via MQTT to Home Assistant
Python
1
star
16

P2-OctoSerial-subsystem

A Parallax Propeller V2 Object Set for maintaining eight simultaneous serial ports
Python
1
star
17

P2-Panel-Light-Measure

Demo project using BH1750s to measure HUB75 Panel output - running on the Parallax P2 Processor
1
star
18

P2-vscode-langserv-extension

Spin/Spin2 Language Server based vscode extension
TypeScript
1
star