All Projects → twrecked → lovelace-hass-aarlo

twrecked / lovelace-hass-aarlo

Licence: other
Lovelace card for hass-aarlo integration.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to lovelace-hass-aarlo

Rtspallthethings
Deprecated RTSP media server -- Use github.com/aler9/rtsp-simple-server instead.
Stars: ✭ 258 (+529.27%)
Mutual labels:  streaming, camera
power-distribution-card
A Lovelace Card for visualizing power distributions.
Stars: ✭ 117 (+185.37%)
Mutual labels:  homeassistant, lovelace-card
Onvifcamera
Pod and example on how to connect to an ONVIF camera
Stars: ✭ 66 (+60.98%)
Mutual labels:  streaming, camera
ha-floorplan
Bring new life to Home Assistant. By mapping entities to a SVG-object, you're able to control devices, show states, calling services - and much more. Add custom styling on top, to visualize whatever you can think of. Your imagination just become the new limit.
Stars: ✭ 415 (+912.2%)
Mutual labels:  homeassistant, lovelace-card
HomeAssistant-Tapo-Control
Control for Tapo cameras as a Home Assistant component
Stars: ✭ 327 (+697.56%)
Mutual labels:  camera, homeassistant
Haishinkit.swift
Camera and Microphone streaming library via RTMP, HLS for iOS, macOS, tvOS.
Stars: ✭ 2,237 (+5356.1%)
Mutual labels:  streaming, camera
lovelace-rpi-monitor-card
A Raspberry Pi status display Card for Home Assistant Lovelace
Stars: ✭ 102 (+148.78%)
Mutual labels:  homeassistant, lovelace-card
MeteoalarmCard
Meteoalarm, Météo-France and DWD severe weather warnings card for Home Assistant Lovelace UI ⛈️
Stars: ✭ 48 (+17.07%)
Mutual labels:  homeassistant, lovelace-card
watsor
Object detection for video surveillance
Stars: ✭ 203 (+395.12%)
Mutual labels:  camera, homeassistant
lovelace-collapsable-cards
A custom Lovelace card that hides other cards behind a dropdown toggle
Stars: ✭ 83 (+102.44%)
Mutual labels:  homeassistant, lovelace-card
eufy security
Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
Stars: ✭ 242 (+490.24%)
Mutual labels:  camera, homeassistant
lovelace-digital-clock
A custom digital clock card for Home Assistant
Stars: ✭ 22 (-46.34%)
Mutual labels:  homeassistant, lovelace-card
HaishinKit.kt
Camera and Microphone streaming library via RTMP for Android.
Stars: ✭ 70 (+70.73%)
Mutual labels:  streaming, camera
Album
android 图片视频加载库,单选,多选,预览,自定义UI,相机,裁剪...等等 已适配android10,11
Stars: ✭ 53 (+29.27%)
Mutual labels:  camera
Brady
A camera library with parallax scrolling and aspect ratios for LÖVE.
Stars: ✭ 50 (+21.95%)
Mutual labels:  camera
chromecast-api
📺 Chromecast Node.js module
Stars: ✭ 122 (+197.56%)
Mutual labels:  streaming
worldtidesinfocustom
world tides info custom component for home assistant
Stars: ✭ 14 (-65.85%)
Mutual labels:  homeassistant
Home-Assistant-Lovelace-HTML-Jinja2-Template-card
This card displays provided Jinja2 template as an HTML content of a card. It uses exactly the same engine as Home Assistant in Developer tools.
Stars: ✭ 27 (-34.15%)
Mutual labels:  lovelace-card
Diffy
🎞️💓🍿 Love streaming - It's always best to watch a movie together ! 🤗
Stars: ✭ 37 (-9.76%)
Mutual labels:  streaming
onvif-nvt
ONVIF library for NVT (Network Video Transmitter) devices.
Stars: ✭ 62 (+51.22%)
Mutual labels:  camera

lovelace-hass-arlo

Version 0.2

Be warned, 0.2 is in alpha

It's working for me, but it's very alpha so be prepared to return to version 0.1 if things go wrong.

I've put it out there so people can try it if they want. The underlying architecture is very different and (I hope) a lot more efficient.

The library_sizes config is a good place to start.

The card now supports localisation with English, French, German and Spanish provided at the moment. If anybody fancies translating into other languages, look at en.js here, you just need to translate the strings in quotes.

Table of Contents

Introduction

Lovelace card designed specifically for the AArlo Integration.

Features

It provides:

  • Motion and sound notifications.
  • Access to the camera library recordings.
  • Live streaming.
  • Support for doorbell and door opening notifications.
  • Support for toggling lights during streaming.

Notes

This document assumes you are familiar with Home Assistant setup and configuration.

Thanks

Many thanks to:

Installation

Use one of the following 2 ways to install the card, I recommend HACS.

If, after installation, you can't see the card, you might need to clear the browser cache and reload the page. On Chrome you can force this with CTRL+SHIFT+I to open the developer tools and then CTRL+SHIFT+R to reload the page.

HACS

hacs_badge

Aarlo is part of the default HACS store. If you're not interested in development branches this is the easiest way to install. See hass-aarlo-hacs for some hints on installing and setup using HACS and the home assistant interface.

From Script

You don't need to run this if you used HACS to install.

install /config
# check output looks good
install go /config

Add the following to the top of your UI configuration file.

resources:
  - type: module
    url: /local/aarlo-glance.js

The card type is custom:aarlo-glance.

How it looks

The Image View

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)

The Library View

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.

Configuration

From version 0.2 onwards the configuration settings have changed.

To continue using the previous configuration make sure to leave the show option in your settings.

Card Type

Name Value Description
type custom:aarlo-glance Tell lovelace this is an aarlo card.

You have to tell lovelace the card type.

Simple or Multi Camera Configuration

Choose a single camera configuration or multiple camera configuration. One of entity or entities must be used, if you supply both entity and entities at the top level entities will take priority.

  • Single Camera Configuration
Name Type Required Description
entity entity_id No Full entity id of camera this card is controlling - for example, camera.aarlo_front_door_camera
name String No Display name.
  • Multi Camera Configuration
Name Type Required Description
entities array No An array of single camera configurations.

A multi camera configuration is an array of single camera configurations. You can specify a shared configuration for most options so a multi camera configuration can be as simple as:

entities:
  - entity: camera.aarlo_front_door_camera
  - entity: camera.aarlo_front_camera
# shared options

Global Options

Name Type Required Supported Values
global list No active, muted, square, blended, small, tiny

These are the options that determine the overall behaviour of the card.

  • active; for multi camera cards, the image will change to the most recently updated camera
  • muted; start in a muted state, mute state is remember across recordings and streams
  • square; use a square image; useful for Arlo Video Doorbells; this affects the library view as well.
  • blended; for multi camera cards; the library view will display all camera recordings spliced together
  • small; use smaller fonts and icons
  • tiny; use even smaller fonts and icons

Image Options

Name Type Required Supported Values
image_view list No start-stream, start-recording, direct, modal, smart, numeric

These are the options that determine the overall behaviour of the card when showing the image view.

  • start-stream; the card will start streaming when opened
  • start-recording; not implemented yet, the card will play recording when finished
  • direct; when streaming the card will access Arlo directly rather than go through Home Assistant
  • modal; open the recording or stream in a modal window
  • smart; open the recording or stream in a modal window on a desktop machine, show inline otherwise.
  • numeric; have the library display the number of entries. After nine it will display 9+.
Name Type Required Supported Values
image_top list No name, date, status, motion, sound, battery, signal, library, stream, onoff, snapshot...
image_bottom list No name, date, status, motion, sound, battery, signal, library, stream, onoff, snapshot...

These options determine what information and functions are available on the image view. image_top controls what appears at the top and image_bottom what appears at the bottom. If you leave one of the options blank nothing will appear at that place on the image.

  • name; camera name
  • date; date/time of last capture
  • status; current camera status - for example, Idle, Recording
  • motion; motion detection status, click for history
  • sound; sound detection status, click for history
  • battery; current battery level, click for history
  • signal; current wifi strength, click for history
  • library; library status - are there any recordings today, any recordings at all, click to open the library view
  • stream; click to start a live stream
  • onoff; click to turn the camera on and off
  • snapshot; click to take a snapshot

If you have multiple cameras showing on one card the following options are available:

  • previous; click to move to the previous camera
  • next; click to move to the next camera

The following options can be used if you used any Device Options. You can always SHIFT+CLICK to see a device history.

  • door; door status
  • lock; lock status; click to lock and unlock
  • bell; door bell status, if you supply a mute switch then click to mute/unmute
  • door2; door2 status
  • lock2; lock status; click to lock and unlock
  • bell2; door bell status, if you supply a mute switch then click to mute/unmute
  • light; light status, click to turn off and on
Notes

To get the aarlo Device sensors 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:

binary_sensor:
  - platform: aarlo
    monitored_conditions:
    - motion
Name Type Required Supported Values
image_click list No stream, recording

This option determines what happens when you click the image

  • stream; start a live stream
  • recording; play the last recording
Name Type Required Default
snapshot_retry seconds No 2,5

This option lets you change the image update retry times. If you find the snapshot image doesn't update all the time try adding extra time outs.

Library Options

Name Type Required Supported Values
library_view list No start-recording, download, modal, smart, duration

This option determines the overall behaviour of the card when showing the library view.

  • start-recording; not implemented yet, automatically show the recording when finished.
  • download; show an icon to download the video when the mouse hovers over the recording thumbnail
  • modal; open the recording or stream in a modal window
  • smart; open the recording or stream in a modal window on a desktop machine, show inline otherwise.
  • duration; show how long the recording is
Name Type Required Default
library_size Integer list No 3

This option sets the available library sizes. It is a comma separated list of integer values; for example 3,6,1 and you can cycle through the sizes from the library view. When you open the library view it will return the previous size used.

Name Type Required Default
library_regions Integer list No 3

This option sets the library sizes that will highlight the object that caused the recording. The default value is library_size. This is useful for hiding the highlight for larger library sizes.

Name Type Required Default
library_animal css color no orangered
library_vehicle css color no yellow
library_person css color no lime
library_package css color no cyan

These options determine the color of the highligh box.

  • library_animal; color to use when highlighting an animal
  • library_vehicle; color to use when highlighting a vehicle
  • library_person; color to use when highlighting a person
  • library_package; color to use when highlighting a package
Name Type Required Default
max_recordings Integer No 100

This option specifies the maximum number of recordings to show in the library. It is per camera.

Device Options

Name Type Description
door entity_id A door contact switch.
door_lock entity_id A door lock switch.
door_bell entity_id A door bell.
door_bell_mute entity_id A switch to mute door_bell.
door2 entity_id A door contact switch.
door2_lock entity_id A door lock switch.
door2_bell entity_id A door bell.
door2_bell_mute entity_id A switch to mute door2_bell.
light entity_id A light switch.

These options are useful if the camera is pointing at a door.

As well as reporting camera status the card can report on and operate other devices. The card can tell you if doors are open, show and operate door locks, show and operate lights and show and operate door bells.

The door lock and light controls will appear on the live stream.

Arlo Device Options

Name Type Description
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

If you don't change the device names aarlo gives you won't need to change these options, they are based on the entity you set. If you do change the name or want to use a device not provided by aarlo then use these.

binary_sensor:
  - platform: aarlo
    monitored_conditions:
    - motion

Advanced Options

You won't generally need to change these.

Name Type Default Description
card_size integer 3 Tell lovelace how much space to allocate for the card.
id string Override the HTML element id the card uses.
logging boolean false Set to true to enable logging to the browser console.
modal_multiplier float 0.8 Set this to change how much space the modal window will try to take.
swipe_threshold integer 150 Set this to change how long a swipe has to be to register.

Customizing the Layout

You can use image_top and image_bottom to customize the icons and text in the image. The card will keep the order you entered the icons in and will allow you to groups items together. And unlink previous versions you can place the icons at the top of the screen.

For example, the following entry will place some camera icons at the bottom of the image. They are in the same group so the card will spread them across its entire width.

image_bottom: 'onoff,motion,library,stream,signal,sound,snapshot,battery'

A Single Group

In this example we create 2 groups using the | symbol. Now the first group is placed to the left of the card and the second group to the right.

image_bottom: 'onoff,motion,library,stream,signal,sound|snapshot,battery'

Two Groups

In this example we create an empty group at the beginning which forces all the icons to appear on the right of the card.

image_bottom: '|onoff,motion,library,stream,signal,sound,snapshot,battery'

And this one places them at the top:

image_top: 'onoff,motion,library,stream,signal,sound,snapshot,battery'

If you find the configuration is getting too wide you can also split the groups up this way:

image_bottom:
  - 'previous,sound,motion,battery,library,stream,snapshot'
  - 'door,lock,light,next'

If you find things too closely placed together a ,, will insert a gap.

Example Configurations

A Single Camera Card

This card is a single camera with custom library sizes that can monitor a door and control the door's lock.

type: 'custom:aarlo-glance'
entity: camera.aarlo_front_door_camera
name: front door
image_view: direct
image_top: 'name,status'
image_bottom: 'motion,library,stream,snapshot,battery'
image_click: 'recordings'
library_sizes: '3,4,2'
door: binary_sensor.front_door
door_lock: lock.front_door_lock

Multi Camera Card #1

This card is a multi camera card with custom library sizes where both cameras are monitoring the same door. The image will change to the most recently active camera and the library view is blended.

type: 'custom:aarlo-glance'
entities:
  - entity: camera.aarlo_front_door_camera
    name: front door
  - entity: camera.aarlo_front_camera
    name: front
global: active,blended
image_view: direct
image_top: 'name,status'
image_bottom: 'motion,library,stream,snapshot,battery'
image_click: 'recordings'
library_sizes: '3,4,2'
door: binary_sensor.front_door
door_lock: lock.front_door_lock

Multi Camera Card #2

This card is a multi camera card with custom library sizes where both cameras are monitoring their own door. The image will change to the most recently active camera and the library view is blended.

type: 'custom:aarlo-glance'
entities:
  - entity: camera.aarlo_front_door_camera
    name: front door
    door: binary_sensor.front_door
    door_lock: lock.front_door_lock
  - entity: camera.aarlo_back_door_camera
    name: back door
    door: binary_sensor.back_door
    door_lock: lock.back_door_lock
global: active,blended
image_view: direct
image_top: 'name,status'
image_bottom: 'motion,library,play,snapshot,battery'
image_click: 'recordings'
library_sizes: '3,4,2'

Further Documentation

See hass-aarlo for general Aarlo documentation.

Old Configuration

From version 0.2 onwards the configuration settings have changed.

This way of configuring the card is deprecated. It will continue to work for for now but it will be going away. Please use Configuration instead.

The card supports the following configuration items:

Name Type Default Supported options Description
type string required custom:aarlo-glance
entity string required full camera entity_id
camera string required camera name
name string Display Name
show string list required [motion, sound, snapshot, battery_level, signal_strength, captured_today, image_date, on_off] 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_view string ['active'] 'active' will change a multicamera card to the latest camera on activity.
image_click string play ['modal','smart','stream','recording'] Action to perform when image is clicked. Remove attribute to play last recorded video when image is clicked.
aspect_ratio string ['square'] Use 'square' if you have a video doorbell camera.
library_view string ['blended'] 'blended' will join all the camera recordings into a single library.
library_click string ['modal','smart'] Action to perform when library image is clicked. Remove attribute to play last recorded video when image is clicked.
library_sizes integer list [3] List of grid sizes for the library to use.
library_regions integer list library_sizes List of grid sizes to show trigger item in colored box.
library_animal css color orangered Any valid CSS color Color box to use when an animal triggered the recording.
library_vehicle css color yellow Any valid CSS color Color box to use when an vehicle triggered the recording.
library_person css color lime Any valid CSS color Color box to use when an person triggered the recording.
modal_multiplier float 0.7 float from 0.1 -> 1.0 How big to make the modal window, as a fraction of the main window size.
auto_play boolean false If true, automatically start stream when card is viewed.
max_recordings integer 99 Any positive integer. Limit the numnber of videos downloaded for the library viewer.
lang string en Any valid language code. Use the language lang whrn displaying the card.
swipe_threshold integer 150 Any positive integer. How far to move to reigster a left swipe on the library card.
card_size integer 3 Any positive integer. Tell the UI how big to make the card.
logging boolean false true of false If true card will write out debug to console.
door string entity_id Useful if the camera is pointed at a door.
door_lock string entity_id
door_bell string entity_id
door_bell_mute string entity_id Switch to mute the chime of the door.
door2 string entity_id Useful if the camera is pointed at a door.
door2_lock string entity_id
door2_bell string entity_id
door2_bell_mute string entity_id Switch to mute the chime of the door.
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

entity vs camera

You only need one of these. entity is the full camera entity id - for example, camera.aarlo_front_door while camera is just the name portion - for example, aarlo_front_door.

Naming

If you don't change entity names you don't need to worry about this.

The code tries to be smart about mapping cameras to device names and as long as you follow certain rules the card can automatically generate device names.

Given the entity id camera.aarlo_front_door, you get a prefix of "aarlo_" and a camera_name of "front_door".

Given the entity id camera.front_door, you get a prefix of "" and a camera_name of "front_door".

The device names are calculated as:

  • motion device = binary_sensor.${prefix}motion_${camera_name}
  • sound device = binary_sensor.${prefix}sound_${camera_name}
  • battery device = sensor.${prefix}battery_level_${camera_name}
  • signal_device = sensor.${prefix}signal_strength_${camera_name}
  • capture_today_device = sensor.${prefix}captured_today_${camera_name}
  • last_capture_device = sensor.${prefix}last_${camera_name}

If you rename any of the aarlo using a different scheme 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.

show options

  • motion: an icon that indicates when motion is detected
  • sound: an icon that indicates when sound is detected
  • battery_level: an icon that shows current battery level
  • signal_strength: an icon that shows wifi signal strength
  • snapshot: an icon that takes a snapshot when pressed
  • captured_today: an icon with descriptive text showing how many recordings have been captured today.
  • image_date: an icon with descriptive text showing when the last image was taken
  • on_off: a switch allowing the camera to be turned off and on

image_click and library_click

These are comma separated lists that describe how to handle a click on the image or library window.

  • stream: play the live stream, does nothing on library click
  • recording: play the last recording, does nothing on library click which always plays the selected recording
  • modal: force a modal window, might not work well on mobile devices
  • smart: use a modal window on desktops and non-modal on mobile devices.

Notes

To get the first four show items 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:

binary_sensor:
  - platform: aarlo
    monitored_conditions:
    - motion

Example

The following is my front door camera configuration.

type: 'custom:aarlo-glance'
entity: camera.aarlo_front_door_camera
name: Front Door
show:
  - motion
  - sound
  - snapshot
  - battery_level
  - signal_strength
  - captured_today
  - image_date
top_title: false
top_status: false
top_date: false
image_click: play
door: binary_switch.front_door
door_lock: lock.front_door_lock
door_bell: binary_switch.aarlo_ding_front_door_bell
door2: binary_switch.front_door
door2_lock: lock.front_door_lock
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:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].