Skip to content

Commit

Permalink
readying for HACS integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ironsheep committed Jul 23, 2020
1 parent 946a005 commit cc61065
Show file tree
Hide file tree
Showing 8 changed files with 314 additions and 121 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Validate

on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- name: HACS validation
uses: "hacs/integration/action@master"
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CATEGORY: "plugin"
Binary file added DOCs/images/LiveCards.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 38 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,30 @@

![Project Maintenance][maintenance-shield]

[![hacs_badge][hacs-shield]](https://github.com/custom-components/hacs)

[![License][license-shield]](LICENSE)

[![GitHub Release][releases-shield]][releases]

![Release](https://github.com/ironsheep/lovelace-rpi-monitor-card/workflows/Release/badge.svg)

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.

## Where to get the sensor software

Software supporting this card which sends data to Home Assistant from each of your Raspberry Pi's can be found at [RPi Reporter MQTT2HA Daemon](https://github.com/ironsheep/RPi-Reporter-MQTT2HA-Daemon).]
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](https://github.com/ironsheep/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 large 'details' card. You choose which you'd like for each of your RPi's.
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.

This card is currently in development. Our design goal is that the cards (glance, full) should look like this: (shown using 'Dark Orange' theme)
![Actual Card Layouts](./DOCs/images/LiveCards.png)

![Planned Card Layouts](./DOCs/images/DesignGoal.png)
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"!

---
--

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 :coffee:'s or :pizza: slices!

[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep)

---

-------------------- - - - - - - CAUTION -- CAUTION -- CAUTION - - - - - - --------------------

Cards are functional but alert coloring not yet working... we are in alpha until we get to funcitonal complete. See releases for card you can test now! Once we release we will submit to HACS as well...

We are also still working on minor display issues...

-------------------- - - - - - - CAUTION -- CAUTION -- CAUTION - - - - - - --------------------

---

## Installation

Expand All @@ -54,21 +41,38 @@ In your ui-lovelace.yaml (or resources.yaml, whichever you use for resources) ad
If you don't use HACS please change the url accordingly.
## Config
## Configuration
| 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. |
| name | string | none | Overrides default title of the card. (Default: RPi Monitor {FQDN} |
| 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 Options](#severity-options). |
| temp_severity | object | none | A list of severity values. See [Severity Options](#severity-options). |
| fs_severity | object | none | A list of severity values. See [Severity Coloring](#severity-coloring). |
| temp_severity | object | none | A list of severity values. See [Severity Coloring](#severity-coloring). |


### Threashold Monitoring

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

We also epxect to have coloring thresholds for free-space and temperature (with reasonable defaults.)
The default coloring is

### Severity Options
| **Value**/color | from | to
| ------------- | ------ | ------------------
| **Storage Used** % ||
| default| 0 | 60
| yellow| 61| 85
|red | 86 | 100
| **Temperature** C ||
|default| 0 | 59
| yellow| 60 | 79
| red| 80 | 100


### Severity Coloring

| Name | Type | Default | Description |
| ----- | ------ | ------------ | ------------------------------------------------------- |
Expand All @@ -78,21 +82,23 @@ We also epxect to have coloring thresholds for free-space and temperature (with

### Example card specifications

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

A 'glance' card example

```yaml
type: 'custom:rpi-monitor-card'
entity: sensor.rpi-monitor-fqdn
entity: sensor.rpi-monitor-hostname
card_style: glance
temp_scale: f
```

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

```yaml
type: 'custom:rpi-monitor-card'
entity: sensor.rpi-monitor-fqdn
entity: sensor.rpi-monitor-hostname
card_style: full
temp_scale: C
fs_severity:
Expand All @@ -109,7 +115,8 @@ fs_severity:

## Credits

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

## License

Expand All @@ -121,6 +128,7 @@ Follow these links for more information:
### [Copyright](copyright) | [License](LICENSE)

[maintenance-shield]: https://img.shields.io/badge/maintainer-S%20M%20Moraco%20%40ironsheepbiz-blue.svg?style=for-the-badge
[hacs-shield]: https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge
[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[releases-shield]: https://img.shields.io/github/release/ironsheep/lovelace-rpi-monitor-card.svg?style=for-the-badge
[releases]: https://github.com/ironsheep/lovelace-rpi-monitor-card/releases
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "RPi Monitor Card",
"render_readme": true,
"render_readme": false,
"filename": "rpi-monitor-card.js"
}
120 changes: 120 additions & 0 deletions info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Lovelace RPi Monitor Card

![Project Maintenance][maintenance-shield]

[![License][license-shield]](LICENSE)

[![GitHub Release][releases-shield]][releases]

![Release](https://github.com/ironsheep/lovelace-rpi-monitor-card/workflows/Release/badge.svg)

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](https://github.com/ironsheep/RPi-Reporter-MQTT2HA-Daemon). Then install this card to display the state of your RPi.

--

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.

![LiveCards](https://user-images.githubusercontent.com/540005/88344532-06257180-cd01-11ea-88ff-fac51d5ca5e6.png)

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"!


## Installation

Use [HACS](https://github.com/custom-components/hacs) (recommended)
or download _rpi-monitor-card.js_ from our [Latest Release](https://github.com/ironsheep/lovelace-rpi-monitor-card/releases/latest) and place it in your www directory.

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

```yaml
- url: /hacsfiles/rpi-monitor-card/rpi-monitor-card.js
type: module
```
If you don't use HACS please change the url accordingly.
## Configuration
| 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} |
| 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](#severity-coloring). |
| temp_severity | object | none | A list of severity values. See [Severity Coloring](#severity-coloring). |


### Threashold Monitoring

Both the 'system temperature' and 'disk space 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
| yellow| 61| 85
|red | 86 | 100
| **Temperature** C ||
|default| 0 | 59
| yellow| 60 | 79
| red| 80 | 100


### Severity Coloring
Use the following format to override either/or both of 'space used' and 'system temperature' values.

| 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 | array | **Required** | Defines the color to be displayed. |

### Example card specifications

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

A 'glance' card example

```yaml
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*)

```yaml
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
```

---

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 :coffee:'s or :pizza: slices!

[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep)


[maintenance-shield]: https://img.shields.io/badge/maintainer-S%20M%20Moraco%20%40ironsheepbiz-blue.svg?style=for-the-badge
[hacs-shield]: https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge
[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765
[releases-shield]: https://img.shields.io/github/release/ironsheep/lovelace-rpi-monitor-card.svg?style=for-the-badge
[releases]: https://github.com/ironsheep/lovelace-rpi-monitor-card/releases
3 changes: 2 additions & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const CARD_VERSION = '0.9.0';
export const CARD_VERSION = '1.0.0';

/*
* EXAMPLE attributes
{
"info": {
"timestamp": "2020-07-19T13:17:54-06:00",
Expand Down
Loading

0 comments on commit cc61065

Please sign in to comment.