@apocaliss92/scrypted-advanced-notifier 3.3.7 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
1
  <details>
2
2
  <summary>Changelog</summary>
3
3
 
4
+ ### 3.4.0
5
+
6
+ - Latest snapshots webhook changed, add a Webhook section to the README with all the possible snapshots available
7
+ - Added POST webhook for detections, set multiple URL and preferred cameras to send images to external services
8
+
4
9
  ### 3.3.7
5
10
 
6
11
  - Add setting to disable notifications for a specific camera, on MQTT as well
12
+ - Implement snooze actions on Homeassistant notifiers
7
13
 
8
14
  ### 3.3.6
9
15
 
package/README.md CHANGED
@@ -3,23 +3,27 @@
3
3
  https://github.com/apocaliss92/scrypted-advanced-notifier - For requests and bugs
4
4
 
5
5
  # Getting started
6
+
6
7
  ## MQTT
8
+
7
9
  To enable MQTT exporting:
10
+
8
11
  - enable `MQTT enabled` in the general -> general tab
9
12
  - setup the authentication parameters in the tab general -> MQTT, check the `Use MQTT plugin credentials` to use the credentials set on the MQTT plugin
10
- - Check `Use NVR detections` if you want the images stored on MQTT to be the clipped ones from NVR.
13
+ - Check `Use NVR detections` if you want the images stored on MQTT to be the clipped ones from NVR.
11
14
  - Check `Audio pressure (dB) detection` if you want a continuous reporting of the audio kept by the camera (dBs)
12
15
  - Set a positive number to `Check objects occupancy in seconds` to regularly check the static objects on the frame
13
16
  - Cameras enabled to the plugin will be automatically enabled to MQTT. Can be disabled in the camera's section Advanced notifier -> Report to MQTT
14
17
 
15
18
  The plugin will export to MQTT the following entities:
19
+
16
20
  - PTZ controls
17
21
  - Restart control
18
22
  - Basic detection information (motion, animal, person, vehicle, face, plate, generic object). Same information will be available for every rule associated to a camera
19
- - Latest image
20
- - Triggered
21
- - Last trigger time (disabled by default)
22
- - Amount of objects (if enabled)
23
+ - Latest image
24
+ - Triggered
25
+ - Last trigger time (disabled by default)
26
+ - Amount of objects (if enabled)
23
27
  - Online status
24
28
  - Sleeping status
25
29
  - Battery status
@@ -27,28 +31,33 @@ The plugin will export to MQTT the following entities:
27
31
  - Current dBs (if enabled)
28
32
 
29
33
  ## Notifications
34
+
30
35
  The plugin provides customized way to deliver notifications. It is based on rules. Each rule can be activated based on several factors, i.e. active sensors, time ranges, security system status. Any notifier can be used but the only fully supported currently are (can be extended for any other):
36
+
31
37
  - Homeassistant push notifications
32
38
  - Pushover
33
- It's useful to use both notifiers, homeassistant as push rich notification and pushover as low priority just to store all the events
34
- Set the following parameters to allow rich notifications
35
- - `Scrypted token`: Token stored on the scrypted entity on homeassistant
36
- - `NVR url`: Url pointing to the NVR instance, should be accessible from outside
39
+ It's useful to use both notifiers, homeassistant as push rich notification and pushover as low priority just to store all the events
40
+ Set the following parameters to allow rich notifications
41
+ - `Scrypted token`: Token stored on the scrypted entity on homeassistant
42
+ - `NVR url`: Url pointing to the NVR instance, should be accessible from outside
37
43
 
38
44
  Rules can be of following types: Detection, Occupancy, Audio, Timelapse. These properties are in common with all, some are hidden until the `Show more configurations` gets activated
45
+
39
46
  - `Activation type`: when the rule shoul be active
40
- - Always
41
- - Schedule, defined in a time range during the day
42
- - OnActive, will be active only if the camera will be listed in the `"OnActive" devices` selector (plugin => rules => general). This selector can be driven by MQTT with a topic specified in `Active entities topic` under General => MQTT. The message to this topic can contain either a list of device IDs, names or homeassistant entityId (check homeassistant section)
47
+ - Always
48
+ - Schedule, defined in a time range during the day
49
+ - OnActive, will be active only if the camera will be listed in the `"OnActive" devices` selector (plugin => rules => general). This selector can be driven by MQTT with a topic specified in `Active entities topic` under General => MQTT. The message to this topic can contain either a list of device IDs, names or homeassistant entityId (check homeassistant section)
43
50
  - `Notifiers`: notifiers to notify, additional properties will be applied depending on the selected ones
44
- - `Pushover priority` priority to use on pushover
45
- - `Homeassistant Actions` actions to show on the homessistant push notifications, of type `{"action":"open_door","title":"Open door","icon":"sfsymbols:door"}`, check homeassistant documentation for further info
51
+ - `Pushover priority` priority to use on pushover
52
+ - `Homeassistant Actions` actions to show on the homessistant push notifications, of type `{"action":"open_door","title":"Open door","icon":"sfsymbols:door"}`, check homeassistant documentation for further info
46
53
  - `Open sensors` which sensors should be open to enable the rule
47
54
  - `Closed sensors` which sensors should be closed to enable the rule
48
- - `Alarm modes` which alarm states should enable the rule. The alarm system device can be defined in the plugin page under Rules => `Security system`
55
+ - `Alarm modes` which alarm states should enable the rule. The alarm system device can be defined in the plugin page under Rules => `Security system`
49
56
 
50
57
  ### Detection
58
+
51
59
  These rules can be created for multiple cameras (on the plugin page) or per single camera. They allow to specify which object detections should trigger a notification:
60
+
52
61
  - Create a new rule adding a new text in the `Detection rules` selector and hit save. A new tab will appear
53
62
  - Set the activation type
54
63
  - Set the notifiers to notify on the detection
@@ -63,7 +72,9 @@ These rules can be created for multiple cameras (on the plugin page) or per sing
63
72
  - Check `Enable AI to generate descriptions` if you want to let AI generate a description text out of the image. AI settings are available on the plugin page under the AI, currently supported: GoogleAi, OpenAi, Claude, Groq
64
73
 
65
74
  ### Occupancy (only on camera)
75
+
66
76
  These rules will monitor a specific area to mark it as occupied or not
77
+
67
78
  - Make sure to set an object detector on the plugin page under Rules => `Object Detector`
68
79
  - Create a new rule adding a new text in the `Occupancy rules` selector and hit save. A new tab will appear
69
80
  - Set the activation type
@@ -72,8 +83,8 @@ These rules will monitor a specific area to mark it as occupied or not
72
83
  - Set the camera zone to monitor, must be an `Observe` type zone defined in the `Object detection` section of the camera
73
84
  - (Optional) set a capture zone to reduce the frame used for the detection, may increase success rate
74
85
  - Set `Zone type`
75
- - `Intersect` if the objects can be considered detected if falling in any portion of the zone
76
- - `Contain` if the objects should be completely included in the detection zone
86
+ - `Intersect` if the objects can be considered detected if falling in any portion of the zone
87
+ - `Contain` if the objects should be completely included in the detection zone
77
88
  - Set a `Score threshold`, in case of static detections should be pretty low (default 0.3)
78
89
  - Set `Occupancy confirmation`, it's a confirmation period in seconds to avoid false results. Set it depending on your specific case
79
90
  - Set `Force update in seconds` to force an occupancy check if no detection happens. Any detection running on the camera will anyways check all the occupancy rules
@@ -81,19 +92,23 @@ These rules will monitor a specific area to mark it as occupied or not
81
92
  - Set a text in both `Zone occupied text` and `Zone not occupied text` for the notification texts
82
93
 
83
94
  ### Timelapse (only on camera)
95
+
84
96
  Define a timeframe, the plugin will collect frames from the camera and generate a clip out of it at the end of the defined range. All the generated timelapses will be available as videoclip on the NVR app, only if the `Enable Camera` on the plugin page will be enabled.
97
+
85
98
  - Create a new rule adding a new text in the `Timelapse rules` selector and hit save. A new tab will appear
86
99
  - Define the week days and the start/end times. i.e. start at 11pm and end at 8am
87
100
  - Set the notifiers to notify the generated clip
88
- - If an homeassistant notifier is used and the final clip will be <50bm, the clip will be shown as preview of the push notification!
101
+ - If an homeassistant notifier is used and the final clip will be <50bm, the clip will be shown as preview of the push notification!
89
102
  - Set a `Notification text` for the notification message
90
103
  - Set a `Frames acquisition delay`, a frame will be generated according to this. Each non-motion detection will always add a frame
91
- - In future will be possible to add frames based on specific detection classes and even small clips
104
+ - In future will be possible to add frames based on specific detection classes and even small clips
92
105
  - Set a `Timelapse framerate`, this will depend on the timespan you will chose and how long you want the final clip to be
93
106
  - Use the `Generate now` button to reuse the frames collected the previous session. They will be stored until the following session starts
94
107
 
95
108
  ### Audio (only on camera)
109
+
96
110
  Audio rules will monitor the audio received by the camera
111
+
97
112
  - Create a new rule adding a new text in the `Audio rules` selector and hit save. A new tab will appear
98
113
  - Set the notifiers to notify the event
99
114
  - Set a `Notification text` for the notification message
@@ -101,11 +116,14 @@ Audio rules will monitor the audio received by the camera
101
116
  - Set `Duration in seconds` if the audio should last at least these seconds to trigger a notification. Leave blank to notify right away
102
117
 
103
118
  ## Stored images
119
+
104
120
  The plugin will store on filesystem, if configured, images for every basic detection and rule. Set the following configurations on the plugin page under the Storage tab
105
- - `Storage path`: If set, the images used to populate MQTT topic will be also stored on the drive path
106
- - `Images name`: The name pattern to use to generate image files. The placeholders ${name} and ${timestamp} will be available. Using only ${name} will ensure the image to be overriden on every detection instead of saving one additional copy
121
+
122
+ - `Storage path`: If set, the images used to populate MQTT topic will be also stored on the drive path
123
+ - `Images name`: The name pattern to use to generate image files. The placeholders ${name} and ${timestamp} will be available. Using only ${name} will ensure the image to be overriden on every detection instead of saving one additional copy
107
124
 
108
125
  ## Additional camera settings
126
+
109
127
  - `Minimum snapshot acquisition delay`, minimum seconds to wait until a new snapshot can be taken from a camera, keep it around 5 seconds for cameras with weak hardware
110
128
  - `Off motion duration`, amount of seconds to consider motion as ended for rules/detections affecting the camera. It will override the motion off events
111
129
  - `Snapshot from Decoder`, take snapshots from the camera decoded stream, use it only if you have many timeout errors and cannot rely on updated images on MQTT, this is CPU intensive
@@ -113,4 +131,24 @@ The plugin will store on filesystem, if configured, images for every basic detec
113
131
  - Set `Minimum MQTT publish delay` to debounce the image update on MQTT for this basic detections
114
132
 
115
133
  ## Homeassistant
134
+
116
135
  It's possbile to configure an homeassistant connection (or utilize the one configured in the `Homeassistant` plugin) to fetch configured entity IDs which are identified by one of the `Entity regex patterns`. The entities fetched will be available as selection on each camera/sensor to alias them with an homeassistant entity. This helps the `OnActive` rules to send entityIds instead of Scrypted identifiers.
136
+
137
+ ## Webhooks
138
+
139
+ Some basic webhooks are available
140
+
141
+ # Latest snapshot
142
+
143
+ Will provide the latest registered image for each type, on the camera settings will be provided the basic url, {IMAGE_NAME} should be replaced with one of the following:
144
+
145
+ - `object-detection-{ motion | any_object | animal | person | vehicle }` (full frame images)
146
+ - `object-detection-{ motion | any_object | animal | person | vehicle }-NVR` (cropped images from NVR)
147
+ - `object-detection-face-{ known person label }` (full frame images)
148
+ - `object-detection-face-{ known person label }-NVR` (cropped images from NVR)
149
+ - `rule-{ rule name }`
150
+
151
+ # POST detection images
152
+
153
+ Provide multiple urls, for each detection, POST a b64 image with some additional metadata. Filter
154
+ on some classes and define a minimum delay.
package/dist/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "https://github.com/apocaliss92/scrypted-advanced-notifier"
7
7
  },
8
- "version": "3.3.7",
8
+ "version": "3.4.0",
9
9
  "scripts": {
10
10
  "scrypted-setup-project": "scrypted-setup-project",
11
11
  "prescrypted-setup-project": "scrypted-package-json",