Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Facebox image recognition #165

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
36 changes: 36 additions & 0 deletions automation/facebox_detection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
alias: Kyle recognised
trigger:
platform: event
event_type: image_processing.detect_face
event_data:
name: 'Kyle Gordon'
action:
- service: camera.snapshot
data:
entity_id: {{ trigger.event.data.entity_id }}
filename: /tmp/{{ trigger.event.data.entity_id }}_snapshot.jpg
- service: notify.email_kyle
data_template:
title: "Face detected on camera"
message: Kyle Gordon recognised on {{ trigger.event.data.entity_id }} with probability {{ trigger.event.data.confidence }}
data:
images:
- /tmp/{{ trigger.event.data.entity_id }}_snapshot.jpg
html: >
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cameras snapshot</title>
<style type="text/css">
h1,h2,h3,h4,h5,h6 {
font-family:Arial,sans-serif;
}
</style>
</head>
<body>
<h1>UPS Triggered</h1>
<img style="width: 100%; max-width: 640px;" alt="Image from driveway camera" src="cid:{{trigger.event.data.entity_id}}_snapshot.jpg" />
</html>
2 changes: 1 addition & 1 deletion configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ camera: !include cameras.yaml
zone: !include zones/places.yaml
shell_command: !include shell_commands.yaml
climate: !include climate.yaml
#image_processing: !include openalpr.yaml
image_processing: !include image_processing.yaml

# Merged Includes
automation: !include_dir_list automation
Expand Down
12 changes: 12 additions & 0 deletions image_processing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#- platform: openalpr_local
# region: eu
# confidence: 80.0
# source:
# - entity_id: camera.driveway

- platform: facebox
ip_address: 172.24.32.13
port: 8080
source:
- entity_id: camera.driveway
- entity_id: camera.backdoor
5 changes: 0 additions & 5 deletions openalpr.yaml

This file was deleted.