iobroker.bshb 0.4.0 → 0.4.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.
- package/README.md +25 -194
- package/build/bshb-controller.js +27 -17
- package/build/bshb-controller.js.map +1 -1
- package/build/bshb-definition.js +15 -15
- package/build/bshb-definition.js.map +1 -1
- package/build/bshb-logger.js +15 -15
- package/build/bshb-logger.js.map +1 -1
- package/build/client-cert.js.map +1 -1
- package/build/controller/handler/bshb-air-purity-guardian-handler.js +34 -24
- package/build/controller/handler/bshb-air-purity-guardian-handler.js.map +1 -1
- package/build/controller/handler/bshb-automation-handler.js +93 -82
- package/build/controller/handler/bshb-automation-handler.js.map +1 -1
- package/build/controller/handler/bshb-backup-handler.js +72 -72
- package/build/controller/handler/bshb-backup-handler.js.map +1 -1
- package/build/controller/handler/bshb-climate-handler.js +45 -38
- package/build/controller/handler/bshb-climate-handler.js.map +1 -1
- package/build/controller/handler/bshb-device-handler.js +144 -106
- package/build/controller/handler/bshb-device-handler.js.map +1 -1
- package/build/controller/handler/bshb-device-status-update-handler.js +9 -4
- package/build/controller/handler/bshb-device-status-update-handler.js.map +1 -1
- package/build/controller/handler/bshb-general-update-handler.js +13 -11
- package/build/controller/handler/bshb-general-update-handler.js.map +1 -1
- package/build/controller/handler/bshb-handler.js +26 -18
- package/build/controller/handler/bshb-handler.js.map +1 -1
- package/build/controller/handler/bshb-intrusion-detection-handler.js +64 -50
- package/build/controller/handler/bshb-intrusion-detection-handler.js.map +1 -1
- package/build/controller/handler/bshb-messages-handler.js +16 -13
- package/build/controller/handler/bshb-messages-handler.js.map +1 -1
- package/build/controller/handler/bshb-motion-lights-handler.js +35 -27
- package/build/controller/handler/bshb-motion-lights-handler.js.map +1 -1
- package/build/controller/handler/bshb-open-door-window-handler.js +77 -70
- package/build/controller/handler/bshb-open-door-window-handler.js.map +1 -1
- package/build/controller/handler/bshb-room-handler.js +28 -26
- package/build/controller/handler/bshb-room-handler.js.map +1 -1
- package/build/controller/handler/bshb-scenario-handler.js +30 -26
- package/build/controller/handler/bshb-scenario-handler.js.map +1 -1
- package/build/controller/handler/bshb-user-defined-states-handler.js +30 -24
- package/build/controller/handler/bshb-user-defined-states-handler.js.map +1 -1
- package/build/controller/handler/bshb-water-alarm-handler.js +46 -40
- package/build/controller/handler/bshb-water-alarm-handler.js.map +1 -1
- package/build/definition/function.js +14 -14
- package/build/definition/function.js.map +1 -1
- package/build/definition/roles.js +94 -94
- package/build/definition/roles.js.map +1 -1
- package/build/definition/states.js +150 -150
- package/build/definition/states.js.map +1 -1
- package/build/definition/units.js +20 -20
- package/build/definition/units.js.map +1 -1
- package/build/definition/write.js +6 -6
- package/build/definition/write.js.map +1 -1
- package/build/log-level.js.map +1 -1
- package/build/main.js +101 -74
- package/build/main.js.map +1 -1
- package/build/migration.js +4 -4
- package/build/migration.js.map +1 -1
- package/build/rate-limiter.js +6 -4
- package/build/rate-limiter.js.map +1 -1
- package/build/utils.js +9 -9
- package/build/utils.js.map +1 -1
- package/io-package.json +14 -14
- package/package.json +54 -31
package/README.md
CHANGED
|
@@ -36,6 +36,10 @@ use of the adapter. You find a link at the top.
|
|
|
36
36
|
|
|
37
37
|
## Changelog
|
|
38
38
|
|
|
39
|
+
## 0.4.1
|
|
40
|
+
|
|
41
|
+
* Dependencies updated
|
|
42
|
+
|
|
39
43
|
### 0.4.0
|
|
40
44
|
|
|
41
45
|
* (holomekc) Minor bug fixes
|
|
@@ -64,203 +68,30 @@ use of the adapter. You find a link at the top.
|
|
|
64
68
|
|
|
65
69
|
* (holomekc) Support for user defined states
|
|
66
70
|
|
|
67
|
-
###
|
|
68
|
-
|
|
69
|
-
* (holomekc) Update the adapter to the latest requirements
|
|
70
|
-
|
|
71
|
-
### 0.2.3
|
|
72
|
-
|
|
73
|
-
* (holomekc) Update to api version 3.2
|
|
74
|
-
* (holomekc) Add support for climate schedules with two options to activate them
|
|
75
|
-
* (holomekc) Update intrusion detection so that more information is shown
|
|
76
|
-
* (holomekc) Update intrusion detection and climate schedule switches stay active now
|
|
77
|
-
* (holomekc) Support for rooms. Configuration to ignore server certificates. Allow ttesting controller 2 and can prevent
|
|
78
|
-
issues in case certificates expire. Less secure though.
|
|
79
|
-
|
|
80
|
-
### 0.2.1
|
|
81
|
-
|
|
82
|
-
* (holomekc) Support for additional services
|
|
83
|
-
|
|
84
|
-
### 0.1.20
|
|
85
|
-
|
|
86
|
-
* (holomekc) Fixed problems with openDoorsAndWindows
|
|
87
|
-
|
|
88
|
-
### 0.1.19
|
|
89
|
-
|
|
90
|
-
* (holomekc) problems with initial setup fixed
|
|
91
|
-
|
|
92
|
-
### 0.1.18
|
|
93
|
-
|
|
94
|
-
* (holomekc) rateLimit added so that not too many request are executed against controller
|
|
95
|
-
|
|
96
|
-
### 0.1.17
|
|
97
|
-
|
|
98
|
-
* (holomekc) add yale values for door lock
|
|
99
|
-
* (holomekc) update states on startup
|
|
100
|
-
|
|
101
|
-
### 0.1.16
|
|
102
|
-
|
|
103
|
-
* (holomekc) when scenarioTriggered received the adapter will shortly update the scenario state to true and after 1s
|
|
104
|
-
back to false. This allows to directly listen to triggered scenarios even when not triggered from iobroker.
|
|
105
|
-
Behavior if triggered from iobroker:
|
|
106
|
-
- state: true, ack: false
|
|
107
|
-
- state: true, ack: true
|
|
108
|
-
- state: false, ack: true
|
|
109
|
-
|
|
110
|
-
Behavior if triggered from somewhere else:
|
|
111
|
-
- state: true, ack: true
|
|
112
|
-
- state: false, ack: true
|
|
113
|
-
* (holomekc) all updates received from controller are send to a new iobroker state "updates". This provides more
|
|
114
|
-
flexibility and allow more complex logics. Each update is handled one by one even when a list of multiple update from
|
|
115
|
-
controller received.
|
|
116
|
-
|
|
117
|
-
### 0.1.15
|
|
118
|
-
|
|
119
|
-
* (holomekc) Restore cache also possible without controller connection to internet. Device services endpoint fails in
|
|
120
|
-
this case. These failures during detection are ignored now with a warning that e.g. detection of new devices is not
|
|
121
|
-
possible in this case. Nevertheless, controlling Bosch devices will still work.
|
|
122
|
-
* (holomekc) Fix tests and add "simple" integration test
|
|
123
|
-
* (holomekc) Update structure of project
|
|
124
|
-
* (holomekc) Code formatting
|
|
125
|
-
|
|
126
|
-
### 0.1.14
|
|
127
|
-
|
|
128
|
-
* (holomekc) RoomControlMode types added.
|
|
129
|
-
* (holomekc) Update for js-controller 3.x.x. This serializes objects and arrays. Please check your logics.
|
|
130
|
-
|
|
131
|
-
### 0.1.13
|
|
132
|
-
|
|
133
|
-
* (holomekc) update to api-version 2.1
|
|
134
|
-
* (holomekc) add intrusionDetectionControl folder which contains trigger for alarm system
|
|
135
|
-
|
|
136
|
-
### 0.1.12
|
|
137
|
-
|
|
138
|
-
* (holomekc) states and units
|
|
139
|
-
* (holomekc) update license and copyright
|
|
140
|
-
* (holomekc) fix typo in connectionType
|
|
141
|
-
|
|
142
|
-
### 0.1.11
|
|
143
|
-
|
|
144
|
-
* (holomekc) update dependencies
|
|
145
|
-
* (holomekc) changes due to new ioBroker lib
|
|
146
|
-
* (holomekc) add connection indicator
|
|
147
|
-
* (holomekc) increase delay for timeout for longpolling to 2s
|
|
148
|
-
* (holomekc) low not set as lowbat role in ioBroker anymore
|
|
149
|
-
|
|
150
|
-
### 0.1.10
|
|
151
|
-
|
|
152
|
-
* (holomekc) Add .npmignore to cleanup installation files
|
|
153
|
-
|
|
154
|
-
### 0.1.9
|
|
155
|
-
|
|
156
|
-
* (holomekc) Error in scenario handling fixed
|
|
157
|
-
|
|
158
|
-
### 0.1.8
|
|
159
|
-
|
|
160
|
-
* (holomekc) Minor improvements
|
|
161
|
-
|
|
162
|
-
### 0.1.7
|
|
163
|
-
|
|
164
|
-
* (holomekc) Improved error handling
|
|
165
|
-
|
|
166
|
-
### 0.1.6
|
|
167
|
-
|
|
168
|
-
* (holomekc) Added open doors and windows feature
|
|
169
|
-
|
|
170
|
-
### 0.1.5
|
|
171
|
-
|
|
172
|
-
* (holomekc) functions and rooms are only added for new channels
|
|
173
|
-
* (holomekc) increase timeout for requests which expect to contain more data
|
|
174
|
-
|
|
175
|
-
### 0.1.4
|
|
176
|
-
|
|
177
|
-
* (holomekc) issue fixed in loading configuration
|
|
178
|
-
* (holomekc) minor restructuring
|
|
179
|
-
|
|
180
|
-
### 0.1.3
|
|
181
|
-
|
|
182
|
-
* (holomekc) restructure of handling device detection and updates iobroker <-> bshc via BshbHandler
|
|
183
|
-
* (holomekc) added handler for devices, scenarios and messages
|
|
184
|
-
* (holomekc) messages and scenarios are updated when adapter is running
|
|
185
|
-
|
|
186
|
-
### 0.1.2
|
|
187
|
-
|
|
188
|
-
* (holomekc) Adapter core library updated
|
|
189
|
-
|
|
190
|
-
### 0.1.1
|
|
191
|
-
|
|
192
|
-
* (holomekc) update to new bridge version
|
|
193
|
-
* (holomekc) allows adapter to reconnect in case bshc is restarting
|
|
194
|
-
* (holomekc) remove not needed configuration
|
|
195
|
-
* (holomekc) faults added to all service (channels)
|
|
196
|
-
* (holomekc) faults are always a list: [] = no faults, \[{source: {rootDeviceId: string, deviceServiceId: string,
|
|
197
|
-
deviceId: string}, type: string, category: INFO | WARNING | ERROR}, ...\] = faults
|
|
198
|
-
|
|
199
|
-
### 0.1.0
|
|
200
|
-
|
|
201
|
-
* (holomekc) certificate and private key are handled in ioBroker and can be content or file reference
|
|
202
|
-
* (holomekc) update to newer bridge version
|
|
203
|
-
|
|
204
|
-
### 0.0.14
|
|
205
|
-
|
|
206
|
-
* (holomekc) optimizations and cleanup
|
|
207
|
-
|
|
208
|
-
### 0.0.13
|
|
209
|
-
|
|
210
|
-
* (holomekc) added more definitions
|
|
211
|
-
* (holomekc) optimizations and cleanup
|
|
212
|
-
|
|
213
|
-
### 0.0.12
|
|
214
|
-
|
|
215
|
-
* (holomekc) scenario support. Scenarios are listed as group 'scenarios' and can only be triggered
|
|
216
|
-
* (holomekc) added definitions for Twinguard
|
|
217
|
-
|
|
218
|
-
### 0.0.11
|
|
219
|
-
|
|
220
|
-
* (holomekc) rooms and functions added for known channels
|
|
221
|
-
* (holomekc) trim whitespaces from configuration values
|
|
222
|
-
|
|
223
|
-
### 0.0.10
|
|
224
|
-
|
|
225
|
-
* (holomekc) try to improve configuration description in application itself
|
|
226
|
-
* (holomekc) change id so that it is valid regarding Bosch T&C
|
|
227
|
-
* (holomekc) update to newest bosch-smart-home-bridge version for same reason
|
|
228
|
-
|
|
229
|
-
### 0.0.9
|
|
230
|
-
|
|
231
|
-
* (holomekc) update travis.yml due to jscontroller requires node dependency >=8.0
|
|
232
|
-
|
|
233
|
-
### 0.0.8
|
|
234
|
-
|
|
235
|
-
* (holomekc) fix client name is: ioBroker.bshb
|
|
236
|
-
|
|
237
|
-
### 0.0.7
|
|
238
|
-
|
|
239
|
-
* (holomekc) make sure that bosch-smart-home-bridge version >= 0.0.4
|
|
240
|
-
|
|
241
|
-
### 0.0.6
|
|
242
|
-
|
|
243
|
-
* (holomekc) Just io-package.json changes
|
|
244
|
-
* (holomekc) cleanup
|
|
245
|
-
|
|
246
|
-
### 0.0.5
|
|
247
|
-
|
|
248
|
-
* (holomekc) Just do the steps adapter-check is telling me
|
|
249
|
-
* (holomekc) Therefore, build files are part of git repo. So install via Github should be possible now
|
|
250
|
-
|
|
251
|
-
### 0.0.4
|
|
252
|
-
|
|
253
|
-
* (holomekc) Long polling added to reduce load
|
|
254
|
-
* (holomekc) Set of state values is possible now
|
|
255
|
-
* (holomekc) Code cleanup
|
|
256
|
-
|
|
257
|
-
### < 0.0.4
|
|
71
|
+
### Older entries
|
|
258
72
|
|
|
259
|
-
|
|
260
|
-
* (holomekc) first attempts to creat ioBroker objects, states, etc.
|
|
73
|
+
[here](CHANGELOG_OLD.md)
|
|
261
74
|
|
|
262
75
|
## License
|
|
263
76
|
|
|
264
77
|
The MIT License (MIT)
|
|
265
78
|
|
|
266
|
-
Copyright (c)
|
|
79
|
+
Copyright (c) 2025 Christopher Holomek <holomekc.github@gmail.com>
|
|
80
|
+
|
|
81
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
82
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
83
|
+
in the Software without restriction, including without limitation the rights
|
|
84
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
85
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
86
|
+
furnished to do so, subject to the following conditions:
|
|
87
|
+
|
|
88
|
+
The above copyright notice and this permission notice shall be included in
|
|
89
|
+
all copies or substantial portions of the Software.
|
|
90
|
+
|
|
91
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
92
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
93
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
94
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
95
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
96
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
97
|
+
THE SOFTWARE.
|
package/build/bshb-controller.js
CHANGED
|
@@ -31,7 +31,7 @@ const bshb_backup_handler_1 = require("./controller/handler/bshb-backup-handler"
|
|
|
31
31
|
class BshbController {
|
|
32
32
|
bshb;
|
|
33
33
|
boschSmartHomeBridge;
|
|
34
|
-
clientName =
|
|
34
|
+
clientName = "ioBroker.bshb";
|
|
35
35
|
$rateLimit = new rxjs_1.Subject();
|
|
36
36
|
alive = new rxjs_1.Subject();
|
|
37
37
|
handlers;
|
|
@@ -71,22 +71,24 @@ class BshbController {
|
|
|
71
71
|
this.handlers.push(new bshb_open_door_window_handler_1.BshbOpenDoorWindowHandler(this.bshb, this.boschSmartHomeBridge));
|
|
72
72
|
this.handlers.push(new bshb_climate_handler_1.BshbClimateHandler(this.bshb, this.boschSmartHomeBridge));
|
|
73
73
|
this.handlers.push(new bshb_backup_handler_1.BshbBackupHandler(this.bshb, this.boschSmartHomeBridge));
|
|
74
|
-
this.$rateLimit
|
|
74
|
+
this.$rateLimit
|
|
75
|
+
.pipe((0, rate_limiter_1.rateLimit)(this.bshb.config.rateLimit, this.bshb), (0, rxjs_1.concatMap)((data) => {
|
|
75
76
|
const observables = [];
|
|
76
77
|
for (let i = 0; i < this.handlers.length; i++) {
|
|
77
78
|
observables.push(this.handlers[i].sendUpdateToBshc(data.id, data.state).pipe(
|
|
78
79
|
// Protect controller
|
|
79
|
-
(0, operators_1.catchError)(err => {
|
|
80
|
+
(0, operators_1.catchError)((err) => {
|
|
80
81
|
this.bshb.log.silly(`Handler "${this.handlers[i].constructor.name}" failed with ${err}. This might happen when the controller answers with an error.`);
|
|
81
82
|
return (0, rxjs_1.of)(true);
|
|
82
|
-
}), (0, operators_1.tap)(handled => {
|
|
83
|
+
}), (0, operators_1.tap)((handled) => {
|
|
83
84
|
if (handled) {
|
|
84
85
|
this.bshb.log.silly(`Handler "${this.handlers[i].constructor.name}" send message to controller with state id=${data.id} and value=${data.state.val}`);
|
|
85
86
|
}
|
|
86
87
|
})));
|
|
87
88
|
}
|
|
88
89
|
return (0, rxjs_1.merge)(...observables);
|
|
89
|
-
}), (0, operators_1.takeUntil)(this.alive))
|
|
90
|
+
}), (0, operators_1.takeUntil)(this.alive))
|
|
91
|
+
.subscribe();
|
|
90
92
|
}
|
|
91
93
|
catch (e) {
|
|
92
94
|
if (e instanceof Error) {
|
|
@@ -117,25 +119,33 @@ class BshbController {
|
|
|
117
119
|
// Here we retry the pairIfNeeded without attempts configured. So we try once. If something is not ok we wait
|
|
118
120
|
// for pairing delay before we try again. We use takeUntil to make sure that we stop streams if adapter shuts-down
|
|
119
121
|
// takeUntil must be last in pipe to prevent issues.
|
|
120
|
-
return new rxjs_1.Observable(subscriber => {
|
|
122
|
+
return new rxjs_1.Observable((subscriber) => {
|
|
121
123
|
const retry = new rxjs_1.BehaviorSubject(true);
|
|
122
|
-
retry
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
retry
|
|
125
|
+
.pipe((0, operators_1.catchError)((err) => err.pipe((0, operators_1.delay)(pairingDelay))), (0, operators_1.tap)(() => {
|
|
126
|
+
this.boschSmartHomeBridge
|
|
127
|
+
.pairIfNeeded(this.clientName, this.bshb.config.identifier, systemPassword, pairingDelay, -1)
|
|
128
|
+
.pipe((0, operators_1.takeUntil)(this.bshb.alive))
|
|
129
|
+
.subscribe({
|
|
130
|
+
next: (response) => {
|
|
125
131
|
// Everything is ok. We can stop all.
|
|
126
|
-
this.bshb.log.info(
|
|
132
|
+
this.bshb.log.info("Ok with pairing");
|
|
127
133
|
subscriber.next(response);
|
|
128
134
|
subscriber.complete();
|
|
129
135
|
retry.complete();
|
|
130
|
-
},
|
|
136
|
+
},
|
|
137
|
+
error: (err) => {
|
|
131
138
|
this.bshb.log.error(err);
|
|
132
139
|
// Something went wrong. Already logged by lib. We just wait and retry.
|
|
133
|
-
(0, rxjs_1.timer)(pairingDelay)
|
|
140
|
+
(0, rxjs_1.timer)(pairingDelay)
|
|
141
|
+
.pipe((0, operators_1.takeUntil)(this.bshb.alive))
|
|
142
|
+
.subscribe(() => {
|
|
134
143
|
retry.next(true);
|
|
135
144
|
});
|
|
136
|
-
}
|
|
145
|
+
},
|
|
137
146
|
});
|
|
138
|
-
}), (0, operators_1.takeUntil)(this.bshb.alive))
|
|
147
|
+
}), (0, operators_1.takeUntil)(this.bshb.alive))
|
|
148
|
+
.subscribe(() => {
|
|
139
149
|
// We do not care
|
|
140
150
|
});
|
|
141
151
|
});
|
|
@@ -146,8 +156,8 @@ class BshbController {
|
|
|
146
156
|
* @return observable with no content
|
|
147
157
|
*/
|
|
148
158
|
startDetection() {
|
|
149
|
-
this.bshb.log.info(
|
|
150
|
-
return (0, rxjs_1.concat)(...this.handlers.map(value => value.handleDetection())).pipe((0, rxjs_1.last)(undefined, void 0));
|
|
159
|
+
this.bshb.log.info("Start detection");
|
|
160
|
+
return (0, rxjs_1.concat)(...this.handlers.map((value) => value.handleDetection())).pipe((0, rxjs_1.last)(undefined, void 0));
|
|
151
161
|
}
|
|
152
162
|
/**
|
|
153
163
|
* Changes on a state which results in a call to bshc controller
|
|
@@ -168,7 +178,7 @@ class BshbController {
|
|
|
168
178
|
*/
|
|
169
179
|
setStateAck(resultEntry) {
|
|
170
180
|
for (let i = 0; i < this.handlers.length; i++) {
|
|
171
|
-
|
|
181
|
+
const handled = this.handlers[i].handleBshcUpdate(resultEntry);
|
|
172
182
|
if (handled) {
|
|
173
183
|
this.bshb.log.silly(`Handler "${this.handlers[i].constructor.name}" handled update form controller with result entry: ${JSON.stringify(resultEntry)} `);
|
|
174
184
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bshb-controller.js","sourceRoot":"","sources":["../src/bshb-controller.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"bshb-controller.js","sourceRoot":"","sources":["../src/bshb-controller.ts"],"names":[],"mappings":";;;AAAA,qEAGiC;AAEjC,+CAA2C;AAC3C,+BAUc;AACd,8CAAmE;AACnE,mCAAgC;AAEhC,sFAAiF;AACjF,kFAA6E;AAC7E,sFAAiF;AACjF,sGAA+F;AAC/F,4GAAsG;AACtG,kGAA4F;AAC5F,4GAAqG;AACrG,gGAA0F;AAC1F,4FAAsF;AACtF,8EAAyE;AACzE,8GAAuG;AACvG,oFAA+E;AAC/E,4GAAqG;AACrG,iDAA2C;AAC3C,0FAAqF;AACrF,kFAA6E;AAE7E;;;;;GAKG;AACH,MAAa,cAAc;IAoBf;IAnBO,oBAAoB,CAAuB;IACpD,UAAU,GAAG,eAAe,CAAC;IAE7B,UAAU,GAAG,IAAI,cAAO,EAAyC,CAAC;IACnE,KAAK,GAAG,IAAI,cAAO,EAAW,CAAC;IAE9B,QAAQ,CAAgB;IAEhC;;;;;;;;;OASG;IACH,YACU,IAAU,EAClB,UAAkB,EAClB,gBAAwB;QAFhB,SAAI,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AAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACI,WAAW,CAAC,WAAgB;QACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;YAC/D,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CACjB,YAAY,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,uDAAuD,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CACnI,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;CACF;AArOD,wCAqOC"}
|
package/build/bshb-definition.js
CHANGED
|
@@ -15,7 +15,7 @@ const write_1 = require("./definition/write");
|
|
|
15
15
|
class BshbDefinition {
|
|
16
16
|
static determineFunction(value) {
|
|
17
17
|
const func = function_1.FUNCTIONS[value];
|
|
18
|
-
if (func !== null && typeof func !==
|
|
18
|
+
if (func !== null && typeof func !== "undefined") {
|
|
19
19
|
return func;
|
|
20
20
|
}
|
|
21
21
|
return undefined;
|
|
@@ -30,9 +30,9 @@ class BshbDefinition {
|
|
|
30
30
|
*/
|
|
31
31
|
static determineWrite(type, key) {
|
|
32
32
|
const writeType = write_1.WRITE[type];
|
|
33
|
-
if (writeType !== null && typeof writeType !==
|
|
33
|
+
if (writeType !== null && typeof writeType !== "undefined") {
|
|
34
34
|
const write = writeType[key];
|
|
35
|
-
if (write !== null && typeof write !==
|
|
35
|
+
if (write !== null && typeof write !== "undefined") {
|
|
36
36
|
return write;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -45,9 +45,9 @@ class BshbDefinition {
|
|
|
45
45
|
*/
|
|
46
46
|
static determineType(value) {
|
|
47
47
|
if (Array.isArray(value)) {
|
|
48
|
-
return
|
|
48
|
+
return "array";
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return typeof value;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Get role of bsh device state
|
|
@@ -60,26 +60,26 @@ class BshbDefinition {
|
|
|
60
60
|
*/
|
|
61
61
|
static determineRole(type, key, value) {
|
|
62
62
|
// faults are always a list. Does not matter which service.
|
|
63
|
-
if (key ===
|
|
64
|
-
return
|
|
63
|
+
if (key === "faults") {
|
|
64
|
+
return "list";
|
|
65
65
|
}
|
|
66
66
|
const roleType = roles_1.ROLES[type];
|
|
67
|
-
if (roleType !== null && typeof roleType !==
|
|
67
|
+
if (roleType !== null && typeof roleType !== "undefined") {
|
|
68
68
|
const role = roleType[key];
|
|
69
|
-
if (role !== null && typeof role !==
|
|
69
|
+
if (role !== null && typeof role !== "undefined") {
|
|
70
70
|
return role;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
if (Array.isArray(value)) {
|
|
74
|
-
return
|
|
74
|
+
return "list";
|
|
75
75
|
}
|
|
76
|
-
return
|
|
76
|
+
return "state";
|
|
77
77
|
}
|
|
78
78
|
static determineUnit(type, key) {
|
|
79
79
|
const unitType = units_1.UNITS[type];
|
|
80
|
-
if (unitType !== null && typeof unitType !==
|
|
80
|
+
if (unitType !== null && typeof unitType !== "undefined") {
|
|
81
81
|
const unit = unitType[key];
|
|
82
|
-
if (unit !== null && typeof unit !==
|
|
82
|
+
if (unit !== null && typeof unit !== "undefined") {
|
|
83
83
|
return unit;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -87,9 +87,9 @@ class BshbDefinition {
|
|
|
87
87
|
}
|
|
88
88
|
static determineStates(type, key) {
|
|
89
89
|
const stateType = states_1.STATES[type];
|
|
90
|
-
if (stateType !== null && typeof stateType !==
|
|
90
|
+
if (stateType !== null && typeof stateType !== "undefined") {
|
|
91
91
|
const state = stateType[key];
|
|
92
|
-
if (state !== null && typeof state !==
|
|
92
|
+
if (state !== null && typeof state !== "undefined") {
|
|
93
93
|
return state;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bshb-definition.js","sourceRoot":"","sources":["../src/bshb-definition.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"bshb-definition.js","sourceRoot":"","sources":["../src/bshb-definition.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,8CAA2C;AAC3C,oDAAkD;AAClD,8CAA2C;AAC3C,gDAA6C;AAC7C,8CAA2C;AAE3C,MAAa,cAAc;IAClB,MAAM,CAAC,iBAAiB,CAAC,KAAa;QAC3C,MAAM,IAAI,GAAG,oBAAS,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;YACjD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,SAA8B,CAAC;IACxC,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,cAAc,CAAC,IAAY,EAAE,GAAW;QACpD,MAAM,SAAS,GAAG,aAAK,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE,CAAC;YAC3D,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;YAE7B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;gBACnD,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAED,OAAO,IAAI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IAAS,EACT,GAAW;QAEX,MAAM,SAAS,GAAG,eAAM,CAAC,IAAI,CAAC,CAAC;QAE/B,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE,CAAC;YAC3D,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;YAE7B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;gBACnD,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAjHD,wCAiHC"}
|
package/build/bshb-logger.js
CHANGED
|
@@ -13,32 +13,32 @@ class BshbLogger {
|
|
|
13
13
|
this.adapter = adapter;
|
|
14
14
|
}
|
|
15
15
|
fine(message, ...optionalParams) {
|
|
16
|
-
this.log(
|
|
16
|
+
this.log("silly", message, optionalParams);
|
|
17
17
|
}
|
|
18
18
|
debug(message, ...optionalParams) {
|
|
19
|
-
this.log(
|
|
19
|
+
this.log("debug", message, optionalParams);
|
|
20
20
|
}
|
|
21
21
|
info(message, ...optionalParams) {
|
|
22
|
-
this.log(
|
|
22
|
+
this.log("info", message, optionalParams);
|
|
23
23
|
}
|
|
24
24
|
error(message, ...optionalParams) {
|
|
25
25
|
// debug may look strange here, but we do not care about the logs of errors during http calls because we handle
|
|
26
26
|
// them in the adapter. Errors would only confuse users.
|
|
27
|
-
this.log(
|
|
27
|
+
this.log("debug", message, optionalParams);
|
|
28
28
|
}
|
|
29
29
|
warn(message, ...optionalParams) {
|
|
30
|
-
this.log(
|
|
30
|
+
this.log("warn", message, optionalParams);
|
|
31
31
|
}
|
|
32
32
|
log(msgType, message, ...optionalParams) {
|
|
33
33
|
if (message) {
|
|
34
34
|
if (optionalParams[0].length > 0) {
|
|
35
35
|
let concatMessage = message;
|
|
36
|
-
optionalParams.forEach(value => {
|
|
37
|
-
if (typeof value ===
|
|
38
|
-
concatMessage +=
|
|
36
|
+
optionalParams.forEach((value) => {
|
|
37
|
+
if (typeof value === "object") {
|
|
38
|
+
concatMessage += " - " + JSON.stringify(value);
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
concatMessage +=
|
|
41
|
+
concatMessage += " - " + value;
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
this.adapter.log[msgType](concatMessage);
|
|
@@ -49,19 +49,19 @@ class BshbLogger {
|
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
51
|
if (optionalParams[0].length > 0) {
|
|
52
|
-
let concatMessage =
|
|
53
|
-
optionalParams.forEach(value => {
|
|
54
|
-
if (typeof value ===
|
|
55
|
-
concatMessage +=
|
|
52
|
+
let concatMessage = "";
|
|
53
|
+
optionalParams.forEach((value) => {
|
|
54
|
+
if (typeof value === "object") {
|
|
55
|
+
concatMessage += " - " + JSON.stringify(value);
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
|
-
concatMessage +=
|
|
58
|
+
concatMessage += " - " + value;
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
this.adapter.log[msgType](concatMessage);
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
|
-
this.adapter.log[msgType](
|
|
64
|
+
this.adapter.log[msgType]("");
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
package/build/bshb-logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bshb-logger.js","sourceRoot":"","sources":["../src/bshb-logger.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,MAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"bshb-logger.js","sourceRoot":"","sources":["../src/bshb-logger.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,MAAa,UAAU;IACD;IAApB,YAAoB,OAAa;QAAb,YAAO,GAAP,OAAO,CAAM;IAAG,CAAC;IAErC,IAAI,CAAC,OAAa,EAAE,GAAG,cAAqB;QAC1C,IAAI,CAAC,GAAG,CAAC,OAAO,EA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,CAAC,OAAO,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACjC,IAAI,aAAa,GAAG,EAAE,CAAC;gBACvB,cAAc,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;oBAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;wBAC9B,aAAa,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;oBACjD,CAAC;yBAAM,CAAC;wBACN,aAAa,IAAI,KAAK,GAAG,KAAK,CAAC;oBACjC,CAAC;gBACH,CAAC,CAAC,CAAC;gBACH,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA5DD,gCA4DC"}
|
package/build/client-cert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-cert.js","sourceRoot":"","sources":["../src/client-cert.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,MAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"client-cert.js","sourceRoot":"","sources":["../src/client-cert.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,MAAa,UAAU;IACJ,YAAY,CAAS;IACrB,WAAW,CAAS;IAErC,YAAY,WAAmB,EAAE,UAAkB;QACjD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF;AAtBD,gCAsBC"}
|