From ee0294a33782397e5cd83a8aeb344ccaf0da3a55 Mon Sep 17 00:00:00 2001 From: Sander Huisman Date: Tue, 19 Feb 2019 20:19:02 +0100 Subject: [PATCH] prepare for release v0.0.1 --- README.md | 38 ++++++++++++++++++++++++++++++++++---- custom_updater.json | 20 ++++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 custom_updater.json diff --git a/README.md b/README.md index a519df9..1a5b701 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ [![maintainer](https://img.shields.io/badge/maintainer-Sander%20Huisman%20-blue.svg?style=for-the-badge)](https://github.com/Sanderhuisman) +## About + +This repository contains custom components I developed for my own [Home-Assistant](https://www.home-assistant.io) setup. Feel free to use the components and report bugs if you find them. If you want to contribute, please report a bug or pull request and I will reply as soon as possible. Please star & watch my project such I can see how many people like my components and for you to stay in the loop as updates come along. + ## Components * [Docker Monitor](#docker_monitor) @@ -10,9 +14,22 @@ ### Docker Monitor -The Docker monitor allows you to monitor statistics and turn on/off containers. The monitor can connected to a daemon through the url parameter. When home assistant is used within a Docker container, the daemon can be mounted as follows `-v /var/run/docker.sock:/var/run/docker.sock`. +The Docker monitor allows you to monitor statistics and turn on/off containers. The monitor can connected to a daemon through the url parameter. When home assistant is used within a Docker container, the daemon can be mounted as follows `-v /var/run/docker.sock:/var/run/docker.sock`. The monitor is based on [Glances](https://github.com/nicolargo/glances) and [ha-dockermon](https://github.com/philhawthorne/ha-dockermon) and combines (in my opinion the best of both integrated in HA :)). + +**Important note: as the loading path of platforms have been changed in issue [#20807](https://github.com/home-assistant/home-assistant/pull/20807), the current version is not compliant with HA versions 0.88 and above. This is currently been tested and will soon be released** + +#### Events + +The monitor can listen for events on the Docker event bus and can fire an event on the Home Assistant Bus. The monitor will use the following event: + +* `{name}_container_event` with name the same set in the configuration. -**Important note: as the loading path of platforms have been changed in issue [#20807](https://github.com/home-assistant/home-assistant/pull/20807), the current version is not compliant with HA versions from 0.88 and above. This is currently been tested and will soon be released** +The event will contain the following data: + +* `Container`: Container name +* `Image`: Container image +* `Status`: Container satus +* `Id`: Container ID (long) #### Configuration @@ -40,6 +57,7 @@ docker_monitor: | name | string (Optional) | Client name of Docker daemon. Defaults to `Docker`. | | url | string (Optional) | Host URL of Docker daemon. Defaults to `unix://var/run/docker.sock`. | | scan_interval | time_period (Optional) | Update interval. Defaults to 10 seconds. | +| events | boolean (Optional) | Listen for events from Docker. Defaults to false. | | containers | list (Optional) | Array of containers to monitor. Defaults to all containers. | | monitored_conditions | list (Optional) | Array of conditions to be monitored. Defaults to all conditions | @@ -113,6 +131,18 @@ sensor: | P1 | PM10 | µg/m3 | | P2 | PM2.5 | µg/m3 | -## About +## Track Updates +This custom component can be tracked with the help of [custom-lovelace](https://github.com/ciotlosm/custom-lovelace) cards with the [custom_updater](https://github.com/custom-cards/tracker-card) card. + +In your configuration.yaml + +```yaml +custom_updater: + component_urls: + - 'https://raw.githubusercontent.com/Sanderhuisman/home-assistant-custom-components/master/custom_updater.json' +``` + +## Credits -## Contributing +* [frenck](https://github.com/frenck/home-assistant-config) +* [robmarkcole](https://github.com/robmarkcole/Hue-sensors-HASS) diff --git a/custom_updater.json b/custom_updater.json new file mode 100644 index 0000000..3f6cfc0 --- /dev/null +++ b/custom_updater.json @@ -0,0 +1,20 @@ +{ + "docker_monitor" : { + "updated_at" : "2019-02-19", + "version" : "0.0.1", + "changelog" : "https://github.com/Sanderhuisman/home-assistant-custom-components/releases/latest", + "visit_repo" : "https://github.com/Sanderhuisman/home-assistant-custom-components" + }, + "eetlijst" : { + "updated_at" : "2019-02-19", + "version" : "0.0.1", + "changelog" : "https://github.com/Sanderhuisman/home-assistant-custom-components/releases/latest", + "visit_repo" : "https://github.com/Sanderhuisman/home-assistant-custom-components" + }, + "luftdaten" : { + "updated_at" : "2019-02-19", + "version" : "0.0.1", + "changelog" : "https://github.com/Sanderhuisman/home-assistant-custom-components/releases/latest", + "visit_repo" : "https://github.com/Sanderhuisman/home-assistant-custom-components" + } + } \ No newline at end of file