@apocaliss92/scrypted-reolink-native 0.3.4 → 0.3.6
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/dist/main.nodejs.js +1 -1
- package/dist/main.nodejs.js.LICENSE.txt +255 -0
- package/dist/plugin.zip +0 -0
- package/package.json +1 -1
- package/src/camera.ts +0 -5
- package/src/nvr.ts +17 -1
|
@@ -1,3 +1,258 @@
|
|
|
1
1
|
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
2
2
|
|
|
3
|
+
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
|
|
4
|
+
|
|
5
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
6
|
+
|
|
3
7
|
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @preserve
|
|
11
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
12
|
+
* All rights reserved. (MIT Licensed)
|
|
13
|
+
*
|
|
14
|
+
* cie94.ts - part of Image Quantization Library
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @preserve
|
|
19
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
20
|
+
* All rights reserved. (MIT Licensed)
|
|
21
|
+
*
|
|
22
|
+
* ciede2000.ts - part of Image Quantization Library
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @preserve
|
|
27
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
28
|
+
* All rights reserved. (MIT Licensed)
|
|
29
|
+
*
|
|
30
|
+
* cmetric.ts - part of Image Quantization Library
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @preserve
|
|
35
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
36
|
+
* All rights reserved. (MIT Licensed)
|
|
37
|
+
*
|
|
38
|
+
* common.ts - part of Image Quantization Library
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @preserve
|
|
43
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
44
|
+
* All rights reserved. (MIT Licensed)
|
|
45
|
+
*
|
|
46
|
+
* constants.ts - part of Image Quantization Library
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @preserve
|
|
51
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
52
|
+
* All rights reserved. (MIT Licensed)
|
|
53
|
+
*
|
|
54
|
+
* ditherErrorDiffusionArray.ts - part of Image Quantization Library
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @preserve
|
|
59
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
60
|
+
* All rights reserved. (MIT Licensed)
|
|
61
|
+
*
|
|
62
|
+
* euclidean.ts - part of Image Quantization Library
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @preserve
|
|
67
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
68
|
+
* All rights reserved. (MIT Licensed)
|
|
69
|
+
*
|
|
70
|
+
* helper.ts - part of Image Quantization Library
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @preserve
|
|
75
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
76
|
+
* All rights reserved. (MIT Licensed)
|
|
77
|
+
*
|
|
78
|
+
* hueStatistics.ts - part of Image Quantization Library
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @preserve
|
|
83
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
84
|
+
* All rights reserved. (MIT Licensed)
|
|
85
|
+
*
|
|
86
|
+
* iq.ts - Image Quantization Library
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @preserve
|
|
91
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
92
|
+
* All rights reserved. (MIT Licensed)
|
|
93
|
+
*
|
|
94
|
+
* lab2rgb.ts - part of Image Quantization Library
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @preserve
|
|
99
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
100
|
+
* All rights reserved. (MIT Licensed)
|
|
101
|
+
*
|
|
102
|
+
* lab2xyz.ts - part of Image Quantization Library
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @preserve
|
|
107
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
108
|
+
* All rights reserved. (MIT Licensed)
|
|
109
|
+
*
|
|
110
|
+
* manhattanNeuQuant.ts - part of Image Quantization Library
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @preserve
|
|
115
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
116
|
+
* All rights reserved. (MIT Licensed)
|
|
117
|
+
*
|
|
118
|
+
* nearestColor.ts - part of Image Quantization Library
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @preserve
|
|
123
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
124
|
+
* All rights reserved. (MIT Licensed)
|
|
125
|
+
*
|
|
126
|
+
* palette.ts - part of Image Quantization Library
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @preserve
|
|
131
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
132
|
+
* All rights reserved. (MIT Licensed)
|
|
133
|
+
*
|
|
134
|
+
* pngQuant.ts - part of Image Quantization Library
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @preserve
|
|
139
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
140
|
+
* All rights reserved. (MIT Licensed)
|
|
141
|
+
*
|
|
142
|
+
* point.ts - part of Image Quantization Library
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @preserve
|
|
147
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
148
|
+
* All rights reserved. (MIT Licensed)
|
|
149
|
+
*
|
|
150
|
+
* pointContainer.ts - part of Image Quantization Library
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @preserve
|
|
155
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
156
|
+
* All rights reserved. (MIT Licensed)
|
|
157
|
+
*
|
|
158
|
+
* rgb2hsl.ts - part of Image Quantization Library
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @preserve
|
|
163
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
164
|
+
* All rights reserved. (MIT Licensed)
|
|
165
|
+
*
|
|
166
|
+
* rgb2lab.ts - part of Image Quantization Library
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @preserve
|
|
171
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
172
|
+
* All rights reserved. (MIT Licensed)
|
|
173
|
+
*
|
|
174
|
+
* rgb2xyz.ts - part of Image Quantization Library
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @preserve
|
|
179
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
180
|
+
* All rights reserved. (MIT Licensed)
|
|
181
|
+
*
|
|
182
|
+
* ssim.ts - part of Image Quantization Library
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @preserve
|
|
187
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
188
|
+
* All rights reserved. (MIT Licensed)
|
|
189
|
+
*
|
|
190
|
+
* wuQuant.ts - part of Image Quantization Library
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @preserve
|
|
195
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
196
|
+
* All rights reserved. (MIT Licensed)
|
|
197
|
+
*
|
|
198
|
+
* xyz2lab.ts - part of Image Quantization Library
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @preserve
|
|
203
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
204
|
+
* All rights reserved. (MIT Licensed)
|
|
205
|
+
*
|
|
206
|
+
* xyz2rgb.ts - part of Image Quantization Library
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @preserve
|
|
211
|
+
* MIT License
|
|
212
|
+
*
|
|
213
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
214
|
+
*
|
|
215
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
216
|
+
* of this software and associated documentation files (the "Software"), to
|
|
217
|
+
* deal in the Software without restriction, including without limitation the
|
|
218
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
219
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
220
|
+
* furnished to do so, subject to the following conditions:
|
|
221
|
+
*
|
|
222
|
+
* The above copyright notice and this permission notice shall be included in
|
|
223
|
+
* all copies or substantial portions of the Software.
|
|
224
|
+
*
|
|
225
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
226
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
227
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
228
|
+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
229
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
230
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
231
|
+
* IN THE SOFTWARE.
|
|
232
|
+
*
|
|
233
|
+
* riemersma.ts - part of Image Quantization Library
|
|
234
|
+
*/
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @preserve TypeScript port:
|
|
238
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
239
|
+
* All rights reserved. (MIT Licensed)
|
|
240
|
+
*
|
|
241
|
+
* colorHistogram.ts - part of Image Quantization Library
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @preserve TypeScript port:
|
|
246
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
247
|
+
* All rights reserved. (MIT Licensed)
|
|
248
|
+
*
|
|
249
|
+
* neuquant.ts - part of Image Quantization Library
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @preserve TypeScript port:
|
|
254
|
+
* Copyright 2015-2018 Igor Bezkrovnyi
|
|
255
|
+
* All rights reserved. (MIT Licensed)
|
|
256
|
+
*
|
|
257
|
+
* rgbquant.ts - part of Image Quantization Library
|
|
258
|
+
*/
|
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/camera.ts
CHANGED
|
@@ -241,12 +241,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
|
|
|
241
241
|
description: 'Order preference for video streams. Default: RTSP -> RTMP -> Native',
|
|
242
242
|
defaultValue: 'Default',
|
|
243
243
|
choices: ['Default', 'Native', 'RTSP', 'RTMP'],
|
|
244
|
-
subgroup: 'Streaming',
|
|
245
244
|
},
|
|
246
|
-
// capabilities: {
|
|
247
|
-
// json: true,
|
|
248
|
-
// hide: true,
|
|
249
|
-
// },
|
|
250
245
|
multifocalInfo: {
|
|
251
246
|
json: true,
|
|
252
247
|
hide: true,
|
package/src/nvr.ts
CHANGED
|
@@ -369,6 +369,22 @@ export class ReolinkNativeNvrDevice extends BaseBaichuanClass implements Setting
|
|
|
369
369
|
isMultifocal,
|
|
370
370
|
identifier,
|
|
371
371
|
});
|
|
372
|
+
|
|
373
|
+
// Check if device already exists in cameraNativeMap with a different nativeId format
|
|
374
|
+
// (e.g., with chN- prefix). If so, use that nativeId for the mapping.
|
|
375
|
+
let actualNativeId = nativeId;
|
|
376
|
+
const existingDevice = Array.from(this.cameraNativeMap.entries()).find(([id, camera]) => {
|
|
377
|
+
// Check if the camera matches by channel or UID
|
|
378
|
+
const cameraChannel = camera.storageSettings.values.rtspChannel;
|
|
379
|
+
const cameraUid = camera.storageSettings.values.uid;
|
|
380
|
+
return cameraChannel === channel || (uid && cameraUid === uid);
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
if (existingDevice) {
|
|
384
|
+
actualNativeId = existingDevice[0];
|
|
385
|
+
logger.debug(`[syncEntities] Using existing nativeId for channel ${channel}: ${actualNativeId} (instead of ${nativeId})`);
|
|
386
|
+
}
|
|
387
|
+
|
|
372
388
|
const interfaces = [ScryptedInterface.VideoCamera];
|
|
373
389
|
if (isBattery) {
|
|
374
390
|
interfaces.push(ScryptedInterface.Battery);
|
|
@@ -388,7 +404,7 @@ export class ReolinkNativeNvrDevice extends BaseBaichuanClass implements Setting
|
|
|
388
404
|
}
|
|
389
405
|
};
|
|
390
406
|
|
|
391
|
-
this.channelToNativeIdMap.set(channel,
|
|
407
|
+
this.channelToNativeIdMap.set(channel, actualNativeId);
|
|
392
408
|
|
|
393
409
|
const allNativeIds = sdk.deviceManager.getNativeIds().filter(nid => !!nid);
|
|
394
410
|
|