iobroker.ring 5.0.0-alpha.0 → 5.0.1

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.
Files changed (40) hide show
  1. package/README.md +109 -93
  2. package/admin/admin.d.ts +87 -68
  3. package/admin/camera-photo-6.png +0 -0
  4. package/admin/convert.js +447 -0
  5. package/admin/i18n/de.json +44 -0
  6. package/admin/i18n/en.json +44 -0
  7. package/admin/i18n/es.json +44 -0
  8. package/admin/i18n/fr.json +44 -0
  9. package/admin/i18n/it.json +44 -0
  10. package/admin/i18n/nl.json +44 -0
  11. package/admin/i18n/pl.json +44 -0
  12. package/admin/i18n/pt.json +44 -0
  13. package/admin/i18n/ru.json +44 -0
  14. package/admin/i18n/uk.json +44 -0
  15. package/admin/i18n/zh-cn.json +44 -0
  16. package/admin/index_m.html +151 -32
  17. package/admin/jsonConfig.json +379 -0
  18. package/admin/tab_m.html +38 -0
  19. package/admin/tab_m.js +145 -0
  20. package/admin/tsconfig.json +5 -3
  21. package/admin/words.js +270 -23
  22. package/build/lib/constants.js +45 -29
  23. package/build/lib/constants.js.map +1 -1
  24. package/build/lib/ownRingCamera.js +392 -94
  25. package/build/lib/ownRingCamera.js.map +1 -1
  26. package/build/lib/ownRingDevice.js +2 -2
  27. package/build/lib/ownRingDevice.js.map +1 -1
  28. package/build/lib/ownRingIntercom.js +4 -4
  29. package/build/lib/ownRingIntercom.js.map +1 -1
  30. package/build/lib/ownRingLocation.js +9 -15
  31. package/build/lib/ownRingLocation.js.map +1 -1
  32. package/build/lib/ringApiClient.js +11 -8
  33. package/build/lib/ringApiClient.js.map +1 -1
  34. package/build/lib/services/file-service.js +15 -17
  35. package/build/lib/services/file-service.js.map +1 -1
  36. package/build/lib/tools.js +3 -3
  37. package/build/main.js +51 -52
  38. package/build/main.js.map +1 -1
  39. package/io-package.json +72 -49
  40. package/package.json +29 -18
package/README.md CHANGED
@@ -9,17 +9,15 @@
9
9
 
10
10
  [![NPM](https://nodei.co/npm/iobroker.ring.png?downloads=true)](https://nodei.co/npm/iobroker.ring/)
11
11
 
12
- Requires Admin v4 and `node 16.x`.
13
-
14
12
  The Ring adapter works with Ring devices like the Ring Video Doorbell and Ring Cam and shows if someone rings the
15
- doorbell or if motion is detected. The Ring Video Doorbell or Cam sends a videostream if a motion or doorbell ist
16
- detected.
13
+ doorbell or if motion is detected.
14
+ The Ring Video Doorbell or Cam sends a videostream if a motion or doorbell is detected.
17
15
 
18
16
  ## Install & Configuration
19
17
 
20
- After installing the Adapter you have to enter your Email and Password of your [ring.com](https://ring.com) Account and
21
- a Token. Ring now requires the use of Two-Factor Auth (2fa) for all accounts. For getting the token please do following
22
- on your shell.
18
+ After installing the Adapter, you have to enter your Token.
19
+ Ring now requires the use of Two-Factor Authentication (2fa) for all accounts.
20
+ For getting the token, please do following on your shell.
23
21
 
24
22
  ```shell
25
23
  npx -p ring-client-api ring-auth-cli
@@ -46,40 +44,50 @@ a counter, timestamp, ring id or kind of ring.
46
44
 
47
45
  ### FAQ
48
46
 
49
- #### I don't recieve events, snapshots and videos on motion or detected person
47
+ #### I don't receive events, snapshots and videos on motion or detected person
50
48
 
51
- Congrats it's very likely that your current token was put on a blacklist by ring, denying you the push notification
52
- you´d need.
53
- Best way to resolve this is to remove any previous browsers/adapter tokens on the ring website and generating a new
49
+ Congrats, it's very likely that your current token was put on a blacklist by ring, denying you the push notification you
50
+ would need.
51
+ The best way to resolve this is to remove any previous browsers/adapter tokens on the ring website and generate a new
54
52
  token for the adapter.
55
53
 
56
- In order for this adapter to properly react on events Ring must send the push notification to the
54
+ In order for this adapter to properly react on events, Ring must send the push notification to the
57
55
  used [Ring Api Client](https://github.com/dgreif/ring) for this adapter to react on it. The logic in this adapter was
58
- checked multiple times and works for plenty users, so if you experience issues regarding missing events it's unlikely
56
+ checked multiple times and works for plenty of users, so if you experience issues regarding missing events, it's
57
+ unlikely
59
58
  the fault of this adapter.
60
59
 
60
+ ### V5 Breaking Changes
61
+
62
+ 1. Some datapoints got renamed to be more consistent (e.g. `livestream_request` got reduced to `request` as it already
63
+ is in channel `livestream`).
64
+ 2. You can now configure wether you want to react on events (with recording, snapshot, ...) or not.
65
+ 3. Binary states got removed.
66
+
67
+
61
68
  ### V3 Rewrite Breaking Changes
62
69
 
63
- 1. The Device Names got extended by their description (e.g. from `Device 1234567`
70
+ 1. The Device Names got extended by their description (e.g., from `Device 1234567`
64
71
  to `Device 1234567 ("Floodlight Garden")`)
65
72
  2. Snapshot/Livestream Data is now in a respective channel, containing the other data points.
66
73
  3. The snapshot/livestream object got changed from type meta to state with type file.
67
- 4. Events (Motion, Ding, etc.) are now in a respective channel.
74
+ 4. Events (Motion, Ding, etc.) are now in the respective channel.
68
75
  5. Due to `ring-api` dropping the support for node before `v16.x` this adapter needs `node v16.x` or `node v18.x`
69
- 6. Active refreshes are reduced to once every 2 hours, as we are listening/reacting on events.
76
+ 6. Active refreshes are reduced to once every 2 hours, as we are listening/reacting to events.
70
77
 
71
78
  ### SIP (before Version 3.x)
72
79
 
73
80
  You can use the SIP Information for a SIP Video Conference with your SIP client.
74
81
  The adapter will not provide all ring devices because the used API does not include all ring devices.
75
82
 
76
- You can use for example the Blink SIP client on [http://icanblink.com/](http://icanblink.com/). To get video working go
77
- into Blink's Preferences and under "Accounts", switch the tab to "Media" and deselect "Encrypt audio and video" under "
78
- RTP Options". Be careful the SIP information expire after a few seconds!
79
- Hopefully I will be able to support a video stream soon. Unfortunately [ring.com](https://ring.com) does not have an
80
- official API that support this feature.
83
+ You can use, for example, the Blink SIP client on [http://icanblink.com/](http://icanblink.com/).
84
+ To get video working go into Blink's Preferences and under "Accounts", switch the tab to "Media" and deselect "Encrypt
85
+ audio and video" under "RTP Options".
86
+ Be careful, the SIP information expires after a few seconds!
87
+ Hopefully I will be able to support a video stream soon.
88
+ Unfortunately, [ring.com](https://ring.com) does not have an official API that support this feature.
81
89
  If you press the `livestream request` button you get new SIP Information for building up a SIP Video Call session.
82
- If you are using the [ring.com](https://ring.com) cloud you find under history a http link to your last motion /
90
+ If you are using the [ring.com](https://ring.com) cloud, you find under history a http link to your last motion /
83
91
  doorbell recorded video.
84
92
 
85
93
  ## Changelog
@@ -88,59 +96,67 @@ doorbell recorded video.
88
96
  Placeholder for the next version (at the beginning of the line):
89
97
  ### **WORK IN PROGRESS**
90
98
  -->
91
- ### 5.0.0-alpha.0 (2023-09-16)
99
+ ### 5.0.1 (2023-10-20)
92
100
 
101
+ * (theimo1221) Updated Packages
102
+ * (theimo1221) Remove legacy states
103
+ * (theimo1221) Add stickup_cam_mini_v2
104
+
105
+ ### 5.0.0 (2023-10-10)
106
+
107
+ * (bluefox) migrated the configuration to JSON
108
+ * (crocri) many changes for livestream and high-definition screenshots
109
+ * (theimo1221) Refactoring and cleanup
93
110
  * (crocri) Ding event is now working again for Ring-Intercom
94
111
  * (crocri) auto livestream creation takes now value from config, before fix
95
- * (crocri) snapshot now async, because snapshot and livestream in parallel does not work
112
+ * (crocri) snapshot now async, because snapshot and livestream in parallel do not work
96
113
  * (crocri) livestream duration now settable via tree entry will be auto reset via livestream request.
97
114
  * (crocri) two new config entries auto_livestream and auto_snapshot to disable auto creation of livestream and snapshot.
98
115
  * (crocri) some minor corrections to code
99
116
  * (crocri) Removed binary States
100
- * (crocri) Improvements for vis compatibility
117
+ * (crocri) Improvements for vis compatibility done
101
118
  * (theimo1221) Refactoring and cleanup
102
- * (theimo1221) Update Packages
103
119
 
104
120
  ### 4.0.0 (2023-08-22)
105
121
 
106
122
  * (theimo1221) !!Breaking Change!! From now on Node 18 or 20 is required, Node 16 is not supported anymore
107
- * (theimo1221) Update Ring-Api to V12 which needs Node 18 or 20
108
- * (theimo1221) Update Packages
123
+ * (theimo1221) Updated Ring-Api to v12 which needs Node 18 or 20
124
+ * (theimo1221) Updated Packages
109
125
 
110
126
  ### 3.4.1 (2023-08-06)
111
127
 
112
128
  * (theimo1221) Compliance to adapter-checker
113
- * (theimo1221) Update Packages
129
+ * (theimo1221) Updated Packages
114
130
  * (theimo1221) Debounce Doorbell Presses
115
- * (theimo1221) Add Support for cocoa_doorbell_v2
116
- * (theimo1221) Add Support for stickup_cam_longfin
117
- * (theimo1221) Fix compatibility and recompile
131
+ * (theimo1221) Added Support for cocoa_doorbell_v2
132
+ * (theimo1221) Added Support for stickup_cam_longfin
133
+ * (theimo1221) Fixed compatibility and recompile
118
134
 
119
135
  ### 3.4.0 (2023-06-09)
120
136
 
121
- * (theimo1221) Update Packages (which allows node 20 now)
137
+ * (theimo1221) Updated Packages (which allows node 20 now)
122
138
 
123
139
  ### 3.3.1 (2023-05-18)
124
140
 
125
- * (theimo1221) Update Packages
141
+ * (theimo1221) Updated Packages
126
142
 
127
143
  ### 3.3.0 (2023-04-02)
128
144
 
129
- * (theimo1221) Update Packages
130
- * (theimo1221) Device with Type stickup_cam_longfin not yet supported #483
145
+ * (theimo1221) Updated Packages
146
+ * (theimo1221) Device with Type stickup_cam_longfin didn't yet support #483
131
147
 
132
148
  ### 3.2.7 (2023-03-22)
133
149
 
134
- * (foxriver76) prepare js-controller v5
150
+ * (foxriver76) prepared js-controller v5
135
151
 
136
152
  ### 3.2.6 (2023-02-18)
137
153
 
138
- * (theimo1221) Improve behaviour on initial Location load fail
139
- * (theimo1221) Update Packages
154
+ * (theimo1221) Improve behavior on initial Location load fail
155
+ * (theimo1221) Updated Packages
140
156
 
141
157
  ### 3.2.5 (2023-01-28)
142
158
 
143
- * (theimo1221) Update Packages
159
+ * (theimo1221) Updated Packages
144
160
 
145
161
  ### 3.2.4 (2022-12-15)
146
162
 
@@ -148,12 +164,12 @@ doorbell recorded video.
148
164
 
149
165
  ### 3.2.3 (2022-12-15)
150
166
 
151
- * (theimo1221) Update Packages
167
+ * (theimo1221) Updated Packages
152
168
  * (theimo1221) #385 Experimental Ring Intercom support
153
169
 
154
170
  ### 3.2.2 (2022-12-02)
155
171
 
156
- * (theimo1221) #373 Fix event receiving for iobroker instances without unique hostname
172
+ * (theimo1221) #373 Fix event receiving for iobroker instances without a unique hostname
157
173
 
158
174
  ### 3.2.1 (2022-12-02)
159
175
 
@@ -161,7 +177,7 @@ doorbell recorded video.
161
177
 
162
178
  ### 3.2.0 (2022-12-02)
163
179
 
164
- * (theimo1221) Update Packages
180
+ * (theimo1221) Updated Packages
165
181
  * (theimo1221) #373 Increase logging and change recording order on Doorbell Event
166
182
 
167
183
  ### 3.1.9 (2022-11-20)
@@ -170,12 +186,12 @@ doorbell recorded video.
170
186
 
171
187
  ### 3.1.8 (2022-11-20)
172
188
 
173
- * (theimo1221) Update Packages
174
- * (theimo1221) Compliance to newest ring api version
189
+ * (theimo1221) Updated Packages
190
+ * (theimo1221) Compliance to the newest ring api version
175
191
 
176
192
  ### 3.1.7 (2022-10-28)
177
193
 
178
- * (theimo1221) Update Packages
194
+ * (theimo1221) Updated Packages
179
195
 
180
196
  ### 3.1.6 (2022-10-28)
181
197
 
@@ -183,7 +199,7 @@ doorbell recorded video.
183
199
 
184
200
  ### 3.1.5 (2022-10-16)
185
201
 
186
- * (theimo1221) Update Packages
202
+ * (theimo1221) Updated Packages
187
203
 
188
204
  ### 3.1.4 (2022-10-16)
189
205
 
@@ -191,16 +207,16 @@ doorbell recorded video.
191
207
 
192
208
  ### 3.1.3 (2022-10-04)
193
209
 
194
- * (theimo1221) Update Packages
210
+ * (theimo1221) Updated Packages
195
211
 
196
212
  ### 3.1.2 (2022-09-22)
197
213
 
198
- * (theimo1221) Update Packages
199
- * (theimo1221) Fix an issue with floodlight control
214
+ * (theimo1221) Updated Packages
215
+ * (theimo1221) Fixed an issue with floodlight control
200
216
 
201
217
  ### 3.1.1 (2022-08-11)
202
218
 
203
- * (theimo1221) Improve Doorbell Event Logging
219
+ * (theimo1221) Improved Doorbell Event Logging
204
220
 
205
221
  ### 3.1.0 (2022-08-04)
206
222
 
@@ -208,16 +224,16 @@ doorbell recorded video.
208
224
 
209
225
  ### 3.0.5 (2022-07-05)
210
226
 
211
- * (theimo1221) Improve Log Message on failed Snapshots during event handling
212
- * (theimo1221) Add Support for doorbell oyster
227
+ * (theimo1221) Improved Log Message on failed Snapshots during event handling
228
+ * (theimo1221) Added Support for doorbell oyster
213
229
 
214
230
  ### 3.0.4 (2022-06-17)
215
231
 
216
- * (theimo1221) Fix Edge Case resulting in lamps being permanently on
232
+ * (theimo1221) Fixed Edge Case resulting in lamps being permanently on
217
233
 
218
234
  ### 3.0.3 (2022-06-16)
219
235
 
220
- * (theimo1221) Implement location mode
236
+ * (theimo1221) Implemented location mode
221
237
 
222
238
  ### 3.0.1 (2022-06-08)
223
239
 
@@ -225,22 +241,22 @@ doorbell recorded video.
225
241
 
226
242
  ### 3.0.0-beta.13 (2022-05-30)
227
243
 
228
- * (theimo1221) Prevent missing of events, due to socket drop within ring-api-client
229
- * (theimo1221) Improve device logging readability
244
+ * (theimo1221) Prevented missing of events, due to a socket drop within ring-api-client
245
+ * (theimo1221) Improved device logging readability
230
246
 
231
247
  ### 3.0.0-beta.12 (2022-05-28)
232
248
 
233
- * (theimo1221) Fix error in beta.11 in regard to new installations
249
+ * (theimo1221) Fixed error in beta.11 in regard to new installations
234
250
  * (theimo1221) Harden Event Handling to prevent rare permanent busy occasions
235
- * (theimo1221) Add support for doorbell device `doorbell_graham_cracker`
251
+ * (theimo1221) Added support for doorbell device `doorbell_graham_cracker`
236
252
 
237
253
  ### 3.0.0-beta.11 (2022-05-24)
238
254
 
239
- * (theimo1221) Add processing of new token provided by ring.
255
+ * (theimo1221) Added processing of new token provided by ring.
240
256
 
241
257
  ### 3.0.0-beta.10 (2022-05-24)
242
258
 
243
- * (theimo1221) Add `lpd_v4` Doorbell
259
+ * (theimo1221) Added `lpd_v4` Doorbell
244
260
 
245
261
  ### 3.0.0-beta.9 (2022-05-21)
246
262
 
@@ -248,7 +264,7 @@ doorbell recorded video.
248
264
 
249
265
  ### 3.0.0-beta.8 (2022-05-17)
250
266
 
251
- * (theimo1221) Fix writing to iobroker-data/files folder (thx to Apollon)
267
+ * (theimo1221) Fixed writing to iobroker-data/files folder (thx to Apollon)
252
268
 
253
269
  ### 3.0.0-beta.7 (2022-05-16)
254
270
 
@@ -257,11 +273,11 @@ doorbell recorded video.
257
273
  ### 3.0.0-beta.6 (2022-05-16)
258
274
 
259
275
  * (theimo1221) Record more events (without recording twice)
260
- * (theimo1221) Improve snapshot deleting for initial snapshot after restart
276
+ * (theimo1221) Improved snapshot deleting for initial snapshot after restart
261
277
 
262
278
  ### 3.0.0-beta.5 (2022-05-14)
263
279
 
264
- * (theimo1221) Prevent crashes during installation by clearer enforcing of node 16
280
+ * (theimo1221) Prevented crashes during installation by clearer enforcing of node 16
265
281
 
266
282
  ### 3.0.0-beta.4 (2022-05-14)
267
283
 
@@ -269,61 +285,61 @@ doorbell recorded video.
269
285
 
270
286
  ### 3.0.0-beta.3 (2022-05-14)
271
287
 
272
- * (theimo1221) Rewrite V3 (Breaking Changes listed below)
273
- * (theimo1221) Update packages
274
- * (theimo1221) Fix in GitHub release workflow
288
+ * (theimo1221) Rewrote V3 (Breaking Changes listed below)
289
+ * (theimo1221) Updated packages
290
+ * (theimo1221) Fixed in GitHub release workflow
275
291
 
276
292
  ### 2.0.0-beta.3 (2022-02-08)
277
293
 
278
- * (theimo1221) Fix adapter checker issues
294
+ * (theimo1221) Fixed adapter checker issues
279
295
 
280
296
  ### 2.0.0-beta.0 (2022-02-05)
281
297
 
282
- * (theimo1221) Update packages
283
- * (theimo1221) Add JS-Controller 4.0 dependency
298
+ * (theimo1221) Updated packages
299
+ * (theimo1221) Added JS-Controller 4.0 dependency
284
300
  * (theimo1221) On ding --> First take snapshot then livestream
285
301
 
286
302
  ### 1.2.8 (2021-10-14)
287
303
 
288
- * (theimo1221) Update packages
304
+ * (theimo1221) Updated packages
289
305
 
290
306
  ### 1.2.6 (2021-09-05)
291
307
 
292
- * (theimo1221) Update packages
293
- * (theimo1221) Stop adapter on unhandled Error
294
- * (theimo1221) Terminate adapter on invalid ring credentials
308
+ * (theimo1221) Updated packages
309
+ * (theimo1221) Stopped adapter on unhandled Error
310
+ * (theimo1221) Terminated adapter on invalid ring credentials
295
311
 
296
312
  ### 1.2.4-1 (2021-08-12)
297
313
 
298
- * (theimo1221) Update packages
314
+ * (theimo1221) Updated packages
299
315
 
300
316
  ### 1.2.4-0 (2021-08-07)
301
317
 
302
318
  * (theimo1221) Refactoring
303
- * (theimo1221) Update packages
319
+ * (theimo1221) Updated packages
304
320
 
305
321
  ### 1.2.3 (2021-07-30)
306
322
 
307
- * (theimo1221) Update packages
308
- * (theimo1221) Fix compatibility issues with new ring api
323
+ * (theimo1221) Updated packages
324
+ * (theimo1221) Fixed compatibility issues with new ring api
309
325
 
310
326
  ### 1.2.2 (2021-05-05)
311
327
 
312
- * (theimo1221) Update packages due to security patches
328
+ * (theimo1221) Updated packages due to security patches
313
329
 
314
330
  ### 1.2.1 (2021-04-09)
315
331
 
316
- * (theimo1221) Bump version
332
+ * (theimo1221) Bumped version
317
333
 
318
334
  ### 1.2.0 (2021-04-08)
319
335
 
320
- * (theimo1221) Add new device type spotlightw as doorbell
321
- * (theimo1221) Update dependencies (ringapi, node-schedule, etc.)
336
+ * (theimo1221) Added new device type spotlightw as doorbell
337
+ * (theimo1221) Updated dependencies (ringapi, node-schedule, etc.)
322
338
 
323
339
  ### 1.1.6-3 (2021-03-29)
324
340
 
325
- * (theimo1221) Fix typo preventing Livestream recordings after motion detection
326
- * (theimo1221) Reduce Levels of Log Messages, to not spam iobroker Log
341
+ * (theimo1221) Fixed typo preventing Livestream recordings after motion detection
342
+ * (theimo1221) Reduced Levels of Log Messages, to not spam iobroker Log
327
343
 
328
344
  ### 1.1.6-2 (2021-03-29)
329
345
 
@@ -336,11 +352,11 @@ doorbell recorded video.
336
352
 
337
353
  ### 1.1.5 (04.11.2020)
338
354
 
339
- * (Stübi) Add floodlight
355
+ * (Stübi) Added floodlight
340
356
 
341
357
  ### 1.1.4 (23.05.2020)
342
358
 
343
- * (Stübi) Add new libraries
359
+ * (Stübi) Added new libraries
344
360
 
345
361
  ### 1.1.3 (06.05.2020)
346
362
 
@@ -368,7 +384,7 @@ doorbell recorded video.
368
384
  * (Stübi) Old snapshots and livestreams can be deleted on the filesystem
369
385
  * (Stübi) Sentry logging added
370
386
  * (Stübi) Small improvements and bugfixing
371
- * (Stübi) Add a Two-Factor Auth (2fa) description (Issue #14, Issue #13, Issue #19)
387
+ * (Stübi) Added a Two-Factor Auth (2fa) description (Issue #14, Issue #13, Issue #19)
372
388
 
373
389
  ### 1.0.7 (24.12.2019)
374
390
 
@@ -377,8 +393,8 @@ doorbell recorded video.
377
393
  ### 1.0.6 (20.12.2019)
378
394
 
379
395
  * (Stübi) Bugfixing: Login with username and password changed
380
- * (Stübi) New feature (BETA): Now you can make snapshots in jpg and a livestream in mp4 format. Unfortunately the
381
- snapshot / livestream does not work always!
396
+ * (Stübi) New feature (BETA): Now you can make snapshots in jpg and a livestream in mp4 format. Unfortunately, the
397
+ snapshot / livestream does not always work!
382
398
 
383
399
  ### 1.0.5 (18.04.2019)
384
400
 
@@ -386,7 +402,7 @@ doorbell recorded video.
386
402
  * (Stübi) Using new API. With this API livestreaming and snapshots are possible (work still in progress and not
387
403
  supported in this version)
388
404
  * (Stübi) Fixed an error with js-controller 2.0. You need at least this version with js-controller 2.0
389
- * (Stübi) two face authentication
405
+ * (Stübi) Added two factory authentications
390
406
 
391
407
  ### 1.0.4 (17.04.2019)
392
408
 
@@ -394,8 +410,8 @@ doorbell recorded video.
394
410
 
395
411
  ### 1.0.3 (09.03.2019)
396
412
 
397
- * (Stübi) Major change! I had to change the used ring.com API to an other API. The old one did not work anymore. For
398
- this reason, a lot has to be redesigned.
413
+ * (Stübi) Major change! I had to change the used ring.com API to another API. The old one did not work anymore. For this
414
+ reason, a lot has to be redesigned.
399
415
 
400
416
  ### 1.0.2 (01.02.2019)
401
417
 
@@ -407,7 +423,7 @@ doorbell recorded video.
407
423
 
408
424
  ### 1.0.0 (04.01.2018)
409
425
 
410
- * (Stübi) Add camera device. For this reason, the device name changed from doorbot to doorbell.
426
+ * (Stübi) Added a camera device. For this reason, the device name changed from doorbot to doorbell.
411
427
 
412
428
  ### 0.1.3 (20.12.2018)
413
429
 
package/admin/admin.d.ts CHANGED
@@ -5,8 +5,8 @@ declare let save: (callback: (settings: Record<string, unknown>) => void) => voi
5
5
 
6
6
  // make load and save exist on the window object
7
7
  interface Window {
8
- load: typeof load;
9
- save: typeof save;
8
+ load: typeof load;
9
+ save: typeof save;
10
10
  }
11
11
 
12
12
  declare const instance: number;
@@ -14,80 +14,99 @@ declare const adapter: string;
14
14
  /** Translates text */
15
15
  declare function _(text: string, arg1?: string, arg2?: string, arg3?: string): string;
16
16
  declare const socket: ioBrokerSocket;
17
+
17
18
  declare function sendTo(
18
- instance: any | null,
19
- command: string,
20
- message: any,
21
- callback: (result: SendToResult) => void | Promise<void>,
19
+ instance: any | null,
20
+ command: string,
21
+ message: any,
22
+ callback: (result: SendToResult) => void | Promise<void>,
22
23
  ): void;
23
24
 
24
25
  interface SendToResult {
25
- error?: string | Error;
26
- result?: any;
26
+ error?: string | Error;
27
+ result?: any;
27
28
  }
28
29
 
29
30
  // tslint:disable-next-line:class-name
30
31
  interface ioBrokerSocket {
31
- emit(
32
- command: "subscribeObjects",
33
- pattern: string,
34
- callback?: (err?: string) => void | Promise<void>,
35
- ): void;
36
- emit(
37
- command: "subscribeStates",
38
- pattern: string,
39
- callback?: (err?: string) => void | Promise<void>,
40
- ): void;
41
- emit(
42
- command: "unsubscribeObjects",
43
- pattern: string,
44
- callback?: (err?: string) => void | Promise<void>,
45
- ): void;
46
- emit(
47
- command: "unsubscribeStates",
48
- pattern: string,
49
- callback?: (err?: string) => void | Promise<void>,
50
- ): void;
51
-
52
- emit(
53
- event: "getObjectView",
54
- view: "system",
55
- type: "device",
56
- options: ioBroker.GetObjectViewParams,
57
- callback: (
58
- err: string | undefined,
59
- result?: any,
60
- ) => void | Promise<void>,
61
- ): void;
62
- emit(
63
- event: "getStates",
64
- callback: (
65
- err: string | undefined,
66
- result?: Record<string, any>,
67
- ) => void,
68
- ): void;
69
- emit(
70
- event: "getState",
71
- id: string,
72
- callback: (err: string | undefined, result?: ioBroker.State) => void,
73
- ): void;
74
- emit(
75
- event: "setState",
76
- id: string,
77
- state: unknown,
78
- callback: (err: string | undefined, result?: any) => void,
79
- ): void;
32
+ emit(
33
+ command: "subscribeObjects",
34
+ pattern: string,
35
+ callback?: (err?: string) => void | Promise<void>,
36
+ ): void;
37
+ emit(
38
+ command: "subscribeStates",
39
+ pattern: string,
40
+ callback?: (err?: string) => void | Promise<void>,
41
+ ): void;
42
+ emit(
43
+ command: "unsubscribeObjects",
44
+ pattern: string,
45
+ callback?: (err?: string) => void | Promise<void>,
46
+ ): void;
47
+ emit(
48
+ command: "unsubscribeStates",
49
+ pattern: string,
50
+ callback?: (err?: string) => void | Promise<void>,
51
+ ): void;
52
+ emit(
53
+ command: "getObject",
54
+ id: string,
55
+ callback?: (err: string | undefined, result?: ioBroker.State) => void | Promise<void>,
56
+ ): void;
57
+ emit(
58
+ command: "getForeignObjects",
59
+ pattern: string,
60
+ type: string,
61
+ callback?: (err: string | undefined, objects?: ioBroker.State) => void | Promise<void>,
62
+ ): void;
63
+ emit(
64
+ event: "getObjectView",
65
+ view: "system",
66
+ type: "device",
67
+ options: ioBroker.GetObjectViewParams,
68
+ callback: (
69
+ err: string | undefined,
70
+ result?: any,
71
+ ) => void | Promise<void>,
72
+ ): void;
73
+ emit(
74
+ event: "getStates",
75
+ pattern: string,
76
+ callback: (
77
+ err: string | undefined,
78
+ result?: Record<string, any>,
79
+ ) => void,
80
+ ): void;
81
+ emit(
82
+ event: "getState",
83
+ id: string,
84
+ callback: (err: string | undefined, result?: ioBroker.State) => void,
85
+ ): void;
86
+ emit(
87
+ event: "setState",
88
+ id: string,
89
+ state: unknown,
90
+ callback: (err: string | undefined, result?: any) => void,
91
+ ): void;
92
+ emit(
93
+ event: "readDir",
94
+ _adapter: string,
95
+ dirName: string,
96
+ options?: object,
97
+ callback: (err: string | undefined, files: object[]) => void,
98
+ ): void;
80
99
 
81
- on(event: "objectChange", handler: ioBroker.ObjectChangeHandler): void;
82
- on(event: "stateChange", handler: ioBroker.StateChangeHandler): void;
83
- removeEventHandler(
84
- event: "objectChange",
85
- handler: ioBroker.ObjectChangeHandler,
86
- ): void;
87
- removeEventHandler(
88
- event: "stateChange",
89
- handler: ioBroker.StateChangeHandler,
90
- ): void;
100
+ on(event: "objectChange", handler: ioBroker.ObjectChangeHandler): void;
101
+ on(event: "stateChange", handler: ioBroker.StateChangeHandler): void;
102
+ removeEventHandler(
103
+ event: "objectChange",
104
+ handler: ioBroker.ObjectChangeHandler,
105
+ ): void;
106
+ removeEventHandler(
107
+ event: "stateChange",
108
+ handler: ioBroker.StateChangeHandler,
109
+ ): void;
91
110
 
92
- // TODO: other events
111
+ // TODO: other events
93
112
  }
Binary file