Skip to content

Commit

Permalink
Frigate PrimeAir detection
Browse files Browse the repository at this point in the history
  • Loading branch information
aneisch committed Sep 29, 2023
1 parent da890cc commit ad4bef0
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 26 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC
Description | value
-- | --
Lines of ESPHome YAML | 2467
Lines of Home Assistant YAML | 8051
Lines of Home Assistant YAML | 8058
[Integrations](https://www.home-assistant.io/integrations/) in use | 52
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37
Expand All @@ -65,10 +65,10 @@ Description | value
-- | --
Entities in the [`alarm_control_panel`](https://www.home-assistant.io/components/alarm_control_panel) domain | 1
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 108
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 131
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 134
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 12
Entities in the [`calendar`](https://www.home-assistant.io/components/calendar) domain | 1
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 18
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 19
Entities in the [`climate`](https://www.home-assistant.io/components/climate) domain | 1
Entities in the [`counter`](https://www.home-assistant.io/components/counter) domain | 1
Entities in the [`cover`](https://www.home-assistant.io/components/cover) domain | 8
Expand All @@ -90,17 +90,17 @@ Entities in the [`remote`](https://www.home-assistant.io/components/remote) doma
Entities in the [`scene`](https://www.home-assistant.io/components/scene) domain | 2
Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 39
Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 2
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 381
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 383
Entities in the [`siren`](https://www.home-assistant.io/components/siren) domain | 1
Entities in the [`sun`](https://www.home-assistant.io/components/sun) domain | 1
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 152
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 160
Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 2
Entities in the [`tts`](https://www.home-assistant.io/components/tts) domain | 1
Entities in the [`update`](https://www.home-assistant.io/components/update) domain | 2
Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1
Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 2
Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 6
**Total state objects** | **1047**
**Total state objects** | **1061**
## The HACS integrations/plugins that I use:
**Appdaemon**:<br>
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)<br>
Expand Down
2 changes: 1 addition & 1 deletion extras/Node-RED/flows.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions extras/docker-compose/other/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ services:
privileged: true
restart: always
#image: ghcr.io/blakeblackshear/frigate:stable
#image: ghcr.io/blakeblackshear/frigate:0.13.0-beta1
image: ghcr.io/blakeblackshear/frigate:dev-cfd04d1
image: ghcr.io/blakeblackshear/frigate:0.13.0-beta2
shm_size: "128mb"
devices:
- /dev/bus/usb:/dev/bus/usb
Expand Down
3 changes: 1 addition & 2 deletions extras/docker-compose/unified/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,7 @@ services:
privileged: true
restart: always
#image: ghcr.io/blakeblackshear/frigate:stable
#image: ghcr.io/blakeblackshear/frigate:0.13.0-beta1
image: ghcr.io/blakeblackshear/frigate:dev-cfd04d1
image: ghcr.io/blakeblackshear/frigate:0.13.0-beta2
shm_size: "128mb"
devices:
- /dev/bus/usb:/dev/bus/usb
Expand Down
Binary file modified images/nodered_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/nodered_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 14 additions & 6 deletions packages/frigate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ automation:
- http://localhost:8123/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg?bbox=1&timestamp=1&quality=100
- delay: '00:00:10'

- alias: Frigate Notification USPS
id: "frigate_notification_usps"
- alias: Frigate Notification Deliveries
id: "frigate_notification_deliveries"
mode: single
trigger:
- platform: mqtt
Expand All @@ -76,7 +76,7 @@ automation:
topic: frigate/events
payload: end
value_template: "{{ value_json.type }}"
condition: "{{ trigger.payload_json['after']['sub_label'] != 'Undefined' }}"
condition: "{{ trigger.payload_json['after']['sub_label'] != 'Undefined' or trigger.payload_json['after']['label'] == 'PrimeAir' }}"
action:
- if: "{{ 'usps' in trigger.payload_json['after']['sub_label'] }}"
then:
Expand All @@ -91,9 +91,16 @@ automation:
data:
attachments:
- /config/images/logo.jpg
# No need for container to run after detection made, appdaemon will turn on in the morning
# - service: switch.turn_off
# entity_id: switch.docker_codeproject
- delay: "00:02:00"

- if: "{{ 'PrimeAir' in trigger.payload_json['after']['label'] }}"
then:
- service: notify.signal_self
data:
message: "Prime Air Drone detected"
data:
attachments:
- /config/images/logo.jpg
- delay: "00:02:00"

- alias: Doorbell Ring
Expand Down Expand Up @@ -263,6 +270,7 @@ automation:
filename: /config/timelapse/{{ '{{ entity_id.entity_id }}' }}/{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg
target:
entity_id:
- camera.ptz
- camera.front_door
- camera.driveway
- camera.back_porch
Expand Down
12 changes: 6 additions & 6 deletions packages/grill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ template:
{% if trigger.payload_json.temperature_1_F != 608.0 and trigger.payload_json.temperature_1_F != "unknown" %}
{{ trigger.payload_json.temperature_1_F | float | round(2) }}
{% else %}
unknown
-1
{% endif %}
unit_of_measurement: '°F'
device_class: temperature
Expand All @@ -70,7 +70,7 @@ template:
{% if trigger.payload_json.temperature_2_F != 608.0 and trigger.payload_json.temperature_2_F != "unknown" %}
{{ trigger.payload_json.temperature_2_F | float | round(2) }}
{% else %}
unknown
-1
{% endif %}
unit_of_measurement: '°F'
device_class: temperature
Expand Down Expand Up @@ -161,14 +161,14 @@ automation:
mode: restart
trigger:
- platform: mqtt
topic: sensor/rtl_433
value_template: "{{ value_json.model == 'Thermopro-TP12' and value_json.temperature_1_F != 'unknown' and value_json.temperature_2_F != 'unknown' }}"
topic: sensor/rtl_433_attic
value_template: "{{ value_json.model == 'Thermopro-TP12' and value_json.temperature_1_F != -1 and value_json.temperature_2_F != -1 }}"
payload: True
action:
- delay: 20
- service: mqtt.publish
data:
topic: sensor/rtl_433
topic: sensor/rtl_433_attic
payload: >-
{"time":"2022-02-17
02:26:13","model":"Thermopro-TP12","id":77,"temperature_1_F":"unknown","temperature_2_F":"unknown","mic":"CRC"}
02:26:13","model":"Thermopro-TP12","id":77,"temperature_1_F":-1,"temperature_2_F":-1,"mic":"CRC"}
6 changes: 3 additions & 3 deletions ui-lovelace/.cards/grill.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
type: conditional
conditions:
- entity: sensor.thermopro_probe_1
state_not: "unknown"
state_not: "-1.0"
card:
type: custom:vertical-stack-in-card
cards:
- type: conditional
conditions:
- entity: sensor.thermopro_probe_1
state_not: "unknown"
state_not: "-1.0"
card:
type: custom:bignumber-card
entity: sensor.thermopro_probe_1
Expand All @@ -29,7 +29,7 @@ card:
- type: conditional
conditions:
- entity: sensor.thermopro_probe_2
state_not: "unknown"
state_not: "-1.0"
card:
type: custom:bignumber-card
entity: sensor.thermopro_probe_2
Expand Down

0 comments on commit ad4bef0

Please sign in to comment.