@apocaliss92/scrypted-advanced-notifier 3.1.19 → 3.1.21

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/README.md.new ADDED
@@ -0,0 +1,144 @@
1
+ # Scrypted advanced notifier
2
+
3
+ https://github.com/apocaliss92/scrypted-advanced-notifier - For requests and bugs
4
+
5
+ <!-- ## Key features
6
+ - `MQTT autodiscovery` of the most common functionalities of cameras
7
+ - `Detection rules`: setup your custom rules for a single camera (or for multiple in a batch) definining what to detect, where and how. Set which notifiers to be used
8
+ - `Occupancy rules`: check the occupancy of a certain area and define the parameters based on your use case
9
+ - `Timelapse rules`: define a timespan, the plugin will generate a timelapse at the end of the defined period. The timelapses generated will be available as videoclip on a camera entity
10
+ - `Audio rules`: set a threshold and send a notification when the threshold is reached for a certain amount of time
11
+ - `Notifiers` currently fully supported: Homeassistant push notifications and Pushover. Can be extended
12
+ - `AI`: let your preferred AI service the notification descriptions for a detection rule. Currently supported: GoogleAi, OpenAi, Claude, Groq
13
+ - `Images`: besides MQTT, images will be stored also on the filesystem in a specific mounted folder reachable by Scrypted
14
+ - `Custom texts`: define your customized text for your notifications, every rule can be customized specifically -->
15
+
16
+ # Getting started
17
+ ## MQTT
18
+ To enable MQTT exporting:
19
+ - enable `MQTT enabled` in the general -> general tab
20
+ - setup the authentication parameters in the tab general -> MQTT, check the `Use MQTT plugin credentials` to use the credentials set on the MQTT plugin
21
+ - Check `Use NVR detections` if you want the images stored on MQTT to be the clipped ones from NVR.
22
+ - Cameras enabled to the plugin will be automatically enabled to MQTT. Can be disabled in the camera's section Advanced notifier -> Report to MQTT
23
+
24
+ The plugin will export to MQTT the following entities:
25
+ - PTZ controls
26
+ - Restart control
27
+ - Basic detection information (motion, animal, person, vehicle, face, plate). Same information will be available for every rule associated to a camera
28
+ - Latest image
29
+ - Triggered
30
+ - Last trigger time (disabled by default)
31
+ - Online status
32
+ - Sleeping status
33
+ - Battery status
34
+ - Recording switch (NVR privacy mode)
35
+
36
+ ## Notifications
37
+
38
+
39
+ <!-- ## Homeassistant
40
+ It's possbile to configure an homeassistant connection (or utilize the one configured in the `Homeassistant` plugin) to fetch configured Rooms and Entities which are identified by one of the `Entity regex patterns`, these can be then assigned to a camera or sensor to add metadata used to render the notification. The fetched data will be visible in the `METADATA` group, and edited
41
+
42
+ ## General
43
+ - `Scrypted token`: Token stored on the scrypted entity on homeassistant
44
+ - `NVR url`: Url pointing to the NVR instance, should be accessible from outside
45
+ - `Storage path`: If set, the images used to populate MQTT topic will be also stored on the drive path
46
+ - `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
47
+
48
+ ## MQTT
49
+ It's possible to use MQTT to report data to homeassistant, can be configured standalone or use the configuration from the main `MQTT` plugin.
50
+ - `Active entities topic`: topic the plugin will subscribe to activate the rules `OnActive`. Useful to sync the plugin with an alarm system connected to homeassistant (i.e. Alarmo)
51
+ - `Active devices for MQTT reporting`: devices selected will be periodically reported to MQTT with several information, i.e. last detections happened, images, status and so on
52
+ - `Use NVR detections`: MQTT topics will be published using the detections coming from NVR detections, instead of the one provided by the plugin
53
+
54
+ ## Notifier
55
+ Mainly supported notifiers are from `Homeassistant` and `Pushover` plugins
56
+ - `Active notifiers`: master controller of active notifiers. Each rule will specify it's own set of notifiers
57
+
58
+ ## Texts
59
+ List of strings that will be shown on the notifications based on the detection type. Useful to have localized text, many placeholders are available and specified in each text
60
+ ## Detection rules
61
+ Fine grained rules can be defined to filter out detections and dispatch to specific notiries at specific conditions, called `Detection rules`. These rules can be added on Plugin level or on Camera level. Each rule has the following settings:
62
+ - `Enabled`: Enable or disable the rule (On homeassistant will be available a switch to enable/disable each rule)
63
+ - `Activation`: One of Always, OnActive, Schedule
64
+ - Always - the rule will always be active (besides enabled flag being off)
65
+ - OnActive - the rule will be active only for the devices selected in the `"OnActive" devices` selector (in Detection Rules -> General). This target is automatically synced with the MQTT topic defined in the setting "Active entities topic" under MQTT. MQTT Must be enabled
66
+ - Schedule - the rule will be active based on a schedule defined in the rule
67
+ - AlarmSystem - the rule will be active based on the current status of the alarm system defined in Plugin => Detection Rules => General => Security System
68
+ - `Priority`: Priority of the notification, will have effect only for pushover
69
+ - `Custom text`: override text to show on each notification. Will override the defaults
70
+ - `Detection classes`: detection classes to trigger the notification
71
+ - `Disable recording in seconds`: if set, when the rule is triggered will enable the NVR recordings for the same amount of seconds, will disable afterwards
72
+ - `Score threshold`: minimum score to trigger a notification
73
+ - `Notifiers`: notifiers to notify
74
+ - `Open sensors`: sensors that must be open to trigger a notification
75
+ - `Closed sensors`: sensors that must be closed to trigger a notification
76
+ - `Alarm modes`: alarm modes to be active to enable this rule (only available for activation AlarmSystem)
77
+ - `Actions`: actions that will be shown on the notification. Rendering will vary depending on the notifier. For HA will be an actionable notification, for pushover will be additional links in the text. Both of them require homeassistant to work, the same event will be triggered with the specified action type
78
+ - `Devices`: Only available for `Always` and `Schedule` activations. Devices for which notification is active
79
+ - `Day - Start time - End time`: properties required for the `Schedule` activation
80
+
81
+ The same detection rules can be defined on each camera level with some additional properties
82
+ - `Whitelisted zones`: Only detections on these zones will trigger a notification
83
+ - `Blacklisted zones`: Detections on these zones will be ignored
84
+
85
+ ## Occupancy rules
86
+ Similar concept applied to occupancy, a combination of observe zone + detection class can be set to check if the zone is occupied or not
87
+ ### General configurations
88
+ - `Object detector`: Plugin to use to execute the object detection (Overrides the setting specified in the plugin section)
89
+ - `Score threshold`: minimum score to trigger the occupancy in bulk (not used for now)
90
+
91
+ ### Rule configurations
92
+ - `Enabled`: Enable or disable the rule (On homeassistant will be available a switch to enable/disable each rule)
93
+ - `Detection class`: Detection class to match in the zone
94
+ - `Observe zone`: Zone of type 'Observe' that will be matched
95
+ - `Zone type`: Intersect if the match can happen on any intersection, Contain if the detection must happen completely inside the zone
96
+ - `Score threshold`: minimum score to trigger the occupancy
97
+ - `Occupancy confirmation`: minimum amount of seconds to wait if the state should be updated. This should avoid some false positives
98
+ - `Zone occupied text`: Text that will be notified when the zone gets occupied
99
+ - `Zone not occupied text`: Text that will be notified when the zone becomes free
100
+ - `Notifiers`: notifiers to notify
101
+ - `Priority`: Priority of the notification, will have effect only for pushover
102
+ - `Actions`: actions that will be shown on the notification. Rendering will vary depending on the notifier. For HA will be an actionable notification, for pushover will be additional links in the text. Both of them require homeassistant to work, the same event will be triggered with the specified action type
103
+
104
+ ## Timelapse rules
105
+ Allow to generate regular timelapses for a specific camera. The output folder will be `Images path`, if not set, the plugin folder will be used instead. The frames of a session will be persisted until the start of the next one, to give the possibility to finetune the result after a session
106
+ ### General configurations
107
+ - `Notificataion message`: Message sent when the timelapse will be notified
108
+ - `Timelapse framerate`: FPS of the final timelapse. The higher the value, the faster will be the timelapse
109
+ - `Force snapshot seconds`: A new snapshot will be pushed to the timelapse on regular intervals
110
+ - Schedule properties for the time period to capture. This functionality is very well implemented with the homeassistant notifications, the video will be shown in the preview of the notifications
111
+
112
+ ### Rule configurations
113
+ - `Enabled`: Enable or disable the rule (On homeassistant will be available a switch to enable/disable each rule)
114
+ - `Detection class`: Detection class to match in the zone
115
+ - `Observe zone`: Zone of type 'Observe' that will be matched
116
+ - `Zone type`: Intersect if the match can happen on any intersection, Contain if the detection must happen completely inside the zone
117
+ - `Score threshold`: minimum score to trigger the occupancy
118
+ - `Occupancy confirmation`: minimum amount of seconds to wait if the state should be updated. This should avoid some false positives
119
+ - `Zone occupied text`: Text that will be notified when the zone gets occupied
120
+ - `Zone not occupied text`: Text that will be notified when the zone becomes free
121
+ - `Notifiers`: notifiers to notify
122
+ - `Priority`: Priority of the notification, will have effect only for pushover
123
+ - `Actions`: actions that will be shown on the notification. Rendering will vary depending on the notifier. For HA will be an actionable notification, for pushover will be additional links in the text. Both of them require homeassistant to work, the same event will be triggered with the specified action type
124
+
125
+ ## Test
126
+ A test notification can be send with the specified settings
127
+
128
+ ## Device mixin
129
+ On each camera/sensor can be set some metadata to enhance the notifications
130
+ #### General
131
+ - `Room`: room where the camera is located
132
+ - `EntityID`: alias of the camera (i.e. on homeassistant). Only used to identify the camera when syncing the `OnActive` devices from Homeassistant
133
+ - `Device class`: homeassistant device class to specify the type of the sensor created on MQTT. Defaults will be fine
134
+ #### Notifier
135
+ - `Actions`: actionable notifications added to the notification
136
+ - `Minimum notification delay`: minimum amount of seconds to wait between notification for the same combination of room-detectionClass
137
+ - `Snapshot width/height`: dimensions of the snapshot (only for cameras)
138
+ - `Ignore camera detections`: ignore detections from the camera. Should always be disabled if the camera is not active on the NVR, otherwise no detections would ever happen (only for cameras)
139
+ - `Linked camera`: camera linked to this sensor. Any event happening on the sensor will use the provided camera for the snapshot
140
+ #### Webhook (only for cameras)
141
+ Simple webooks to retrieve information, only the last snapshot is for now available, could be extended with something else in the future
142
+ ## Notifier mixin
143
+ - `Snapshot scale`: scale up/down the snapshot of a camera. If 1 will use the originated on camera and will improve performances
144
+ - `Texts`: override of the plugin level texts -->
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.1.19",
8
+ "version": "3.1.21",
9
9
  "scripts": {
10
10
  "scrypted-setup-project": "scrypted-setup-project",
11
11
  "prescrypted-setup-project": "scrypted-package-json",