@apocaliss92/scrypted-advanced-notifier 1.0.16 → 1.1.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/README.md +64 -7
- package/dist/main.nodejs.js.LICENSE.txt +0 -2
- package/dist/plugin.zip +0 -0
- package/package.json +5 -4
package/README.md
CHANGED
@@ -2,11 +2,68 @@
|
|
2
2
|
|
3
3
|
https://github.com/apocaliss92/scrypted-advanced-notifier - For requests and bugs
|
4
4
|
|
5
|
-
|
6
|
-
- People tracking
|
7
|
-
- Battery reporting
|
8
|
-
- HA actions rule based
|
9
|
-
- Add activation conditions for a rule
|
10
|
-
- Snooze notifier-camera-class
|
11
|
-
- Tester of detections
|
5
|
+
This plugin is feature rich notifier to handle detection notifications.
|
12
6
|
|
7
|
+
## Homeassistant
|
8
|
+
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
|
9
|
+
|
10
|
+
## MQTT
|
11
|
+
It's possible to use MQTT to report data to homeassistant, can be configured standalone or use the configuration from the main `MQTT` plugin.
|
12
|
+
- `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)
|
13
|
+
- `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
|
14
|
+
|
15
|
+
## Notifier
|
16
|
+
Mainly supported notifiers are from `Homeassistant` and `Pushover` plugins
|
17
|
+
- `Active notifiers`: master controller of active notifiers. Each rule will specify it's own set of notifiers
|
18
|
+
|
19
|
+
## Texts
|
20
|
+
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
|
21
|
+
## Detection rules
|
22
|
+
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:
|
23
|
+
- `Enabled`: Enable or disable the rule
|
24
|
+
- `Activation`: One of Always, OnActive, Schedule
|
25
|
+
- Always - the rule will always be active (besides enabled flag being off)
|
26
|
+
- 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
|
27
|
+
- Schedule - the rule will be active based on a schedule defined in the rule
|
28
|
+
- `Priority`: Priority of the notification, will have effect only for pushover
|
29
|
+
- `Custom text`: override text to show on each notification. Will override the defaults
|
30
|
+
- `Detection classes`: detection classes to trigger the notification
|
31
|
+
- `Score threshold`: minimum score to trigger a notification
|
32
|
+
- `Notifiers`: notifiers to notify
|
33
|
+
- `Open sensors`: sensors that must be open to trigger a notification
|
34
|
+
- `Closed sensors`: sensors that must be closed to trigger a notification
|
35
|
+
- `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
|
36
|
+
- `Devices`: Only available for `Always` and `Schedule` activations. Devices for which notification is active
|
37
|
+
- `Day - Start time - End time`: properties required for the `Schedule` activation
|
38
|
+
|
39
|
+
The same detection rules can be defined on each camera level with some additional properties
|
40
|
+
- `Whitelisted zones`: Only detections on these zones will trigger a notification
|
41
|
+
- `Blacklisted zones`: Detections on these zones will be ignored
|
42
|
+
|
43
|
+
## Test
|
44
|
+
A test notification can be send with the specified settings
|
45
|
+
|
46
|
+
## Device mixin
|
47
|
+
On each camera/sensor can be set some metadata to enhance the notifications
|
48
|
+
#### General
|
49
|
+
- `Room`: room where the camera is located
|
50
|
+
- `EntityID`: alias of the camera (i.e. on homeassistant). Only used to identify the camera when syncing the `OnActive` devices from Homeassistant
|
51
|
+
- `Device class`: homeassistant device class to specify the type of the sensor created on MQTT. Defaults will be fine
|
52
|
+
#### Notifier
|
53
|
+
- `Actions`: actionable notifications added to the notification
|
54
|
+
- `Minimum notification delay`: minimum amount of seconds to wait between notification for the same combination of room-detectionClass
|
55
|
+
- `Snapshot width/height`: dimensions of the snapshot (only for cameras)
|
56
|
+
- `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)
|
57
|
+
- `Linked camera`: camera linked to this sensor. Any event happening on the sensor will use the provided camera for the snapshot
|
58
|
+
#### Webhook (only for cameras)
|
59
|
+
Simple webooks to retrieve information, only the last snapshot is for now available, could be extended with something else in the future
|
60
|
+
## Notifier mixin
|
61
|
+
- `Snapshot scale`: scale up/down the snapshot of a camera. If 1 will use the originated on camera and will improve performances
|
62
|
+
- `Texts`: override of the plugin level texts
|
63
|
+
|
64
|
+
## What's next
|
65
|
+
* Add boundary box on detected object (really struggling :D)
|
66
|
+
* Notification snoozing
|
67
|
+
* Add more test suits to emulate a detection on specific conditions
|
68
|
+
* Setup a timeframe where all the notifications are kept and release as a GIF at the end (I saw a comment from an user on discord and I found it a great idea!)
|
69
|
+
* ...
|
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": "1.0
|
8
|
+
"version": "1.1.0",
|
9
9
|
"scripts": {
|
10
10
|
"scrypted-setup-project": "scrypted-setup-project",
|
11
11
|
"prescrypted-setup-project": "scrypted-package-json",
|
@@ -44,12 +44,13 @@
|
|
44
44
|
"@scrypted/sdk": "^0.3.65",
|
45
45
|
"axios": "^0.23.0",
|
46
46
|
"lodash": "^4.17.21",
|
47
|
-
"mqtt": "
|
47
|
+
"mqtt": "5.10.2",
|
48
48
|
"node-cron": "^3.0.3",
|
49
49
|
"sharp": "^0.33.5"
|
50
50
|
},
|
51
51
|
"devDependencies": {
|
52
52
|
"@types/lodash": "^4.17.12",
|
53
|
-
"@types/node": "^20.11.0"
|
53
|
+
"@types/node": "^20.11.0",
|
54
|
+
"@types/node-cron": "^3.0.11"
|
54
55
|
}
|
55
|
-
}
|
56
|
+
}
|