Giter VIP home page Giter VIP logo

surveillance-card's Introduction

Custom component for lovelace to be used as a panel for viewing security cameras. It shows all of the cameras on the left, and shows a big one with motion on the right. Screenshot

Note: When including this file in your ui-lovelace.yaml you must use type: module

Config

Name Type Description Default
type string custom:surveillance-card Required
cameras list See camera section below Required
thumb_interval number Update interval for thumbnails in seconds (min 0.5) 10
update_interval number Update interval for main image in seconds (min 0.5) 1
show_capture_buttons boolean Show screenshot and record buttons true
recording_duration number Number of seconds to record after clicking record button (min 0.5) 10
focus_motion boolean Switch to camera when motion detected true
camera_view string β€œlive” will show the live view if the stream integration is enabled. ""

Camera configuration

Each entry in the camera list takes the following options

Name Type Description Default
entity string Camera entity_id Required
motion_entity string entity_id of a binary sensor to use for motion detection (uses state=='on' as motion detected) none

Installation

Step 1

Install surveillance-card by copying surveillance-card.js, record.svg, and snapshot.svg from this repo to <config directory>/www/surveillance-card/ on your Home Assistant instance.

Example:

mkdir <config directory>/www/surveillance-card/
cd <config directory>/www/surveillance-card/

wget https://raw.githubusercontent.com/custom-cards/surveillance-card/master/surveillance-card.js
wget https://raw.githubusercontent.com/custom-cards/surveillance-card/master/record.svg
wget https://raw.githubusercontent.com/custom-cards/surveillance-card/master/snapshot.svg

Step 2

Link surveillance-card inside you ui-lovelace.yaml.

resources:
  - url: /local/surveillance-card.js?v=0
    type: module

Step 3

Add as custom card of a panel view in your ui-lovelace.yaml using type: custom:surveillance-card

Example

views:
  - title: Surveillance
    icon: mdi:cctv
    panel: true
    cards:
      - type: custom:surveillance-card
        thumb_interval: 15
        update_interval: 2
        recording_duration: 10
        show_capture_buttons: true
        cameras:
          - entity: camera.front_porch
            motion_entity: binary_sensor.front_porch_motion
          - entity: camera.back_yard
            motion_entity: binary_sensor.back_yard_motion
          - entity: camera.driveway

Saving Snapshots from Cameras

Clicking on the camera button will save a single snapshot from that camera.

Clicking the record button will grab as many images as it can (based on the update intervals) for the set recording_duration

Note: This functionality is not available in native app versions (iOS & Android) and depends on the browser/device's ability to download image files.

Thanks

Thanks to all the people who have contributed!

contributors

surveillance-card's People

Contributors

atrv7 avatar iantrich avatar jeradm avatar ktibow avatar niemyjski avatar tfili avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.