All Projects → robmarkcole → Hass Sighthound

robmarkcole / Hass Sighthound

Licence: mit
Beta features for Home Assistant Sighthound integration

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Hass Sighthound

Esphome Core
🚨 No longer used 🚨 - The C++ framework behind ESPHome
Stars: ✭ 545 (+1996.15%)
Mutual labels:  home-assistant
Ios
📱 Home Assistant for Apple platforms
Stars: ✭ 667 (+2465.38%)
Mutual labels:  home-assistant
Open Home Automation
Open Home Automation with Home Assistant, ESP8266/ESP32 and MQTT
Stars: ✭ 820 (+3053.85%)
Mutual labels:  home-assistant
Lovelace Thermostat Dark Card
🌡 Thermostat card with a round and black feel to it
Stars: ✭ 593 (+2180.77%)
Mutual labels:  home-assistant
Alexa media player
This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Stars: ✭ 630 (+2323.08%)
Mutual labels:  home-assistant
Button Card
❇️ Lovelace button-card for home assistant
Stars: ✭ 680 (+2515.38%)
Mutual labels:  home-assistant
Esp Mqtt Json Digital Leds
(OBSOLETE) ESP8266 MQTT JSON Digital LEDs for Home Assistant
Stars: ✭ 503 (+1834.62%)
Mutual labels:  home-assistant
Replaylightshistory
AppDaemon App for Home Assistant to replay light switch history when no one is home.
Stars: ✭ 17 (-34.62%)
Mutual labels:  home-assistant
Homebridge Homeassistant
DEPRECATED in favor of native HomeKit support. -  Homebridge plugin for Home Assistant
Stars: ✭ 666 (+2461.54%)
Mutual labels:  home-assistant
Room Assistant
Presence tracking and more for automation on the room-level
Stars: ✭ 764 (+2838.46%)
Mutual labels:  home-assistant
Receipt Parser Legacy
A supermarket receipt parser written in Python using tesseract OCR
Stars: ✭ 614 (+2261.54%)
Mutual labels:  home-assistant
Xiaomigateway3
Control Zigbee, BLE and Mesh devices from Home Assistant with Xiaomi Gateway 3 (ZNDMWG03LM) on original firmware
Stars: ✭ 617 (+2273.08%)
Mutual labels:  home-assistant
Amazon Dash
Hack your Amazon Dash to run what you want.
Stars: ✭ 703 (+2603.85%)
Mutual labels:  home-assistant
Hassio Zigbee2mqtt
Hass.io add-on for zigbee2mqtt
Stars: ✭ 547 (+2003.85%)
Mutual labels:  home-assistant
Mini Media Player
Minimalistic media card for Home Assistant Lovelace UI
Stars: ✭ 827 (+3080.77%)
Mutual labels:  home-assistant
Repository
Home Assistant Community Add-ons
Stars: ✭ 520 (+1900%)
Mutual labels:  home-assistant
Lovelace Soft Ui
💫 Simple and clean Lovelace configuration
Stars: ✭ 675 (+2496.15%)
Mutual labels:  home-assistant
Home Assistant Config
Home Assistant config files, rewritten to use the latest features, 100+ documented automations, automatically generated ToC 🏠 🤖
Stars: ✭ 926 (+3461.54%)
Mutual labels:  home-assistant
Hass Google Coral
RETIRED - instead use https://github.com/robmarkcole/HASS-Deepstack-object
Stars: ✭ 16 (-38.46%)
Mutual labels:  home-assistant
Dasher
🔘 A simple way to bridge your Amazon Dash buttons to HTTP services
Stars: ✭ 705 (+2611.54%)
Mutual labels:  home-assistant

This repo contains beta features there are destined for the official integration for Sighthound.

HASS-Sighthound

Home Assistant custom integration for people & vehicle detection (with numberplate) using Sighthound Cloud. To use Sighthound Cloud you must register with Sighthound to get an api key. The Sighthound Developer tier (free for non-commercial use) allows 5000 requests per month. If you need more requests per month you will need to sign up for a production account (i.e. Basic or Pro account).

This component adds a pair of image processing entities - one for person detection and one for vehicle detection. The state of the entity is the number of people/vehicles detected in an image.

If save_file_folder is configured, on each new detection an annotated image with the name sighthound_latest.jpg is saved in the configured folder if it doesn't already exist, and over-written if it does exist. The sighthound_latest.jpg image shows the bounding box around detected people/vehicles and can be displayed on the Home Assistant front end using a local_file camera, and used in notifications. Additionally, if save_timestamped_file is configured as True then an image file is created of the processed image, where the file name includes the time of detection.

For each person detected, an sighthound.person_detected event is fired. The event data includes the entity_id of the image processing entity firing the event, and the bounding box around the detected person. For each vehicle detected, an sighthound.vehicle_detected event is fired, with example data below:

{
"event_type": "sighthound.vehicle_detected",
"data": {
    "entity_id": "image_processing.sighthound_vehicle_local_file_1",
    "plate": "CV67CBU",
    "vehicle_type": "car",
    "make": "Ford",
    "model": "Ranger",
    "color": "black",
    "region": "UK"
}

Note that in order to prevent accidentally using up your requests to Sighthound, by default the component will not automatically scan images, but requires you to call the image_processing.scan service e.g. using an automation triggered by motion.

Place the custom_components folder in your configuration directory (or add its contents to an existing custom_components folder). Add to your Home-Assistant config:

image_processing:
  - platform: sighthound
    api_key: your_api_key
    save_file_folder: /config/www/
    save_timestamped_file: True
    always_save_latest_jpg: True
    source:
      - entity_id: camera.local_file

Configuration variables:

  • api_key: Your developer api key.
  • account_type: (Optional, default dev for Developer) If you have a paid account, used prod.
  • save_file_folder: (Optional) The folder to save processed images to. Note that folder path should be added to whitelist_external_dirs
  • save_timestamped_file: (Optional, default False, requires save_file_folder to be configured) Save the processed image with the time of detection in the filename.
  • always_save_latest_jpg: (Optional, default False, requires save_file_folder to be configured) Always save the last processed image, no matter there were detections or not.
  • source: Must be a camera.

Displaying the sighthound_latest.jpg image

It is easy to display the sighthound_latest.jpg image with a local_file camera. An example configuration is:

camera:
  - platform: local_file
    file_path: /config/www/sighthound_latest.jpg
    name: sighthound

Count people using the sighthound.person_detected event

Using a counter an automation can be used to count the number of people seen. In configuration.yaml:

counter:
  people_counter:
    name: People
    icon: mdi:alert

In automations.yaml:

- id: 'peoplecounterautomation'
  alias: People Counting Automation
  trigger:
    platform: event
    event_type: sighthound.person_detected
    event_data:
      entity_id: image_processing.sighthound_local_file
  action:
    service: counter.increment
    entity_id: counter.people_counter

The counter is incremented each time a person is detected. The bounding box can in principle be used to include/exclude people based on their location in the image. TODO: add example of using bounding box.

Info on the bounding box

The bounding boxes are formatted to be consumed by the image_processing.draw_box() function. The formatting convention is identical to that used by Tensorflow, where the bounding box is defined by the tuple (y_min, x_min, y_max, x_max) where the coordinates are floats in the range [0.0, 1.0] and relative to the width and height of the image.

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].