Skip to content

Commit 8f02b28

Browse files
authored
Documentation Updates (#94)
* rebase on main (#90) * Update README.md * mqtt credentials fix Thanks to @renarena for identifying this bug in #88 and via the matrix support channel. Much thanks! * mqtt_client logging improvements Was not logging config file import status. Now outputs config file import status to stderr * Update .drone.yml * Documentation Updates * Documentation Updates
1 parent 79bbac7 commit 8f02b28

File tree

4 files changed

+179
-157
lines changed

4 files changed

+179
-157
lines changed

README.md

Lines changed: 3 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Feature comparison to leading cloud event detection providers
5353
---
5454
5555
# Documentation
56-
56+
A special thanks to @renarena for help with proofreading docs
5757
5858
## [Installation - docs/INSTALL.md](docs/INSTALL.md)
5959
## [Setup - SETUP.md](docs/SETUP.md)
@@ -63,6 +63,8 @@ Feature comparison to leading cloud event detection providers
6363
6464
## [Tutorial Videos](https://beardedtek.net/c/tutorials/videos)
6565
66+
## [Notifications](docs/NOTIFICATIONS.md)
67+
6668
---
6769
6870
# Support
@@ -119,105 +121,3 @@ The following tags are available:
119121
## PyPi
120122
### **NOT RECOMMENDED**
121123
I'm starting to release some code on pypi as I break a few things apart for the 0.7 branch. Use at your own risk. It may or may not work as intended for now and breaking changes are certainly coming before this is an official release channel.
122-
123-
124-
---
125-
126-
# Notifications
127-
128-
## More coming in 0.7
129-
I have started experimenting with ntfy.sh and apprise for notifications.
130-
131-
## Home Asisstant
132-
As of right now it's a bit complicated. For each notification type you want for each camera, a helper entity must be added.
133-
For example, I have notifications setup for my driveway camera for person, animal, and vehicle, so I have the following helpers:
134-
- fevrDrivewayAnimal
135-
- fevrDrivewayCar
136-
- fevrDrivewayPerson
137-
138-
The automation uses this helper entity for 2 purposes.
139-
- As a motion sensor
140-
- If the helper is on, that means a notification is active
141-
- As a pause for notifications
142-
- If the helper is on, it does not allow further notifications until it is turned off.
143-
- In the automation, this time can be adjusted to your liking
144-
145-
Here is the automation I'm currently using:
146-
As displayed when:
147-
- editing the automation via the UI
148-
- click on overflow menu (3 dots)
149-
- click Edit in YAML
150-
151-
NOTES:
152-
- ***CAMERA*** is the camera name
153-
- ***HELPER ENTITY*** is the entity you created for this notification
154-
- ***YOUR FEVR URL*** is the url to your fevr instance
155-
156-
```
157-
alias: fEVR <<CAMERA>> Person Alert
158-
description: fEVR Object Detection Alerts
159-
trigger:
160-
- platform: mqtt
161-
topic: frigate/events
162-
condition:
163-
- condition: template
164-
value_template: '{{ trigger.payload_json["type"] == "end" }}'
165-
- condition: template
166-
value_template: |-
167-
{{
168-
trigger.payload_json["after"]["label"] == "person"
169-
}}
170-
- condition: template
171-
value_template: |-
172-
{{
173-
trigger.payload_json["after"]["top_score"] > 0.76
174-
}}
175-
- condition: template
176-
value_template: |-
177-
{{
178-
trigger.payload_json["after"]["camera"] == "<<CAMERA>>"
179-
}}
180-
action:
181-
- choose:
182-
- conditions:
183-
- condition: state
184-
state: 'off'
185-
entity_id: input_boolean.fevrbackyardperson
186-
sequence:
187-
- service: notify.mobile_app_sg20plus
188-
data:
189-
message: '{{ trigger.payload_json["after"]["label"] | title }} Detected'
190-
data:
191-
notification_icon: mdi:cctv
192-
ttl: 0
193-
priority: high
194-
sticky: true
195-
actions:
196-
- action: URI
197-
title: Clip
198-
uri: >-
199-
<<YOUR FEVR URL>>/event/{{trigger.payload_json['after']['id']}}/snap
200-
- action: URI
201-
title: Snapshot
202-
uri: >-
203-
<<YOUR FEVR URL>>/event/{{trigger.payload_json['after']['id']}}/snap
204-
image: >-
205-
<<YOUR FEVR URL>>/static/events/{{trigger.payload_json['after']['id']}}/snapshot.jpg
206-
tag: '{{trigger.payload_json["after"]["id"]}}'
207-
alert_once: true
208-
- service: input_boolean.turn_on
209-
data: {}
210-
target:
211-
entity_id: input_boolean.<<HELPER ENTITY>>
212-
- delay:
213-
hours: 0
214-
minutes: 1
215-
seconds: 0
216-
milliseconds: 0
217-
- service: input_boolean.turn_off
218-
data: {}
219-
target:
220-
entity_id: input_boolean.<<HELPER ENTITY>>
221-
default: []
222-
mode: single
223-
```

docs/INSTALL.md

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,23 @@
22

33
## Docker Compose:
44
docker-compose is the preferred installation method
5+
## Create directory structure
6+
```
7+
mkdir fevr
8+
cd fevr
9+
mkdir data
10+
mkdir events
11+
```
512

6-
### Environment Variables **NOT RECOMMENDED**
7-
The following environment variables can be used to configure fEVR:
8-
If not set, configuration can be done via the Web UI.
9-
10-
- FEVR_TRANSPORT
11-
- http or https
12-
- FEVR_URL
13-
- defaults to 'fevr'
14-
- FEVR_PORT
15-
- defaults to 5090
16-
- FEVR_DEVELOPMENT
17-
- If set to true, it will use the builtin flask server in development/debug mode
18-
- If set to false or unset, it will use uwsgi server.
19-
- TAILSCALE_ENABLE
20-
- Enable or disable tailscale functionality
21-
- [Sign up for tailscale](https://login.tailscale.com/start) prior to use.
22-
- TAILSCALE_TAGS
23-
- Use tailscale tags
24-
- To use tags, you must [set them up](https://login.tailscale.com/admin/acls) first.
25-
- TAILSCALE_HOSTNAME
26-
- Set hostname for tailscale
27-
-TAILSCALE_AUTHKEY
28-
- You must [generate an auth key](https://login.tailscale.com/admin/settings/keys) first.
29-
30-
### Edit .env file
31-
Copy template.env to .env and adjust as necessary:
13+
### Create .env file
14+
A template .env file is available [on GitHub](https://raw.githubusercontent.com/BeardedTek-com/fEVR/main/template.env) and down below:
3215
NOTE: The IP addresses in the .env file are for internal bridge networking and SHOULD NOT be on the same subnet as your home network.
3316
The default values should serve you well.
17+
18+
```
19+
curl -o .env https://raw.githubusercontent.com/BeardedTek-com/fEVR/main/template.env
20+
nano .env
21+
```
3422
```
3523
### fEVR Setup ######################################################
3624
@@ -48,11 +36,17 @@ TAILSCALE_ENABLE=true
4836
TAILSCALE_TAGS=tag:fevr
4937
TAILSCALE_HOSTNAME=fevr
5038
51-
5239
# Obtain Auth Key from https://login.tailscale.com/admin/authkeys
5340
TAILSCALE_AUTHKEY=tskey-XXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXX
5441
```
42+
### Edit docker-compose.yml
43+
A template docker.compose.yml file is provided [on GitHub](https://raw.githubusercontent.com/BeardedTek-com/fEVR/main/docker-compose.yml) and down below:
5544

45+
```
46+
cd ..
47+
curl -o docker-compose.yml https://raw.githubusercontent.com/BeardedTek-com/fEVR/main/docker-compose.yml
48+
nano docker-compose.yml
49+
```
5650
```
5751
version: '2.4'
5852
services:
@@ -79,10 +73,16 @@ services:
7973
This config.yml is separate from fEVR as mqtt_client can run separately from fEVR.
8074
In most use cases, running inside the docker container will be sufficient.
8175
At least 1 mqtt_client instance needs to be running either in the docker container or on a separate host as long as it can communicate with the main fEVR instance.
76+
**config.yml should be placed in the defined volume for `data` listed in the docker-compose.yml file provided.**
8277

83-
More Information on mqtt_client is available in [docs/MQTT_CLIENT.md](MQTT_CLIENT)
78+
More Information on mqtt_client is available [here](https://ghost.fevr.video/mqtt-client)
8479

85-
An example config.yml is provided [config.yml.template](../config.yml.template) and below
80+
An example config.yml is provided [on GitHub](https://raw.githubusercontent.com/BeardedTek-com/fEVR/main/config.yml.template) and below
81+
```
82+
cd data
83+
wget -o config.yml https://raw.githubusercontent.com/BeardedTek-com/fEVR/main/config.yml.template
84+
nano config.yml
85+
```
8686
```
8787
fevr_host: localhost
8888
fevr_port: 5090
@@ -98,7 +98,9 @@ mqtt_topics:
9898
mqtt_apikey: 128-bit-apikey-from-fevr
9999
verbose: true
100100
```
101-
config.yml should be placed in the defined volume for `data` listed in the docker-compose.yml file provided.
101+
```
102+
cd ..
103+
```
102104

103105
## Bring the system up:
104106
```

docs/NOTIFICATIONS.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Notifications
2+
3+
## More coming in 0.7
4+
In the next major version, I am introducing notifications through [ntfy.sh](https://ntfy.sh) and [apprise](https://github.com/caronc/apprise-api).
5+
6+
Apprise has the capability to send notifications on over 80 different platforms including Home Assistant.
7+
8+
## Home Asisstant
9+
### ***Depricated***
10+
### While this was a usable procedure when originally written, I don't plan on providing support, help, or developing this further
11+
As noted above, notifications are coming in 0.7 using ntfy.sh and apprise. Home Assistant is changing way too fast to keep up with all the cool new ways to do things. Feel free to try this method, but no guarantees.
12+
13+
---
14+
15+
Honestly, this is a bit of a pain in the rear. For each notification type you want for each camera, a helper entity must be added.
16+
For example, I have notifications setup for my driveway camera for person, animal, and vehicle, so I have the following helpers:
17+
- fevrDrivewayAnimal
18+
- fevrDrivewayCar
19+
- fevrDrivewayPerson
20+
21+
The automation uses this helper entity for 2 purposes.
22+
- As a motion sensor
23+
- If the helper is on, that means a notification is active
24+
- As a pause for notifications
25+
- If the helper is on, it does not allow further notifications until it is turned off.
26+
- In the automation, this time can be adjusted to your liking
27+
28+
Here is the automation I'm currently using:
29+
As displayed when:
30+
- editing the automation via the UI
31+
- click on overflow menu (3 dots)
32+
- click Edit in YAML
33+
34+
NOTES:
35+
`<<CAMERA>>` is the camera name
36+
`<<HELPER ENTITY>>` is the entity you created for this notification
37+
`<<YOUR FEVR URL>>` is the url to your fevr instance
38+
39+
```
40+
alias: fEVR <<CAMERA>> Person Alert
41+
description: fEVR Object Detection Alerts
42+
trigger:
43+
- platform: mqtt
44+
topic: frigate/events
45+
condition:
46+
- condition: template
47+
value_template: '{{ trigger.payload_json["type"] == "end" }}'
48+
- condition: template
49+
value_template: |-
50+
{{
51+
trigger.payload_json["after"]["label"] == "person"
52+
}}
53+
- condition: template
54+
value_template: |-
55+
{{
56+
trigger.payload_json["after"]["top_score"] > 0.76
57+
}}
58+
- condition: template
59+
value_template: |-
60+
{{
61+
trigger.payload_json["after"]["camera"] == "<<CAMERA>>"
62+
}}
63+
action:
64+
- choose:
65+
- conditions:
66+
- condition: state
67+
state: 'off'
68+
entity_id: input_boolean.fevrbackyardperson
69+
sequence:
70+
- service: notify.mobile_app_sg20plus
71+
data:
72+
message: '{{ trigger.payload_json["after"]["label"] | title }} Detected'
73+
data:
74+
notification_icon: mdi:cctv
75+
ttl: 0
76+
priority: high
77+
sticky: true
78+
actions:
79+
- action: URI
80+
title: Clip
81+
uri: >-
82+
<<YOUR FEVR URL>>/event/{{trigger.payload_json['after']['id']}}/snap
83+
- action: URI
84+
title: Snapshot
85+
uri: >-
86+
<<YOUR FEVR URL>>/event/{{trigger.payload_json['after']['id']}}/snap
87+
image: >-
88+
<<YOUR FEVR URL>>/static/events/{{trigger.payload_json['after']['id']}}/snapshot.jpg
89+
tag: '{{trigger.payload_json["after"]["id"]}}'
90+
alert_once: true
91+
- service: input_boolean.turn_on
92+
data: {}
93+
target:
94+
entity_id: input_boolean.<<HELPER ENTITY>>
95+
- delay:
96+
hours: 0
97+
minutes: 1
98+
seconds: 0
99+
milliseconds: 0
100+
- service: input_boolean.turn_off
101+
data: {}
102+
target:
103+
entity_id: input_boolean.<<HELPER ENTITY>>
104+
default: []
105+
mode: single
106+
```

0 commit comments

Comments
 (0)