From 721e657fa208f9fe639745fffa9c7aebf6be45f2 Mon Sep 17 00:00:00 2001 From: Steve Herrell Date: Fri, 1 May 2020 22:39:14 -0400 Subject: [PATCH 1/3] added custom ids for sensors --- dist/hass-aarlo.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/hass-aarlo.js b/dist/hass-aarlo.js index 2fa4df8..c158308 100644 --- a/dist/hass-aarlo.js +++ b/dist/hass-aarlo.js @@ -814,13 +814,13 @@ class AarloGlance extends LitElement { this.resetStatuses(); // camera and sensors - this._s.cameraId = 'camera.aarlo_' + camera; - this._s.motionId = 'binary_sensor.aarlo_motion_' + camera; - this._s.soundId = 'binary_sensor.aarlo_sound_' + camera; - this._s.batteryId = 'sensor.aarlo_battery_level_' + camera; - this._s.signalId = 'sensor.aarlo_signal_strength_' + camera; - this._s.captureId = 'sensor.aarlo_captured_today_' + camera; - this._s.lastId = 'sensor.aarlo_last_' + camera; + this._s.cameraId = config.camera_id ? config.camera_id : 'camera.aarlo_' + camera; + this._s.motionId = config.motion_id ? config.motion_id : 'binary_sensor.aarlo_motion_' + camera; + this._s.soundId = config.sound_id ? config.sound_id : 'binary_sensor.aarlo_sound_' + camera; + this._s.batteryId = config.battery_id ? config.battery_id : 'sensor.aarlo_battery_level_' + camera; + this._s.signalId = config.signal_id ? config.signal_id : 'sensor.aarlo_signal_strength_' + camera; + this._s.captureId = config.capture_id ? config.capture_id : 'sensor.aarlo_captured_today_' + camera; + this._s.lastId = config.last_id ? config.last_id : 'sensor.aarlo_last_' + camera; // door definition this._s.doorId = config.door ? config.door: null; From c1fc6a6ac76992f781fa82157165b4b24a902350 Mon Sep 17 00:00:00 2001 From: Steve Herrell Date: Wed, 6 May 2020 23:08:00 -0400 Subject: [PATCH 2/3] Tidied up the readme. --- README.md | 147 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 106 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 79558d6..6acf2dc 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,20 @@ # lovelace-hass-arlo -Lovelace card designed specifically for the [AArlo Integration](https://github.com/twrecked/hass-aarlo). +## Table of Contents +- [Introduction](#introduction) +- [Installation](#installation) +- [Configuration](#configuration) +- [Further Documentation](#further-documentation) +- [How it looks](#how-it-looks) -## Features + + +## Introduction +Lovelace card designed specifically for the [AArlo +Integration](https://github.com/twrecked/hass-aarlo). + + +#### Features It provides: * Motion and sound notifications. * Access to the camera library recordings. @@ -10,13 +22,37 @@ It provides: * Support for doorbell and door opening notifications. * Support for toggling lights during streaming. -## HACS Installtion + +#### Notes +This document assumes you are familiar with Home Assistant setup and configuration. + + +#### Thanks +Many thanks to: +* [Button Card](https://github.com/kuuji/button-card/blob/master/button-card.js) + for a working lovelace card I could understand +* [JetBrains](https://www.jetbrains.com/?from=hass-aarlo) for the excellent + **PyCharm IDE** and providing me with an open source license to speed up the + project development. + + [![JetBrains](/images/jetbrains.svg)](https://www.jetbrains.com/?from=hass-aarlo) + + + +## Installation + + +#### HACS [![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge)](https://github.com/custom-components/hacs) -Aarlo is part of the default HACS store. If you're not interested in development branches this is the easiest way to install. HACS will tell you what to add to your UI configuration. + +Aarlo is part of the default HACS store. If you're not interested in development +branches this is the easiest way to install. HACS will tell you what to add to +your UI configuration. The card type is `aarlo-glance.js`. -## Manual Installtion + +#### From Script ```sh install /config @@ -34,30 +70,45 @@ resources: The card type is `aarlo-glance.js`. -## Custom Lovelace Card Configuration - -| Name | Type | Default | Supported options | Description | -|-------------|-------------|--------------|---------------------------------------------------------------------------------------|-----------------------------------------| -| type | string | **required** | `custom:aarlo-glance` | | -| entity | string | **required** | camera entity_id | | -| name | string | | Display Name | | -| show | string list | **required** | [motion, sound, snapshot, battery_level, signal_strength, captured_today, image_date] | all items are optional but you must provide at least 1 | -| hide | string list | | [title, status, date ] | Hide this information from the card. | -| top_title | boolean | false | | Show the title at the top of the card | -| top_status | boolean | false | | Show the status at the top of the card | -| top_date | boolean | false | | Show the date at the top of the card | -| image_click | string | | ['play'] | Action to perform when image is clicked. Remove attribute to play last recorded video when image is clicked. | -| door | string | entity_id | | Useful if the camera is pointed at a door. | -| door_lock | string | entity_id | | | -| door_bell | string | entity_id | | | -| door2 | string | entity_id | | Useful if the camera is pointed at a door. | -| door2_lock | string | entity_id | | | -| door2_bell | string | entity_id | | | -| light | string | entity_id | | Control a light near the camera. | -| light_left | boolean | false | | Place light control on left of card | - -### Notes -To get the `show` items (except `snapshot`, which needs nothing) to work correctly you need to enable the corresponding `binary_sensor` or `sensor`. For example, to get motion notifications working you need the following binary sensor enabled: + + +## Configuration + +The card supports the following configuration items: + +| Name | Type | Default | Supported options | Description | +| ------------- | ------------- | -------------- | --------------------------------------------------------------------------------------- | ----------------------------------------- | +| type | string | **required** | `custom:aarlo-glance` | | +| entity | string | **required** | camera entity_id | | +| name | string | | Display Name | | +| show | string list | **required** | [motion, sound, snapshot, battery_level, signal_strength, captured_today, image_date] | all items are optional but you must provide at least 1 | +| hide | string list | | [title, status, date ] | Hide this information from the card. | +| top_title | boolean | false | | Show the title at the top of the card | +| top_status | boolean | false | | Show the status at the top of the card | +| top_date | boolean | false | | Show the date at the top of the card | +| image_click | string | | ['play'] | Action to perform when image is clicked. Remove attribute to play last recorded video when image is clicked. | +| door | string | entity_id | | Useful if the camera is pointed at a door. | +| door_lock | string | entity_id | | | +| door_bell | string | entity_id | | | +| door2 | string | entity_id | | Useful if the camera is pointed at a door. | +| door2_lock | string | entity_id | | | +| door2_bell | string | entity_id | | | +| light | string | entity_id | | Control a light near the camera. | +| light_left | boolean | false | | Place light control on left of card | +| camera_id | string | | | Override the calculated camera device name | +| motion_id | string | | | Override the calculated motion device name | +| sound_id | string | | | Override the calculated sound device name | +| battery_id | string | | | Override the calculated battery device name | +| signal_id | string | | | Override the calculated signal device name | +| capture_id | string | | | Override the calculated captured today device name | +| last_id | string | | | Override the calculated last captured device name | + + +#### Notes +To get the `show` items (except `snapshot`, which needs nothing) to work +correctly you need to enable the corresponding `binary_sensor` or `sensor`. For +example, to get motion notifications working you need the following binary +sensor enabled: ```yaml binary_sensor: @@ -66,11 +117,14 @@ binary_sensor: - motion ``` -To get the `show` items to work correctly do not rename any of the devices. The names of of the devices the lovelace card looks for are currently hardcoded. +If you rename any of the `aarlo` devices you will need to provide the full +device name to get motion, sound, battery, signal, capture or last capture +notifications to work. See the corresponding `*_id` configuration item. -### Example -The following is my front door camera configuration. Please remember rename the `aarlo_` components. +#### Example + +The following is my front door camera configuration. ```yaml type: 'custom:aarlo-glance' @@ -97,21 +151,32 @@ door2_bell: binary_switch.aarlo_ding_front_door_bell light: light.aarlo_front_light ``` -You don't need to reboot to see the GUI changes, a reload is sufficient. And if all goes will see a card that looks like this: +You don't need to reboot to see the GUI changes, a reload is sufficient. And if +all goes will see a card that looks like this: + + +## How it looks ![Aarlo Glance](https://github.com/twrecked/hass-aarlo/blob/master/images/aarlo-glance-02.png) -Reading from left to right you have the camera name, motion detection indicator, captured clip indicator, battery levels, signal level and current state. If you click the image the last captured clip will play, if you click the last captured icon you will be show the video library thumbnails - see below. Clicking the camera icon (not shown) will take a snapshot and replace the current thumbnail. (See supported features for list of camera statuses) +Reading from left to right you have the camera name, motion detection indicator, +captured clip indicator, battery levels, signal level and current state. If you +click the image the last captured clip will play, if you click the last captured +icon you will be show the video library thumbnails - see below. Clicking the +camera icon (not shown) will take a snapshot and replace the current thumbnail. +(See supported features for list of camera statuses) -Clicking on the last captured clip will display thumbnail mode. Clicking on a thumbnail starts the appropiate video. You can currently only see the last 99 videos. If you move your mouse over a thumbnail it will show you time of capture and, if you have a Smart subscription, a reason for the capture. **>** takes you to the next page, **<** to the previous and **X** closes the window. +Clicking on the last captured clip will display thumbnail mode. Clicking on a +thumbnail starts the appropiate video. You can currently only see the last 99 +videos. If you move your mouse over a thumbnail it will show you time of capture +and, if you have a Smart subscription, a reason for the capture. **>** takes you +to the next page, **<** to the previous and **X** closes the window. ![Aarlo Thumbnails](https://github.com/twrecked/hass-aarlo/blob/master/images/thumbnails.png) -## Documentation -See [hass-aarlo](https://github.com/twrecked/hass-aarlo/blob/master/README.md) for general Aarlo documentation. -## Thanks -Many thanks to: -* [Button Card](https://github.com/kuuji/button-card/blob/master/button-card.js) for a working lovelace card I could understand -* [![JetBrains](/images/jetbrains.svg)](https://www.jetbrains.com/?from=hass-aarlo) for the excellent **PyCharm IDE** and providing me with an open source license to speed up the project development. + +## Further Documentation +See [hass-aarlo](https://github.com/twrecked/hass-aarlo/blob/master/README.md) +for general Aarlo documentation. From 1740f00b86c20195f2774c1bb019944736b82338 Mon Sep 17 00:00:00 2001 From: Steve Herrell Date: Wed, 6 May 2020 23:11:12 -0400 Subject: [PATCH 3/3] Bumped revisions. --- changelog | 2 ++ custom_cards.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index 5d07586..d106baf 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,5 @@ +0.1.0: added custom component naming + tidied the README 0.0.17: use request snapshot 0.0.16: better image update 0.0.15: Remove camera_thumbnail diff --git a/custom_cards.json b/custom_cards.json index fe99f34..153b6fa 100644 --- a/custom_cards.json +++ b/custom_cards.json @@ -2,7 +2,7 @@ "aarlo-glance": { "changelog": "https://github.com/twrecked/lovelace-hass-aarlo/blob/master/changelog", "remote_location": "https://raw.githubusercontent.com/twrecked/lovelace-hass-aarlo/master/dist/hass-aarlo.js", - "version": "0.0.17", + "version": "0.1.0", "visit_repo": "https://github.com/twrecked/lovelace-hass-aarlo" } }