iobroker-ucl 1.1.9 → 1.1.11

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.
@@ -5,7 +5,7 @@
5
5
  // ===================================================================================================
6
6
 
7
7
  // 1.) "Aus TS Dateien JS Dateien machen: (unten im TERMINAL-Fenster)
8
- tsc date.ts test.ts main.ts html.ts homematicClasses.ts homematicFunctions.ts zigbeeClasses.ts zigbeeFunctions.ts camera.ts alexa.ts
8
+ tsc date.ts test.ts main.ts html.ts homematicClasses.ts homematicFunctions.ts zigbeeClasses.ts zigbeeFunctions.ts camera.ts alexa.ts shellyClasses.ts shellyFunctions.ts
9
9
 
10
10
  // 2.) In package.json eine Nummer hochzählen bei der Version
11
11
 
@@ -16,8 +16,12 @@ npm publish
16
16
  docker exec -it iobroker bash
17
17
 
18
18
  // 5.) Im Docker iobroker container drin das NPM module aktualisieren: (PUTTY)
19
- npm update iobroker-ucl
19
+ npm update iobroker-ucl (initial installieren mit: npm install iobroker-ucl)
20
20
  npm ls --depth=0 (um sicher zu gehen, dass richtige Version auch gezogen wurde)
21
21
  npm uninstall iobroker-ucl Danach: npm install iobroker-ucl (Manchmal wird in iobroekr die Version incht gezogen warum auch immer)
22
22
 
23
- // 6.) In iobroker Weboberfläche die Javascript Instance restarten
23
+ // 6.) In iobroker Weboberfläche die Javascript Instance restarten
24
+
25
+
26
+ // TODO: Auto TS:
27
+ https://www.youtube.com/watch?v=PDhQQCI4PJE
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  };
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.HomematicWandschalter = exports.HomematicFussbodenheizung = exports.HomematicDoor = exports.HomematicRollladen = exports.HomematicAccessPoint = exports.HomematicWandtaster = exports.HomematicTemperatursensor = exports.HomematicRauchmelder = exports.HomematicFunkschaltaktor = exports.HomematicDimmer = exports.HomematicHeizkoerper = exports.HomematicSteckdose = exports.HomematicWindow = exports.HomematicWetterstation = exports.HomematicPraesenzmelder = exports.HomematicWandthermostat = exports.AbstractHomematic = void 0;
18
+ exports.HomematicFussbodenheizung = exports.HomematicDoor = exports.HomematicRollladen = exports.HomematicAccessPoint = exports.HomematicWandschalter = exports.HomematicTemperatursensor = exports.HomematicRauchmelder = exports.HomematicFunkschaltaktor = exports.HomematicDimmer = exports.DimmerTasterScheme = exports.DimmerAlexaScheme = exports.HomematicHeizkoerper = exports.HomematicSteckdose = exports.HomematicWindow = exports.HomematicWetterstation = exports.HomematicPraesenzmelder = exports.HomematicWandthermostat = exports.HomematicWandtaster = exports.AbstractHomematic = void 0;
19
19
  var deviceHomematicWandthermostat = "Wandthermostat";
20
20
  var deviceHomematicPraesenzmelder = "Praesenzmelder";
21
21
  var deviceHomematicWetterstation = "Wetterstation";
@@ -80,9 +80,123 @@ var AbstractHomematic = /** @class */ (function () {
80
80
  AbstractHomematic.prototype.getSignal = function () {
81
81
  return this.adapter.getState(this.baseState + ".0.RSSI_DEVICE").val;
82
82
  };
83
+ AbstractHomematic.prototype.createIOTAdapterSmartDevices = function (smartName) {
84
+ // Level:
85
+ // ----------------------------------------------------------------------------------
86
+ var alexaLampeLevel = "0_userdata.0.alexa." + smartName + ".level";
87
+ this.adapter.createState(alexaLampeLevel, 0, {
88
+ name: alexaLampeLevel,
89
+ desc: alexaLampeLevel,
90
+ type: 'number',
91
+ read: true,
92
+ write: true
93
+ });
94
+ // @ts-ignore
95
+ var objLevel = this.adapter.getObject(alexaLampeLevel);
96
+ objLevel.common = {
97
+ "type": "number",
98
+ "name": alexaLampeLevel,
99
+ "read": true,
100
+ "write": true,
101
+ "role": "level.dimmer",
102
+ "min": 0,
103
+ "max": 100,
104
+ "def": 0,
105
+ "smartName": {
106
+ "de": smartName,
107
+ "smartType": "LIGHT"
108
+ }
109
+ };
110
+ this.adapter.setObject(alexaLampeLevel, objLevel);
111
+ // HUE:
112
+ // ----------------------------------------------------------------------------------
113
+ var alexaLampeHue = "0_userdata.0.alexa." + smartName + ".hue";
114
+ this.adapter.createState(alexaLampeHue, 0, {
115
+ name: alexaLampeHue,
116
+ desc: alexaLampeHue,
117
+ type: 'number',
118
+ read: true,
119
+ write: true
120
+ });
121
+ // @ts-ignore
122
+ var objHue = this.adapter.getObject(alexaLampeHue);
123
+ objHue.common = {
124
+ "name": alexaLampeHue,
125
+ "desc": alexaLampeHue,
126
+ "type": "number",
127
+ "read": true,
128
+ "write": true,
129
+ "role": "level.color.hue",
130
+ "smartName": {
131
+ "de": smartName,
132
+ "smartType": "LIGHT"
133
+ }
134
+ };
135
+ this.adapter.setObject(alexaLampeHue, objHue);
136
+ // SAT:
137
+ // ----------------------------------------------------------------------------------
138
+ var alexaLampeSat = "0_userdata.0.alexa." + smartName + ".sat";
139
+ this.adapter.createState(alexaLampeSat, 0, {
140
+ name: alexaLampeSat,
141
+ desc: alexaLampeSat,
142
+ type: 'number',
143
+ read: true,
144
+ write: true
145
+ });
146
+ // @ts-ignore
147
+ var obSat = this.adapter.getObject(alexaLampeSat);
148
+ obSat.common = {
149
+ "name": alexaLampeSat,
150
+ "desc": alexaLampeSat,
151
+ "type": "number",
152
+ "read": true,
153
+ "write": true,
154
+ "role": "level.color.saturation",
155
+ "smartName": {
156
+ "de": smartName,
157
+ "smartType": "LIGHT"
158
+ }
159
+ };
160
+ this.adapter.setObject(alexaLampeSat, obSat);
161
+ // CT:
162
+ // ----------------------------------------------------------------------------------
163
+ var alexaLampeCT = "0_userdata.0.alexa." + smartName + ".ct";
164
+ this.adapter.createState(alexaLampeCT, 0, {
165
+ name: alexaLampeCT,
166
+ desc: alexaLampeCT,
167
+ type: 'number',
168
+ read: true,
169
+ write: true
170
+ });
171
+ // @ts-ignore
172
+ var objCT = this.adapter.getObject(alexaLampeCT);
173
+ objCT.common = {
174
+ "type": "number",
175
+ "name": alexaLampeCT,
176
+ "read": true,
177
+ "write": true,
178
+ "role": "level.color.temperature",
179
+ "smartName": {
180
+ "de": smartName,
181
+ "smartType": "LIGHT"
182
+ }
183
+ };
184
+ this.adapter.setObject(alexaLampeCT, objCT);
185
+ };
83
186
  return AbstractHomematic;
84
187
  }());
85
188
  exports.AbstractHomematic = AbstractHomematic;
189
+ var HomematicWandtaster = /** @class */ (function (_super) {
190
+ __extends(HomematicWandtaster, _super);
191
+ function HomematicWandtaster(adapter, id, baseState, etage, raum, device) {
192
+ return _super.call(this, adapter, id, baseState, etage, raum, device) || this;
193
+ }
194
+ HomematicWandtaster.prototype.getCategory = function () {
195
+ return deviceHomematicWandtaster;
196
+ };
197
+ return HomematicWandtaster;
198
+ }(AbstractHomematic));
199
+ exports.HomematicWandtaster = HomematicWandtaster;
86
200
  var HomematicWandthermostat = /** @class */ (function (_super) {
87
201
  __extends(HomematicWandthermostat, _super);
88
202
  function HomematicWandthermostat(adapter, id, baseState, etage, raum, device) {
@@ -151,6 +265,12 @@ var HomematicWindow = /** @class */ (function (_super) {
151
265
  HomematicWindow.prototype.isStatusBattery = function () {
152
266
  return !this.adapter.getState(this.baseState + ".0.LOW_BAT").val; // // hm-rpc.0.000A9BE993E2F7.0.LOW_BAT
153
267
  };
268
+ HomematicWindow.prototype.isOpen = function () {
269
+ if (this.adapter.getState(this.baseState + ".1.STATE").val == 0) {
270
+ return false;
271
+ }
272
+ return true;
273
+ };
154
274
  return HomematicWindow;
155
275
  }(AbstractHomematic));
156
276
  exports.HomematicWindow = HomematicWindow;
@@ -162,6 +282,12 @@ var HomematicSteckdose = /** @class */ (function (_super) {
162
282
  HomematicSteckdose.prototype.getCategory = function () {
163
283
  return deviceHomematicSteckdose;
164
284
  };
285
+ HomematicSteckdose.prototype.isSwitchedOn = function () {
286
+ if (this.adapter.getState(this.baseState + ".3.STATE").val == false) { // hm-rpc.1.00021D8999C78B.3.STATE
287
+ return false;
288
+ }
289
+ return true;
290
+ };
165
291
  return HomematicSteckdose;
166
292
  }(AbstractHomematic));
167
293
  exports.HomematicSteckdose = HomematicSteckdose;
@@ -173,20 +299,227 @@ var HomematicHeizkoerper = /** @class */ (function (_super) {
173
299
  HomematicHeizkoerper.prototype.getCategory = function () {
174
300
  return deviceHomematicHeizkoerper;
175
301
  };
302
+ HomematicHeizkoerper.prototype.getTemperatureIst = function () {
303
+ return this.adapter.getState(this.baseState + ".1.ACTUAL_TEMPERATURE").val; // hm-rpc.0.000A9BE9A03005.1.ACTUAL_TEMPERATURE
304
+ };
305
+ HomematicHeizkoerper.prototype.getTemperatureSoll = function () {
306
+ return this.adapter.getState(this.baseState + ".1.SET_POINT_TEMPERATURE").val; // hm-rpc.0.000A9BE9A03005.1.SET_POINT_TEMPERATURE
307
+ };
176
308
  HomematicHeizkoerper.prototype.isStatusBattery = function () {
177
309
  return !this.adapter.getState(this.baseState + ".0.LOW_BAT").val; // // hm-rpc.0.000A9BE993E2F7.0.LOW_BAT
178
310
  };
179
311
  return HomematicHeizkoerper;
180
312
  }(AbstractHomematic));
181
313
  exports.HomematicHeizkoerper = HomematicHeizkoerper;
314
+ var DimmerAlexaScheme = /** @class */ (function () {
315
+ function DimmerAlexaScheme(alexaName, level) {
316
+ this.alexaName = alexaName;
317
+ this.level = level;
318
+ }
319
+ DimmerAlexaScheme.prototype.getAlexaName = function () {
320
+ return this.alexaName;
321
+ };
322
+ DimmerAlexaScheme.prototype.getLevel = function () {
323
+ return this.level;
324
+ };
325
+ DimmerAlexaScheme.prototype.setDevice = function (device) {
326
+ this.device = device;
327
+ };
328
+ DimmerAlexaScheme.prototype.getDevice = function () {
329
+ return this.device;
330
+ };
331
+ return DimmerAlexaScheme;
332
+ }());
333
+ exports.DimmerAlexaScheme = DimmerAlexaScheme;
334
+ var DimmerTasterScheme = /** @class */ (function () {
335
+ function DimmerTasterScheme(tasterBooleanOn, level) {
336
+ this.tasterBooleanOn = tasterBooleanOn;
337
+ this.level = level;
338
+ }
339
+ DimmerTasterScheme.prototype.getTasterBooleanOnName = function () {
340
+ return this.tasterBooleanOn;
341
+ };
342
+ DimmerTasterScheme.prototype.getLevel = function () {
343
+ return this.level;
344
+ };
345
+ return DimmerTasterScheme;
346
+ }());
347
+ exports.DimmerTasterScheme = DimmerTasterScheme;
182
348
  var HomematicDimmer = /** @class */ (function (_super) {
183
349
  __extends(HomematicDimmer, _super);
184
- function HomematicDimmer(adapter, id, baseState, etage, raum, device) {
185
- return _super.call(this, adapter, id, baseState, etage, raum, device) || this;
350
+ function HomematicDimmer(adapter, id, baseState, etage, raum, device, alexaSmartNamesForOn, alexaActionNamesForOn, alexaLevelSchemeForOn, alexaSmartNamesForOff, alexaActionNamesForOff, levelSchemes, tasterBooleanOn, tasterBooleanOff, nachtbeleuchtung, turnOffExitHouseSummer, turnOffExitHouseWinter, turnOnEnterHouseSummer, turnOnEnterHouseWinter) {
351
+ var _this = _super.call(this, adapter, id, baseState, etage, raum, device) || this;
352
+ _this.alexaLevelSchemeForOn = alexaLevelSchemeForOn;
353
+ _this.levelSchemes = levelSchemes;
354
+ _this.tasterBooleanOn = tasterBooleanOn;
355
+ _this.tasterBooleanOff = tasterBooleanOff;
356
+ _this.alexaSmartNamesForOn = alexaSmartNamesForOn;
357
+ _this.alexaSmartNamesForOff = alexaSmartNamesForOff;
358
+ _this.alexaActionNamesForOn = alexaActionNamesForOn;
359
+ _this.alexaActionNamesForOff = alexaActionNamesForOff;
360
+ _this.nachtbeleuchtung = nachtbeleuchtung;
361
+ _this.turnOffExitHouseSummer = turnOffExitHouseSummer;
362
+ _this.turnOffExitHouseWinter = turnOffExitHouseWinter;
363
+ _this.turnOnEnterHouseSummer = turnOnEnterHouseSummer;
364
+ _this.turnOnEnterHouseWinter = turnOnEnterHouseWinter;
365
+ _this.levelSchemes.forEach(function (colorscheme) {
366
+ colorscheme.setDevice(_this);
367
+ if (colorscheme.getAlexaName() != null) {
368
+ _this.createState(colorscheme.getAlexaName());
369
+ }
370
+ });
371
+ if (_this.alexaLevelSchemeForOn != null) {
372
+ _this.alexaLevelSchemeForOn.setDevice(_this);
373
+ if (alexaLevelSchemeForOn.getAlexaName() != null) {
374
+ _this.createState(alexaLevelSchemeForOn.getAlexaName());
375
+ }
376
+ }
377
+ _this.tasterBooleanOn.forEach(function (tasterScheme) {
378
+ if (tasterScheme.getTasterBooleanOnName() != null) {
379
+ _this.createState(tasterScheme.getTasterBooleanOnName());
380
+ }
381
+ });
382
+ _this.tasterBooleanOff.forEach(function (offName) {
383
+ _this.createState(offName);
384
+ });
385
+ _this.alexaSmartNamesForOn.forEach(function (alexaSmartName) {
386
+ _this.createIOTAdapterSmartDevices(alexaSmartName);
387
+ });
388
+ _this.alexaSmartNamesForOff.forEach(function (alexaSmartName) {
389
+ _this.createIOTAdapterSmartDevices(alexaSmartName);
390
+ });
391
+ _this.alexaActionNamesForOn.forEach(function (alexaSmartName) {
392
+ _this.createIOTAdapterSmartDevices(alexaSmartName);
393
+ });
394
+ _this.alexaActionNamesForOff.forEach(function (alexaSmartName) {
395
+ _this.createIOTAdapterSmartDevices(alexaSmartName);
396
+ });
397
+ _this.levelSchemes.forEach(function (scheme) {
398
+ if (scheme.getAlexaName() != null) {
399
+ _this.createIOTAdapterSmartDevices(scheme.getAlexaName());
400
+ }
401
+ });
402
+ return _this;
186
403
  }
404
+ HomematicDimmer.prototype.isNachtbeleuchtung = function () {
405
+ return this.nachtbeleuchtung;
406
+ };
407
+ HomematicDimmer.prototype.isTurnOffExitHouseSummer = function () {
408
+ return this.turnOffExitHouseSummer;
409
+ };
410
+ HomematicDimmer.prototype.isTurnOffExitHouseWinter = function () {
411
+ return this.turnOffExitHouseWinter;
412
+ };
413
+ HomematicDimmer.prototype.isTurnOnEnterHouseSummer = function () {
414
+ return this.turnOnEnterHouseSummer;
415
+ };
416
+ HomematicDimmer.prototype.isTurnOnEnterHouseWinter = function () {
417
+ return this.turnOnEnterHouseWinter;
418
+ };
419
+ HomematicDimmer.prototype.createState = function (key_in) {
420
+ var key = key_in; //.replace(/\./g,'_'); // wegen Wohnzimmer T.V.
421
+ var jarvisDatenpunkt = key;
422
+ this.adapter.createState(jarvisDatenpunkt, false, {
423
+ name: key,
424
+ desc: key,
425
+ type: 'boolean',
426
+ read: true,
427
+ write: true
428
+ });
429
+ };
430
+ HomematicDimmer.prototype.getTasterBooleanOn = function () {
431
+ return this.tasterBooleanOn;
432
+ };
433
+ HomematicDimmer.prototype.getTasterBooleanOff = function () {
434
+ return this.tasterBooleanOff;
435
+ };
436
+ HomematicDimmer.prototype.getAlexaSchemeForOn = function () {
437
+ return this.alexaLevelSchemeForOn;
438
+ };
439
+ HomematicDimmer.prototype.getAlexaSmartNamesForOn = function () {
440
+ return this.alexaSmartNamesForOn;
441
+ };
442
+ HomematicDimmer.prototype.getAlexaSmartNamesForOff = function () {
443
+ return this.alexaSmartNamesForOff;
444
+ };
445
+ HomematicDimmer.prototype.getAlexaActionNamesForOn = function () {
446
+ return this.alexaActionNamesForOn;
447
+ };
448
+ HomematicDimmer.prototype.getAlexaActionNamesForOff = function () {
449
+ return this.alexaActionNamesForOff;
450
+ };
451
+ HomematicDimmer.prototype.getAlexaSchemes = function () {
452
+ return this.levelSchemes;
453
+ };
454
+ HomematicDimmer.prototype.getAlexaNamesForOnAsString = function () {
455
+ var result = "";
456
+ this.alexaSmartNamesForOn.forEach(function (alexaOnName) {
457
+ if (result == "") {
458
+ result += alexaOnName;
459
+ }
460
+ else {
461
+ result += ", " + alexaOnName;
462
+ }
463
+ });
464
+ this.alexaActionNamesForOn.forEach(function (alexaOnName) {
465
+ if (result == "") {
466
+ result += alexaOnName;
467
+ }
468
+ else {
469
+ result += ", " + alexaOnName;
470
+ }
471
+ });
472
+ return result;
473
+ };
474
+ HomematicDimmer.prototype.getAlexaNamesForOffAsString = function () {
475
+ var result = "";
476
+ this.alexaSmartNamesForOff.forEach(function (alexaOffName) {
477
+ if (result == "") {
478
+ result += alexaOffName;
479
+ }
480
+ else {
481
+ result += ", " + alexaOffName;
482
+ }
483
+ });
484
+ this.alexaActionNamesForOff.forEach(function (alexaOffName) {
485
+ if (result == "") {
486
+ result += alexaOffName;
487
+ }
488
+ else {
489
+ result += ", " + alexaOffName;
490
+ }
491
+ });
492
+ return result;
493
+ };
494
+ HomematicDimmer.prototype.turnOnHM = function () {
495
+ if (this.alexaLevelSchemeForOn == null) { // Schalte Licht nur ein
496
+ if (this.adapter.getState(this.baseState + ".4.LEVEL").val != 100) {
497
+ this.adapter.setState(this.baseState + ".4.LEVEL", 100);
498
+ }
499
+ }
500
+ else {
501
+ this.changeLevel(this.alexaLevelSchemeForOn);
502
+ }
503
+ };
504
+ HomematicDimmer.prototype.getSwitchState = function () {
505
+ return this.baseState + ".4.LEVEL";
506
+ };
507
+ HomematicDimmer.prototype.turnOffHM = function () {
508
+ if (this.adapter.getState(this.baseState + ".4.LEVEL").val != 0) {
509
+ this.adapter.setState(this.baseState + ".4.LEVEL", 0);
510
+ }
511
+ };
512
+ HomematicDimmer.prototype.changeLevel = function (levelScheme) {
513
+ if (this.adapter.getState(this.baseState + ".4.LEVEL").val != levelScheme.getLevel()) {
514
+ this.adapter.setState(this.baseState + ".4.LEVEL", levelScheme.getLevel());
515
+ }
516
+ };
187
517
  HomematicDimmer.prototype.getCategory = function () {
188
518
  return deviceHomematicDimmer;
189
519
  };
520
+ HomematicDimmer.prototype.getLevel = function () {
521
+ return this.adapter.getState(this.baseState + ".4.LEVEL").val; // hm-rpc.1.0008DA49A7C659.3.LEVEL
522
+ };
190
523
  return HomematicDimmer;
191
524
  }(AbstractHomematic));
192
525
  exports.HomematicDimmer = HomematicDimmer;
@@ -235,17 +568,112 @@ var HomematicTemperatursensor = /** @class */ (function (_super) {
235
568
  return HomematicTemperatursensor;
236
569
  }(AbstractHomematic));
237
570
  exports.HomematicTemperatursensor = HomematicTemperatursensor;
238
- var HomematicWandtaster = /** @class */ (function (_super) {
239
- __extends(HomematicWandtaster, _super);
240
- function HomematicWandtaster(adapter, id, baseState, etage, raum, device) {
241
- return _super.call(this, adapter, id, baseState, etage, raum, device) || this;
571
+ var HomematicWandschalter = /** @class */ (function (_super) {
572
+ __extends(HomematicWandschalter, _super);
573
+ function HomematicWandschalter(adapter, id, baseState, etage, raum, device, alexaSmartNamesForOn, alexaActionNamesForOn, alexaSmartNamesForOff, alexaActionNamesForOff, nachtbeleuchtung, turnOffExitHouseSummer, turnOffExitHouseWinter, turnOnEnterHouseSummer, turnOnEnterHouseWinter) {
574
+ var _this = _super.call(this, adapter, id, baseState, etage, raum, device) || this;
575
+ _this.nachtbeleuchtung = nachtbeleuchtung;
576
+ _this.turnOffExitHouseSummer = turnOffExitHouseSummer;
577
+ _this.turnOffExitHouseWinter = turnOffExitHouseWinter;
578
+ _this.turnOnEnterHouseSummer = turnOnEnterHouseSummer;
579
+ _this.turnOnEnterHouseWinter = turnOnEnterHouseWinter;
580
+ _this.alexaSmartNamesForOn = alexaSmartNamesForOn;
581
+ _this.alexaSmartNamesForOff = alexaSmartNamesForOff;
582
+ _this.alexaActionNamesForOn = alexaActionNamesForOn;
583
+ _this.alexaActionNamesForOff = alexaActionNamesForOff;
584
+ _this.alexaSmartNamesForOn.forEach(function (alexaSmartName) {
585
+ _this.createIOTAdapterSmartDevices(alexaSmartName);
586
+ });
587
+ _this.alexaSmartNamesForOff.forEach(function (alexaSmartName) {
588
+ _this.createIOTAdapterSmartDevices(alexaSmartName);
589
+ });
590
+ _this.alexaActionNamesForOn.forEach(function (alexaSmartName) {
591
+ _this.createIOTAdapterSmartDevices(alexaSmartName);
592
+ });
593
+ _this.alexaActionNamesForOff.forEach(function (alexaSmartName) {
594
+ _this.createIOTAdapterSmartDevices(alexaSmartName);
595
+ });
596
+ return _this;
242
597
  }
243
- HomematicWandtaster.prototype.getCategory = function () {
244
- return deviceHomematicWandtaster;
598
+ HomematicWandschalter.prototype.isNachtbeleuchtung = function () {
599
+ return this.nachtbeleuchtung;
245
600
  };
246
- return HomematicWandtaster;
601
+ HomematicWandschalter.prototype.isTurnOffExitHouseSummer = function () {
602
+ return this.turnOffExitHouseSummer;
603
+ };
604
+ HomematicWandschalter.prototype.isTurnOffExitHouseWinter = function () {
605
+ return this.turnOffExitHouseWinter;
606
+ };
607
+ HomematicWandschalter.prototype.isTurnOnEnterHouseSummer = function () {
608
+ return this.turnOnEnterHouseSummer;
609
+ };
610
+ HomematicWandschalter.prototype.isTurnOnEnterHouseWinter = function () {
611
+ return this.turnOnEnterHouseWinter;
612
+ };
613
+ HomematicWandschalter.prototype.getAlexaSmartNamesForOn = function () {
614
+ return this.alexaSmartNamesForOn;
615
+ };
616
+ HomematicWandschalter.prototype.getAlexaSmartNamesForOff = function () {
617
+ return this.alexaSmartNamesForOff;
618
+ };
619
+ HomematicWandschalter.prototype.getAlexaActionNamesForOn = function () {
620
+ return this.alexaActionNamesForOn;
621
+ };
622
+ HomematicWandschalter.prototype.getAlexaActionNamesForOff = function () {
623
+ return this.alexaActionNamesForOff;
624
+ };
625
+ HomematicWandschalter.prototype.getCategory = function () {
626
+ return deviceHomematicWandschalter;
627
+ };
628
+ HomematicWandschalter.prototype.isSwitchedOn = function () {
629
+ if (this.getType() == "HM-LC-Sw1PBU-FM") {
630
+ if (this.adapter.getState(this.baseState + ".1.STATE").val == false) { // hm-rpc.0.PEQ2220753.1.STATE
631
+ return false;
632
+ }
633
+ return true;
634
+ }
635
+ else if (this.getType() == "HmIP-BSM") {
636
+ if (this.adapter.getState(this.baseState + ".4.STATE").val == false) { // // hm-rpc.1.000855699C4F38.4.STATE
637
+ return false;
638
+ }
639
+ return true;
640
+ }
641
+ else {
642
+ // @ts-ignore
643
+ return undefined;
644
+ }
645
+ };
646
+ HomematicWandschalter.prototype.getSwitchState = function () {
647
+ if (this.getType() == "HM-LC-Sw1PBU-FM") {
648
+ return this.baseState + ".1.STATE";
649
+ }
650
+ else if (this.getType() == "HmIP-BSM") {
651
+ return this.baseState + ".4.STATE";
652
+ }
653
+ else {
654
+ // @ts-ignore
655
+ return undefined;
656
+ }
657
+ };
658
+ HomematicWandschalter.prototype.turnOn = function () {
659
+ if (this.getType() == "HM-LC-Sw1PBU-FM") {
660
+ this.adapter.setState(this.baseState + ".1.STATE", true); // hm-rpc.0.PEQ2220753.1.STATE
661
+ }
662
+ else if (this.getType() == "HmIP-BSM") {
663
+ this.adapter.setState(this.baseState + ".4.STATE", true); // // hm-rpc.1.000855699C4F38.4.STATE
664
+ }
665
+ };
666
+ HomematicWandschalter.prototype.turnOff = function () {
667
+ if (this.getType() == "HM-LC-Sw1PBU-FM") {
668
+ this.adapter.setState(this.baseState + ".1.STATE", false); // hm-rpc.0.PEQ2220753.1.STATE
669
+ }
670
+ else if (this.getType() == "HmIP-BSM") {
671
+ this.adapter.setState(this.baseState + ".4.STATE", false); // // hm-rpc.1.000855699C4F38.4.STATE
672
+ }
673
+ };
674
+ return HomematicWandschalter;
247
675
  }(AbstractHomematic));
248
- exports.HomematicWandtaster = HomematicWandtaster;
676
+ exports.HomematicWandschalter = HomematicWandschalter;
249
677
  var HomematicAccessPoint = /** @class */ (function (_super) {
250
678
  __extends(HomematicAccessPoint, _super);
251
679
  function HomematicAccessPoint(adapter, id, baseState, etage, raum, device) {
@@ -268,42 +696,20 @@ var HomematicAccessPoint = /** @class */ (function (_super) {
268
696
  exports.HomematicAccessPoint = HomematicAccessPoint;
269
697
  var HomematicRollladen = /** @class */ (function (_super) {
270
698
  __extends(HomematicRollladen, _super);
271
- function HomematicRollladen(adapter, id, baseState, etage, raum, device, positionAuf, positionMitte, positionZu) {
272
- var _this = _super.call(this, adapter, id, baseState, etage, raum, device) || this;
273
- _this.positionAuf = positionAuf;
274
- _this.positionMitte = positionMitte;
275
- _this.positionZu = positionZu;
276
- return _this;
699
+ function HomematicRollladen(adapter, id, baseState, etage, raum, device) {
700
+ return _super.call(this, adapter, id, baseState, etage, raum, device) || this;
277
701
  }
278
702
  HomematicRollladen.prototype.getCategory = function () {
279
703
  return deviceHomematicRollladen;
280
704
  };
281
- HomematicRollladen.prototype.auf = function () {
282
- this.adapter.setState(this.getBaseState() + ".4.LEVEL", this.positionAuf);
283
- };
284
- HomematicRollladen.prototype.zu = function () {
285
- this.adapter.setState(this.getBaseState() + ".4.LEVEL", this.positionZu);
286
- };
287
- HomematicRollladen.prototype.mitte = function () {
288
- this.adapter.setState(this.getBaseState() + ".4.LEVEL", this.positionMitte);
289
- };
290
705
  return HomematicRollladen;
291
706
  }(AbstractHomematic));
292
707
  exports.HomematicRollladen = HomematicRollladen;
293
708
  var HomematicDoor = /** @class */ (function (_super) {
294
709
  __extends(HomematicDoor, _super);
295
- function HomematicDoor(adapter, id, baseState, etage, raum, device, skipStatisticIsOpened, skipStatisticIsClosed) {
296
- var _this = _super.call(this, adapter, id, baseState, etage, raum, device) || this;
297
- _this.skipStatisticIsOpened = skipStatisticIsOpened;
298
- _this.skipStatisticIsClosed = skipStatisticIsClosed;
299
- return _this;
710
+ function HomematicDoor(adapter, id, baseState, etage, raum, device) {
711
+ return _super.call(this, adapter, id, baseState, etage, raum, device) || this;
300
712
  }
301
- HomematicDoor.prototype.isSkipStatisticIsOpened = function () {
302
- return this.skipStatisticIsOpened;
303
- };
304
- HomematicDoor.prototype.isSkipStatisticIsClosed = function () {
305
- return this.skipStatisticIsClosed;
306
- };
307
713
  HomematicDoor.prototype.getCategory = function () {
308
714
  return deviceHomematicDoor;
309
715
  };
@@ -311,10 +717,10 @@ var HomematicDoor = /** @class */ (function (_super) {
311
717
  return !this.adapter.getState(this.baseState + ".0.LOW_BAT").val; // // hm-rpc.0.000A9BE993E2F7.0.LOW_BAT
312
718
  };
313
719
  HomematicDoor.prototype.isOpen = function () {
314
- if (this.adapter.getState(this.baseState + ".1.STATE").val) { // hm-rpc.0.0000DD89BE05F9.1.STATE
315
- return true;
720
+ if (this.adapter.getState(this.baseState + ".1.STATE").val == 0) {
721
+ return false;
316
722
  }
317
- return false;
723
+ return true;
318
724
  };
319
725
  return HomematicDoor;
320
726
  }(AbstractHomematic));
@@ -330,38 +736,6 @@ var HomematicFussbodenheizung = /** @class */ (function (_super) {
330
736
  return HomematicFussbodenheizung;
331
737
  }(AbstractHomematic));
332
738
  exports.HomematicFussbodenheizung = HomematicFussbodenheizung;
333
- var HomematicWandschalter = /** @class */ (function (_super) {
334
- __extends(HomematicWandschalter, _super);
335
- function HomematicWandschalter(adapter, id, baseState, etage, raum, device) {
336
- return _super.call(this, adapter, id, baseState, etage, raum, device) || this;
337
- }
338
- HomematicWandschalter.prototype.getCategory = function () {
339
- return deviceHomematicWandschalter;
340
- };
341
- HomematicWandschalter.prototype.isStatusBattery = function () {
342
- return !this.adapter.getState(this.baseState + ".0.LOW_BAT").val; // // hm-rpc.0.000A9BE993E2F7.0.LOW_BAT
343
- };
344
- HomematicWandschalter.prototype.isSwitchedOn = function () {
345
- if (this.getType() == "HM-LC-Sw1PBU-FM") {
346
- if (this.adapter.getState(this.baseState + ".1.STATE").val == false) { // hm-rpc.0.PEQ2220753.1.STATE
347
- return false;
348
- }
349
- return true;
350
- }
351
- else if (this.getType() == "HmIP-BSM") {
352
- if (this.adapter.getState(this.baseState + ".4.STATE").val == false) { // // hm-rpc.1.000855699C4F38.4.STATE
353
- return false;
354
- }
355
- return true;
356
- }
357
- else {
358
- // @ts-ignore
359
- return undefined;
360
- }
361
- };
362
- return HomematicWandschalter;
363
- }(AbstractHomematic));
364
- exports.HomematicWandschalter = HomematicWandschalter;
365
739
  module.exports = {
366
740
  HomematicWindow: HomematicWindow,
367
741
  HomematicSteckdose: HomematicSteckdose,
@@ -380,6 +754,8 @@ module.exports = {
380
754
  HomematicPraesenzmelder: HomematicPraesenzmelder,
381
755
  AbstractHomematic: AbstractHomematic,
382
756
  HomematicFunkschaltaktor: HomematicFunkschaltaktor,
757
+ DimmerAlexaScheme: DimmerAlexaScheme,
758
+ DimmerTasterScheme: DimmerTasterScheme,
383
759
  deviceHomematicWandthermostat: deviceHomematicWandthermostat,
384
760
  deviceHomematicPraesenzmelder: deviceHomematicPraesenzmelder,
385
761
  deviceHomematicWetterstation: deviceHomematicWetterstation,