Extend Sighthound documentation. (#17932)

* Extend Sighthound documentation.

* Address review comments

* Update source/_integrations/sighthound.markdown

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Apply yaml style guide

* Apply suggestions from code review

Co-authored-by: Klaas Schoute <klaas_schoute@hotmail.com>

* Tweaks

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Klaas Schoute <klaas_schoute@hotmail.com>
This commit is contained in:
kifort 2021-06-27 18:00:10 +02:00 committed by GitHub
parent f819f89e20
commit 3bd9a979c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ This integration adds an image processing entity where the state of the entity i
If `save_file_folder` is configured, on each new detection of a person, an annotated image with the name `sighthound_{camera_name}_latest.jpg` is saved in the configured folder if it doesn't already exist, and overwritten if it does exist. The saved image shows the bounding box around detected people and can be displayed on the Home Assistant front end using a [Local File](/integrations/local_file/) camera, and used in notifications. If `save_timestamped_file` is configured as `true`, then the annotated image is saved with a file name that includes the time of detection.
**Note** that 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.
**Note** that 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.
## Configuration
@ -63,3 +63,45 @@ source:
required: false
type: string
{% endconfiguration %}
To verify the integration, check if a new entity is appeared as `image_processing.sighthound_my_cam`
## Process an Image
When you want to process an image, you have to call `image_processing.scan` service and listen to the `sighthound.person_detected` and/or `sighthound.vehicle_detected` events.
An example using two automations:
- The first automation is triggered, when a motion is detected. It calls the `image_processing.scan` service to send the camera image to the sighthound server for processing.
- The second automation is triggered by a `sighthound.vehicle_detected` event. It sends a notification to a phone.
```yaml
# Example automations.yaml entry
- id: "SOME_UNIQUE_ID"
alias: "Entrance Motion Image Processing"
description: "Send a camera image to sighthound, when motion is detected at the entrance"
trigger:
- type: motion
platform: device
device_id: YOUR_DEVICE_ID
entity_id: binary_sensor.my_motion_sensor
domain: binary_sensor
action:
- service: image_processing.scan
target:
entity_id: image_processing.sighthound_my_cam
mode: single
- id: "ANOTHER_UNIQUE_ID"
alias: "Arriving Vehicle Notification"
description: "Send a notification to a phone, when a vehicle is detected at the entrance"
trigger:
- platform: event
event_type: sighthound.vehicle_detected
action:
- service: notify.mobile_app_my_iphone
data:
message: "Somebody has just arrived by car."
mode: single
```