node-red-contrib-starlight 0.0.1 → 0.0.2
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/LICENSE +22 -0
- package/README.md +45 -0
- package/package.json +15 -4
- package/gwiazda.png +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# node-red-contrib-starlight
|
|
2
|
+
|
|
3
|
+
Węzeł dla Node-RED, który:
|
|
4
|
+
|
|
5
|
+
- nasłuchuje na konfigurowalnym endpointcie HTTP (domyślnie `/starlight`) metodą `POST`
|
|
6
|
+
- filtruje przychodzące dane alarmowe i emituje dopasowane zdarzenia
|
|
7
|
+
|
|
8
|
+
## Instalacja
|
|
9
|
+
|
|
10
|
+
W katalogu użytkownika Node-RED (zwykle `~/.node-red`):
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm i node-red-contrib-starlight
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Lub przez **Palette Manager** w Node-RED (wyszukaj: `node-red-contrib-starlight`).
|
|
17
|
+
|
|
18
|
+
## Użycie
|
|
19
|
+
|
|
20
|
+
Dodaj node **Starlight** do flow i skonfiguruj:
|
|
21
|
+
|
|
22
|
+
- **Endpoint**: ścieżka, na której node wystawia `POST` (np. `/starlight`)
|
|
23
|
+
- **Typ alarmu**: filtr po typie alarmu (`all` = wszystkie)
|
|
24
|
+
- **Kanał**: filtr po kanale (`all` = wszystkie)
|
|
25
|
+
|
|
26
|
+
### Wejście
|
|
27
|
+
|
|
28
|
+
Node może działać na dwa sposoby:
|
|
29
|
+
|
|
30
|
+
- **HTTP**: przyjmuje `POST` na skonfigurowany endpoint. Odpowiada JSON-em `{ received, matched }`.
|
|
31
|
+
- **Wejście flow**: można też podać dane na wejściu node’a w `msg.payload`.
|
|
32
|
+
|
|
33
|
+
### Wyjście
|
|
34
|
+
|
|
35
|
+
Dla każdego dopasowanego zdarzenia node wysyła wiadomość:
|
|
36
|
+
|
|
37
|
+
- `msg.payload.time` (ISO string, jeśli dostępny)
|
|
38
|
+
- `msg.payload.alarm` (boolean)
|
|
39
|
+
- opcjonalnie `msg.payload.channel` (gdy filtr kanału ustawiony na `all`)
|
|
40
|
+
- opcjonalnie `msg.payload.alarmType` (gdy filtr typu alarmu ustawiony na `all`)
|
|
41
|
+
|
|
42
|
+
## Licencja
|
|
43
|
+
|
|
44
|
+
MIT — szczegóły w pliku `LICENSE`.
|
|
45
|
+
|
package/package.json
CHANGED
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-starlight",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Node-RED node listening on
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Node-RED node listening on an HTTP endpoint and filtering alarm payloads.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red",
|
|
7
7
|
"node-red-contrib",
|
|
8
8
|
"starlight",
|
|
9
|
-
"alarm"
|
|
9
|
+
"alarm",
|
|
10
|
+
"nvr",
|
|
11
|
+
"cctv"
|
|
10
12
|
],
|
|
11
13
|
"license": "MIT",
|
|
12
|
-
"author": "",
|
|
14
|
+
"author": "unknown",
|
|
13
15
|
"main": "nodes/rejestrator.js",
|
|
16
|
+
"files": [
|
|
17
|
+
"nodes/",
|
|
18
|
+
"icons/",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=14"
|
|
24
|
+
},
|
|
14
25
|
"node-red": {
|
|
15
26
|
"nodes": {
|
|
16
27
|
"rejestrator": "nodes/rejestrator.js"
|
package/gwiazda.png
DELETED
|
Binary file
|