included cloud logging with filters
This commit is contained in:
+68
-19
@@ -1,3 +1,23 @@
|
||||
controller:
|
||||
plugins:
|
||||
_arrival_detection:
|
||||
module: lib._arrival_detection
|
||||
factory: create
|
||||
config: arrival_detection
|
||||
on_event: [_notify, _cloud_logger]
|
||||
actions:
|
||||
_notify:
|
||||
module: lib._notify
|
||||
handler: on_event
|
||||
config: notify
|
||||
_cloud_logger:
|
||||
module: lib._cloud_logger
|
||||
handler: on_event
|
||||
config: cloud_logger
|
||||
|
||||
logging:
|
||||
level: INFO
|
||||
|
||||
arrival_detection:
|
||||
enabled: true
|
||||
|
||||
@@ -8,27 +28,56 @@ arrival_detection:
|
||||
timeout: 10
|
||||
verify_tls: true
|
||||
hosts_oid: lanhosts
|
||||
|
||||
device:
|
||||
name: Ignace
|
||||
# Use the iPhone's Wi-Fi Address shown for your home SSID. If Private Wi-Fi
|
||||
# Address is enabled, this is the per-network private address, not hardware MAC.
|
||||
mac: "ce:68:53:a8:fc:07"
|
||||
|
||||
# Log every router/API call and its result without logging credentials.
|
||||
debug: true
|
||||
|
||||
devices:
|
||||
- id: ignace
|
||||
mac: "ce:68:53:a8:fc:07"
|
||||
- id: janine
|
||||
mac: "dc:10:57:9b:85:0e"
|
||||
- id: Fatima
|
||||
mac: "02:f8:26:33:2f:d9"
|
||||
|
||||
polling:
|
||||
interval_seconds: 5
|
||||
present_after: 2
|
||||
absent_after: 4
|
||||
error_retry_seconds: 30
|
||||
|
||||
notification:
|
||||
enabled: true
|
||||
# Available placeholders: {name}, {mac}.
|
||||
message: "{name} arrived home"
|
||||
event_log: /log/detect-arrivals.txt
|
||||
# Leave blank to use the default ntfy topic configured in notify.py.
|
||||
topic_url: ""
|
||||
timeout: 10
|
||||
|
||||
logging:
|
||||
level: INFO
|
||||
|
||||
event_log: log/detect-arrivals.txt
|
||||
|
||||
notify:
|
||||
enabled: true
|
||||
filter:
|
||||
# Empty accept lists allow all values. Ignore lists always take precedence.
|
||||
accept:
|
||||
events: [empty]
|
||||
ids: []
|
||||
ignore:
|
||||
events: [arrived, departed]
|
||||
ids: []
|
||||
# Available placeholders: {sender}, {event}, {id}, {text}.
|
||||
message: "{sender}: {event} ({id})"
|
||||
messages:
|
||||
arrived: "{id} arrived home"
|
||||
departed: "{id} left home"
|
||||
empty: "The house is empty"
|
||||
# May also be supplied through the NTFY_TOPIC_URL environment variable.
|
||||
topic_url: "https://ntfy.sh/VK20_Home_Alert_______4671938674123049873459"
|
||||
timeout: 10
|
||||
|
||||
cloud_logger:
|
||||
enabled: true
|
||||
event_url: http://127.0.0.1:5000/home_logger/event
|
||||
timeout: 10
|
||||
filter:
|
||||
# Empty accept lists allow all values. Ignore lists always take precedence.
|
||||
accept:
|
||||
events: [empty]
|
||||
ids: []
|
||||
ignore:
|
||||
events: [arrived, departed]
|
||||
ids: []
|
||||
# Available placeholders: {sender}, {event}, {id}, {text}.
|
||||
message: "{datetime} {sender}: {event} ({id})"
|
||||
Reference in New Issue
Block a user