homebridge-loxone-proxy 1.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.
- package/LICENSE +176 -0
- package/README.md +11 -0
- package/config.schema.json +77 -0
- package/dist/LoxoneAccessory.d.ts +10 -0
- package/dist/LoxoneAccessory.d.ts.map +1 -0
- package/dist/LoxoneAccessory.js +117 -0
- package/dist/LoxoneAccessory.js.map +1 -0
- package/dist/LoxonePlatform.d.ts +27 -0
- package/dist/LoxonePlatform.d.ts.map +1 -0
- package/dist/LoxonePlatform.js +139 -0
- package/dist/LoxonePlatform.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/items/Alarm.d.ts +28 -0
- package/dist/items/Alarm.d.ts.map +1 -0
- package/dist/items/Alarm.js +65 -0
- package/dist/items/Alarm.js.map +1 -0
- package/dist/items/Brightness.d.ts +17 -0
- package/dist/items/Brightness.d.ts.map +1 -0
- package/dist/items/Brightness.js +40 -0
- package/dist/items/Brightness.js.map +1 -0
- package/dist/items/Camera.d.ts +50 -0
- package/dist/items/Camera.d.ts.map +1 -0
- package/dist/items/Camera.js +150 -0
- package/dist/items/Camera.js.map +1 -0
- package/dist/items/Dimmer.d.ts +19 -0
- package/dist/items/Dimmer.d.ts.map +1 -0
- package/dist/items/Dimmer.js +59 -0
- package/dist/items/Dimmer.js.map +1 -0
- package/dist/items/Gate.d.ts +36 -0
- package/dist/items/Gate.d.ts.map +1 -0
- package/dist/items/Gate.js +107 -0
- package/dist/items/Gate.js.map +1 -0
- package/dist/items/Humidity.d.ts +17 -0
- package/dist/items/Humidity.d.ts.map +1 -0
- package/dist/items/Humidity.js +40 -0
- package/dist/items/Humidity.js.map +1 -0
- package/dist/items/IRoomControllerV2.d.ts +48 -0
- package/dist/items/IRoomControllerV2.d.ts.map +1 -0
- package/dist/items/IRoomControllerV2.js +125 -0
- package/dist/items/IRoomControllerV2.js.map +1 -0
- package/dist/items/IntercomV2.d.ts +17 -0
- package/dist/items/IntercomV2.d.ts.map +1 -0
- package/dist/items/IntercomV2.js +50 -0
- package/dist/items/IntercomV2.js.map +1 -0
- package/dist/items/Lock.d.ts +28 -0
- package/dist/items/Lock.d.ts.map +1 -0
- package/dist/items/Lock.js +71 -0
- package/dist/items/Lock.js.map +1 -0
- package/dist/items/MoodSwitch.d.ts +15 -0
- package/dist/items/MoodSwitch.d.ts.map +1 -0
- package/dist/items/MoodSwitch.js +48 -0
- package/dist/items/MoodSwitch.js.map +1 -0
- package/dist/items/Motion.d.ts +20 -0
- package/dist/items/Motion.d.ts.map +1 -0
- package/dist/items/Motion.js +44 -0
- package/dist/items/Motion.js.map +1 -0
- package/dist/items/PresenceDetector.d.ts +20 -0
- package/dist/items/PresenceDetector.d.ts.map +1 -0
- package/dist/items/PresenceDetector.js +44 -0
- package/dist/items/PresenceDetector.js.map +1 -0
- package/dist/items/Switch.d.ts +18 -0
- package/dist/items/Switch.d.ts.map +1 -0
- package/dist/items/Switch.js +46 -0
- package/dist/items/Switch.js.map +1 -0
- package/dist/items/Ventilation.d.ts +32 -0
- package/dist/items/Ventilation.d.ts.map +1 -0
- package/dist/items/Ventilation.js +73 -0
- package/dist/items/Ventilation.js.map +1 -0
- package/dist/lib/IntercomStreamer.d.ts +26 -0
- package/dist/lib/IntercomStreamer.d.ts.map +1 -0
- package/dist/lib/IntercomStreamer.js +193 -0
- package/dist/lib/IntercomStreamer.js.map +1 -0
- package/dist/lib/LoxoneHandler.d.ts +4 -0
- package/dist/lib/LoxoneHandler.d.ts.map +1 -0
- package/dist/lib/LoxoneHandler.js +166 -0
- package/dist/lib/LoxoneHandler.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Humidiy = void 0;
|
|
4
|
+
class Humidiy {
|
|
5
|
+
constructor(platform, accessory) {
|
|
6
|
+
this.platform = platform;
|
|
7
|
+
this.accessory = accessory;
|
|
8
|
+
this.State = {
|
|
9
|
+
CurrentRelativeHumidity: 0,
|
|
10
|
+
};
|
|
11
|
+
// Register a listener to be notified of changes in this items value
|
|
12
|
+
this.LoxoneListener = () => {
|
|
13
|
+
this.platform.log.debug(`[${this.device.name}] Register Listener for Humidity Sensor`);
|
|
14
|
+
this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.value, this.callBack.bind(this));
|
|
15
|
+
};
|
|
16
|
+
this.callBack = (message) => {
|
|
17
|
+
if (message.uuid) {
|
|
18
|
+
this.platform.log.debug(`[${this.device.name}] Callback state update for Humidity Sensor: ${message.value}`);
|
|
19
|
+
this.State.CurrentRelativeHumidity = message.value;
|
|
20
|
+
//also make sure this change is directly communicated to HomeKit
|
|
21
|
+
this.service
|
|
22
|
+
.getCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity)
|
|
23
|
+
.updateValue(this.State.CurrentRelativeHumidity);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.service =
|
|
27
|
+
this.accessory.getService(this.platform.Service.HumiditySensor) ||
|
|
28
|
+
this.accessory.addService(this.platform.Service.HumiditySensor);
|
|
29
|
+
this.device = this.accessory.context.device;
|
|
30
|
+
this.LoxoneListener();
|
|
31
|
+
this.service.getCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity)
|
|
32
|
+
.onGet(this.handleCurrentRelativeHumidityGet.bind(this)); // GET - bind to the `getOn` method below
|
|
33
|
+
}
|
|
34
|
+
handleCurrentRelativeHumidityGet() {
|
|
35
|
+
this.platform.log.debug('Triggered GET CurrentRelativeHumidity');
|
|
36
|
+
return this.State.CurrentRelativeHumidity;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Humidiy = Humidiy;
|
|
40
|
+
//# sourceMappingURL=Humidity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Humidity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C,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAElE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;QAE5C,IAAI,CAAC,cAAc,EAAE,CAAC;QAEtB,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,uBAAuB,CAAC;aACjF,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,yCAAyC;IACvG,CAAC;IAoBD,gCAAgC;QAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC;IAC5C,CAAC;CACF;AA/CD,0BA+CC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PlatformAccessory } from 'homebridge';
|
|
2
|
+
import { LoxonePlatform } from '../LoxonePlatform';
|
|
3
|
+
export declare class IRoomControllerV2 {
|
|
4
|
+
private readonly platform;
|
|
5
|
+
private readonly accessory;
|
|
6
|
+
private service;
|
|
7
|
+
private device;
|
|
8
|
+
private State;
|
|
9
|
+
constructor(platform: LoxonePlatform, accessory: PlatformAccessory);
|
|
10
|
+
initListener: () => void;
|
|
11
|
+
callBacktempActual: (message: {
|
|
12
|
+
uuid: string;
|
|
13
|
+
value: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
callBacktempTarget: (message: {
|
|
16
|
+
uuid: string;
|
|
17
|
+
value: number;
|
|
18
|
+
}) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Handle requests to get the current value of the "Current Heating Cooling State" characteristic
|
|
21
|
+
*/
|
|
22
|
+
handleCurrentHeatingCoolingStateGet(): number;
|
|
23
|
+
/**
|
|
24
|
+
* Handle requests to get the current value of the "Target Heating Cooling State" characteristic
|
|
25
|
+
*/
|
|
26
|
+
handleTargetHeatingCoolingStateGet(): number;
|
|
27
|
+
/**
|
|
28
|
+
* Handle requests to set the "Target Heating Cooling State" characteristic
|
|
29
|
+
*/
|
|
30
|
+
handleTargetHeatingCoolingStateSet(value: any): void;
|
|
31
|
+
/**
|
|
32
|
+
* Handle requests to get the current value of the "Current Temperature" characteristic
|
|
33
|
+
*/
|
|
34
|
+
handleCurrentTemperatureGet(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Handle requests to get the current value of the "Target Temperature" characteristic
|
|
37
|
+
*/
|
|
38
|
+
handleTargetTemperatureGet(): number;
|
|
39
|
+
/**
|
|
40
|
+
* Handle requests to set the "Target Temperature" characteristic
|
|
41
|
+
*/
|
|
42
|
+
handleTargetTemperatureSet(value: any): void;
|
|
43
|
+
/**
|
|
44
|
+
* Handle requests to get the current value of the "Temperature Display Units" characteristic
|
|
45
|
+
*/
|
|
46
|
+
handleTemperatureDisplayUnitsGet(): number;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=IRoomControllerV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRoomControllerV2.d.ts","sourceRoot":"","sources":["../../src/items/IRoomControllerV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,qBAAa,iBAAiB;IAa1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAb5B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,MAAM,CAAU;IAExB,OAAO,CAAC,KAAK,CAMX;gBAGiB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,iBAAiB;IA+B/C,YAAY,aAKV;IAEF,kBAAkB,YAAc;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,UAU3D;IAEF,kBAAkB,YAAc;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,UAU3D;IAeF;;OAEG;IACH,mCAAmC;IAKnC;;OAEG;IACH,kCAAkC;IAKlC;;OAEG;IACH,kCAAkC,CAAC,KAAK,KAAA;IAKxC;;OAEG;IACH,2BAA2B;IAK3B;;OAEG;IACH,0BAA0B;IAK1B;;OAEG;IACH,0BAA0B,CAAC,KAAK,KAAA;IAIhC;;OAEG;IACH,gCAAgC;CAIjC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IRoomControllerV2 = void 0;
|
|
4
|
+
class IRoomControllerV2 {
|
|
5
|
+
constructor(platform, accessory) {
|
|
6
|
+
this.platform = platform;
|
|
7
|
+
this.accessory = accessory;
|
|
8
|
+
this.State = {
|
|
9
|
+
CurrentHeatingCoolingState: 0,
|
|
10
|
+
TargetHeatingCoolingState: 3,
|
|
11
|
+
CurrentTemperature: 15,
|
|
12
|
+
TargetTemperature: 15,
|
|
13
|
+
TemperatureDisplayUnits: 0,
|
|
14
|
+
};
|
|
15
|
+
// Register a listener to be notified of changes in this items value
|
|
16
|
+
this.initListener = () => {
|
|
17
|
+
this.platform.log.debug(`[${this.device.name}] Register Listener for Thermostat`);
|
|
18
|
+
this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.tempActual, this.callBacktempActual.bind(this));
|
|
19
|
+
this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.tempTarget, this.callBacktempTarget.bind(this));
|
|
20
|
+
//this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.activeMode, this.callBackactiveMode.bind(this));
|
|
21
|
+
};
|
|
22
|
+
this.callBacktempActual = (message) => {
|
|
23
|
+
if (message.uuid) {
|
|
24
|
+
this.platform.log.debug(`[${this.device.name}] Callback tempActual update for Thermostat : ${message.value}`);
|
|
25
|
+
this.State.CurrentTemperature = (message.value < 10) ? 10 : message.value;
|
|
26
|
+
//also make sure this change is directly communicated to HomeKit
|
|
27
|
+
this.service
|
|
28
|
+
.getCharacteristic(this.platform.Characteristic.CurrentTemperature)
|
|
29
|
+
.updateValue(this.State.CurrentTemperature);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
this.callBacktempTarget = (message) => {
|
|
33
|
+
if (message.uuid) {
|
|
34
|
+
this.platform.log.debug(`[${this.device.name}] Callback tempTarget update for Thermostat: ${message.value}`);
|
|
35
|
+
this.State.TargetTemperature = (message.value < 10) ? 10 : message.value;
|
|
36
|
+
//also make sure this change is directly communicated to HomeKit
|
|
37
|
+
this.service
|
|
38
|
+
.getCharacteristic(this.platform.Characteristic.TargetTemperature)
|
|
39
|
+
.updateValue(this.State.TargetTemperature);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
this.service =
|
|
43
|
+
this.accessory.getService(this.platform.Service.Thermostat) ||
|
|
44
|
+
this.accessory.addService(this.platform.Service.Thermostat);
|
|
45
|
+
this.device = this.accessory.context.device;
|
|
46
|
+
this.initListener();
|
|
47
|
+
// create handlers for required characteristics
|
|
48
|
+
this.service.getCharacteristic(this.platform.Characteristic.CurrentHeatingCoolingState)
|
|
49
|
+
.onGet(this.handleCurrentHeatingCoolingStateGet.bind(this));
|
|
50
|
+
this.service.getCharacteristic(this.platform.Characteristic.TargetHeatingCoolingState)
|
|
51
|
+
.onGet(this.handleTargetHeatingCoolingStateGet.bind(this))
|
|
52
|
+
.onSet(this.handleTargetHeatingCoolingStateSet.bind(this));
|
|
53
|
+
this.service.getCharacteristic(this.platform.Characteristic.CurrentTemperature)
|
|
54
|
+
.onGet(this.handleCurrentTemperatureGet.bind(this));
|
|
55
|
+
this.service.getCharacteristic(this.platform.Characteristic.TargetTemperature)
|
|
56
|
+
.onGet(this.handleTargetTemperatureGet.bind(this))
|
|
57
|
+
.onSet(this.handleTargetTemperatureSet.bind(this));
|
|
58
|
+
this.service.getCharacteristic(this.platform.Characteristic.TemperatureDisplayUnits)
|
|
59
|
+
.onGet(this.handleTemperatureDisplayUnitsGet.bind(this));
|
|
60
|
+
//.onSet(this.handleTemperatureDisplayUnitsSet.bind(this));
|
|
61
|
+
}
|
|
62
|
+
/*
|
|
63
|
+
callBackactiveMode = ( message: {uuid: string; value: number} ) => {
|
|
64
|
+
if (message.uuid) {
|
|
65
|
+
this.platform.log.debug(`[${this.device.name}] Callback ActiveMode update for Thermostat: ${message.value}`);
|
|
66
|
+
this.State.TargetHeatingCoolingState = message.value;
|
|
67
|
+
|
|
68
|
+
//also make sure this change is directly communicated to HomeKit
|
|
69
|
+
this.service
|
|
70
|
+
.getCharacteristic(this.platform.Characteristic.TargetHeatingCoolingState)
|
|
71
|
+
.updateValue(message.value);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Handle requests to get the current value of the "Current Heating Cooling State" characteristic
|
|
77
|
+
*/
|
|
78
|
+
handleCurrentHeatingCoolingStateGet() {
|
|
79
|
+
this.platform.log.debug(`[${this.device.name}] Triggered GET CurrentHeatingCoolingState`);
|
|
80
|
+
return this.State.CurrentHeatingCoolingState;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Handle requests to get the current value of the "Target Heating Cooling State" characteristic
|
|
84
|
+
*/
|
|
85
|
+
handleTargetHeatingCoolingStateGet() {
|
|
86
|
+
this.platform.log.debug(`[${this.device.name}] Triggered GET TargetHeatingCoolingState`);
|
|
87
|
+
return this.State.TargetHeatingCoolingState;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Handle requests to set the "Target Heating Cooling State" characteristic
|
|
91
|
+
*/
|
|
92
|
+
handleTargetHeatingCoolingStateSet(value) {
|
|
93
|
+
this.platform.log.debug(`[${this.device.name}] Triggered SET TargetHeatingCoolingState: ${value}`);
|
|
94
|
+
// Todo: Set from homekit
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Handle requests to get the current value of the "Current Temperature" characteristic
|
|
98
|
+
*/
|
|
99
|
+
handleCurrentTemperatureGet() {
|
|
100
|
+
this.platform.log.debug(`[${this.device.name}] Triggered GET CurrentTemperature`);
|
|
101
|
+
return this.State.CurrentTemperature;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Handle requests to get the current value of the "Target Temperature" characteristic
|
|
105
|
+
*/
|
|
106
|
+
handleTargetTemperatureGet() {
|
|
107
|
+
this.platform.log.debug(`[${this.device.name}] Triggered GET TargetTemperature`);
|
|
108
|
+
return this.State.TargetTemperature;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Handle requests to set the "Target Temperature" characteristic
|
|
112
|
+
*/
|
|
113
|
+
handleTargetTemperatureSet(value) {
|
|
114
|
+
this.platform.log.debug(`[${this.device.name}] Triggered SET TargetTemperature:${value}`);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Handle requests to get the current value of the "Temperature Display Units" characteristic
|
|
118
|
+
*/
|
|
119
|
+
handleTemperatureDisplayUnitsGet() {
|
|
120
|
+
this.platform.log.debug(`[${this.device.name}] Triggered GET TemperatureDisplayUnits`);
|
|
121
|
+
return this.State.TemperatureDisplayUnits;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.IRoomControllerV2 = IRoomControllerV2;
|
|
125
|
+
//# sourceMappingURL=IRoomControllerV2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRoomControllerV2.js","sourceRoot":"","sources":["../../src/items/IRoomControllerV2.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAY5B,YACmB,QAAwB,EACxB,SAA4B;QAD5B,aAAQ,GAAR,QAAQ,CAAgB;QACxB,cAAS,GAAT,SAAS,CAAmB;QAVvC,UAAK,GAAG;YACd,0BAA0B,EAAE,CAAC;YAC7B,yBAAyB,EAAE,CAAC;YAC5B,kBAAkB,EAAE,EAAE;YACtB,iBAAiB,EAAE,EAAE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AI,8CAA8C,KAAK,EAAE,CAAC,CAAC;QACnG,yBAAyB;IAC3B,CAAC;IAED;;OAEG;IACH,2BAA2B;QACzB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,oCAAoC,CAAC,CAAC;QAClF,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,0BAA0B;QACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,mCAAmC,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,0BAA0B,CAAC,KAAK;QAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,qCAAqC,KAAK,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;OAEG;IACH,gCAAgC;QAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,yCAAyC,CAAC,CAAC;QACvF,OAAO,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC;IAC5C,CAAC;CACF;AA/ID,8CA+IC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PlatformAccessory } from 'homebridge';
|
|
2
|
+
import { LoxonePlatform } from '../LoxonePlatform';
|
|
3
|
+
export declare class IntercomV2 {
|
|
4
|
+
private readonly platform;
|
|
5
|
+
private readonly accessory;
|
|
6
|
+
private DoorbellService;
|
|
7
|
+
private device;
|
|
8
|
+
private State;
|
|
9
|
+
constructor(platform: LoxonePlatform, accessory: PlatformAccessory);
|
|
10
|
+
LoxoneListener: () => void;
|
|
11
|
+
callBack: (message: {
|
|
12
|
+
uuid: string;
|
|
13
|
+
value: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
handleProgrammableSwitchEventGet(): number;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=IntercomV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntercomV2.d.ts","sourceRoot":"","sources":["../../src/items/IntercomV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKnD,qBAAa,UAAU;IASnB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAT5B,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,MAAM,CAAU;IAExB,OAAO,CAAC,KAAK,CAEX;gBAGiB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,iBAAiB;IAwB/C,cAAc,aAGZ;IAEF,QAAQ,YAAc;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,UAUjD;IAEF,gCAAgC;CAIjC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IntercomV2 = void 0;
|
|
4
|
+
const Camera_1 = require("./Camera");
|
|
5
|
+
const Motion_1 = require("./Motion");
|
|
6
|
+
class IntercomV2 {
|
|
7
|
+
constructor(platform, accessory) {
|
|
8
|
+
this.platform = platform;
|
|
9
|
+
this.accessory = accessory;
|
|
10
|
+
this.State = {
|
|
11
|
+
ProgrammableSwitchEvent: 0,
|
|
12
|
+
};
|
|
13
|
+
// Register a listener to be notified of changes in this items value
|
|
14
|
+
this.LoxoneListener = () => {
|
|
15
|
+
this.platform.log.debug(`[${this.device.name}] Register Listener for Doorbell`);
|
|
16
|
+
this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.bell, this.callBack.bind(this));
|
|
17
|
+
};
|
|
18
|
+
this.callBack = (message) => {
|
|
19
|
+
if (message.uuid) {
|
|
20
|
+
this.platform.log.debug(`[${this.device.name}] Callback state update for Doorbell: ${message.value}`);
|
|
21
|
+
if (message.value === 1) {
|
|
22
|
+
//also make sure this change is directly communicated to HomeKit
|
|
23
|
+
this.DoorbellService
|
|
24
|
+
.getCharacteristic(this.platform.Characteristic.ProgrammableSwitchEvent)
|
|
25
|
+
.updateValue(this.State.ProgrammableSwitchEvent);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
this.DoorbellService =
|
|
30
|
+
this.accessory.getService(this.platform.Service.Doorbell) ||
|
|
31
|
+
this.accessory.addService(this.platform.Service.Doorbell);
|
|
32
|
+
this.device = this.accessory.context.device;
|
|
33
|
+
// Loxone Intercom Present??
|
|
34
|
+
this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.address, (ip) => {
|
|
35
|
+
this.platform.log.info(`[${this.device.name}] Found Loxone Intercom on IP: ${ip}`);
|
|
36
|
+
new Camera_1.Camera(this.platform, this.accessory, ip); // Register InterCom Camera
|
|
37
|
+
new Motion_1.Motion(this.platform, this.accessory); // Register InterCom Motion Sensor
|
|
38
|
+
});
|
|
39
|
+
this.LoxoneListener();
|
|
40
|
+
// create handlers for required characteristics
|
|
41
|
+
this.DoorbellService.getCharacteristic(this.platform.Characteristic.ProgrammableSwitchEvent)
|
|
42
|
+
.onGet(this.handleProgrammableSwitchEventGet.bind(this));
|
|
43
|
+
}
|
|
44
|
+
handleProgrammableSwitchEventGet() {
|
|
45
|
+
this.platform.log.debug('Triggered GET ProgrammableSwitchEvent');
|
|
46
|
+
return this.State.ProgrammableSwitchEvent;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.IntercomV2 = IntercomV2;
|
|
50
|
+
//# sourceMappingURL=IntercomV2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntercomV2.js","sourceRoot":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AAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE5D,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;QAE5C,4BAA4B;QAC5B,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAU,EAAE,EAAE;YAC7F,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,kCAAkC,EAAE,EAAE,CAAC,CAAC;YACnF,IAAI,eAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,2BAA2B;YAC1E,IAAI,eAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,kCAAkC;QAC/E,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,EAAE,CAAC;QAEtB,+CAA+C;QAC/C,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,uBAAuB,CAAC;aACzF,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;IAoBD,gCAAgC;QAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC;IAC5C,CAAC;CACF;AAvDD,gCAuDC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PlatformAccessory } from 'homebridge';
|
|
2
|
+
import { LoxonePlatform } from '../LoxonePlatform';
|
|
3
|
+
export declare class Lock {
|
|
4
|
+
private readonly platform;
|
|
5
|
+
private readonly accessory;
|
|
6
|
+
private service;
|
|
7
|
+
private device;
|
|
8
|
+
private State;
|
|
9
|
+
constructor(platform: LoxonePlatform, accessory: PlatformAccessory);
|
|
10
|
+
LoxoneListener: () => void;
|
|
11
|
+
callBack: (message: {
|
|
12
|
+
uuid: string;
|
|
13
|
+
value: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Handle requests to get the current value of the "Lock Current State" characteristic
|
|
17
|
+
*/
|
|
18
|
+
handleLockCurrentStateGet(): number;
|
|
19
|
+
/**
|
|
20
|
+
* Handle requests to get the current value of the "Lock Target State" characteristic
|
|
21
|
+
*/
|
|
22
|
+
handleLockTargetStateGet(): number;
|
|
23
|
+
/**
|
|
24
|
+
* Handle requests to set the "Lock Target State" characteristic
|
|
25
|
+
*/
|
|
26
|
+
handleLockTargetStateSet(value: any): void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=Lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lock.d.ts","sourceRoot":"","sources":["../../src/items/Lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,qBAAa,IAAI;IAUb,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAV5B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,MAAM,CAAU;IAExB,OAAO,CAAC,KAAK,CAGX;gBAGiB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,iBAAiB;IAoB/C,cAAc,aAGZ;IAEF,QAAQ,YAAa;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,UAmBlD;IAEF;;OAEG;IACH,yBAAyB;IAKzB;;KAEC;IACD,wBAAwB;IAKxB;;KAEC;IACD,wBAAwB,CAAC,KAAK,KAAA;CAM/B"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Lock = void 0;
|
|
4
|
+
class Lock {
|
|
5
|
+
constructor(platform, accessory) {
|
|
6
|
+
this.platform = platform;
|
|
7
|
+
this.accessory = accessory;
|
|
8
|
+
this.State = {
|
|
9
|
+
LockCurrentState: 0,
|
|
10
|
+
LockTargetState: 0,
|
|
11
|
+
};
|
|
12
|
+
// Register a listener to be notified of changes in this items value
|
|
13
|
+
this.LoxoneListener = () => {
|
|
14
|
+
this.platform.log.debug(`[${this.device.name}] Register Listener for Lock`);
|
|
15
|
+
this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.active, this.callBack.bind(this));
|
|
16
|
+
};
|
|
17
|
+
this.callBack = (message) => {
|
|
18
|
+
if (message.uuid) {
|
|
19
|
+
this.platform.log.debug(`[${this.device.name}] Callback state update for Lock: ${message.value}`);
|
|
20
|
+
this.State.LockTargetState = message.value;
|
|
21
|
+
//also make sure this change is directly communicated to HomeKit
|
|
22
|
+
this.service
|
|
23
|
+
.getCharacteristic(this.platform.Characteristic.LockTargetState)
|
|
24
|
+
.updateValue(this.State.LockTargetState);
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
this.State.LockCurrentState = message.value;
|
|
27
|
+
//also make sure this change is directly communicated to HomeKit
|
|
28
|
+
this.service
|
|
29
|
+
.getCharacteristic(this.platform.Characteristic.LockCurrentState)
|
|
30
|
+
.updateValue(this.State.LockCurrentState);
|
|
31
|
+
}, 5000);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
this.service =
|
|
35
|
+
this.accessory.getService(this.platform.Service.LockMechanism) ||
|
|
36
|
+
this.accessory.addService(this.platform.Service.LockMechanism);
|
|
37
|
+
this.device = this.accessory.context.device;
|
|
38
|
+
this.LoxoneListener();
|
|
39
|
+
// create handlers for required characteristics
|
|
40
|
+
this.service.getCharacteristic(this.platform.Characteristic.LockCurrentState)
|
|
41
|
+
.onGet(this.handleLockCurrentStateGet.bind(this));
|
|
42
|
+
this.service.getCharacteristic(this.platform.Characteristic.LockTargetState)
|
|
43
|
+
.onGet(this.handleLockTargetStateGet.bind(this))
|
|
44
|
+
.onSet(this.handleLockTargetStateSet.bind(this));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Handle requests to get the current value of the "Lock Current State" characteristic
|
|
48
|
+
*/
|
|
49
|
+
handleLockCurrentStateGet() {
|
|
50
|
+
this.platform.log.debug('Triggered GET LockCurrentState');
|
|
51
|
+
return this.State.LockCurrentState;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Handle requests to get the current value of the "Lock Target State" characteristic
|
|
55
|
+
*/
|
|
56
|
+
handleLockTargetStateGet() {
|
|
57
|
+
this.platform.log.debug('Triggered GET LockTargetState');
|
|
58
|
+
return this.State.LockTargetState;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Handle requests to set the "Lock Target State" characteristic
|
|
62
|
+
*/
|
|
63
|
+
handleLockTargetStateSet(value) {
|
|
64
|
+
this.platform.log.debug('Triggered SET LockTargetState:' + value);
|
|
65
|
+
const command = this.State.LockTargetState ? 'Off' : 'On';
|
|
66
|
+
this.platform.log.debug(`[${this.device.name}] - send message: ${command}`);
|
|
67
|
+
this.platform.LoxoneHandler.sendCommand(this.device.uuidAction, command);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.Lock = Lock;
|
|
71
|
+
//# sourceMappingURL=Lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lock.js","sourceRoot":"","sources":["../../src/items/Lock.ts"],"names":[],"mappings":";;;AAIA,MAAa,IAAI;IASf,YACmB,QAAwB,EACxB,SAA4B;QAD5B,aAAQ,GAAR,QAAQ,CAAgB;QACxB,cAAS,GAAT,SAAS,CAAmB;QAPvC,UAAK,GAAG;YACd,gBAAgB,EAAE,CAAC;YACnB,eA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,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,qBAAqB,OAAO,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AAlFD,oBAkFC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PlatformAccessory, CharacteristicValue } from 'homebridge';
|
|
2
|
+
import { LoxonePlatform } from '../LoxonePlatform';
|
|
3
|
+
export declare class MoodSwitch {
|
|
4
|
+
private readonly platform;
|
|
5
|
+
private readonly accessory;
|
|
6
|
+
private service;
|
|
7
|
+
private device;
|
|
8
|
+
private State;
|
|
9
|
+
constructor(platform: LoxonePlatform, accessory: PlatformAccessory);
|
|
10
|
+
LoxoneListener: () => void;
|
|
11
|
+
callBack: (id: string) => void;
|
|
12
|
+
setOn(value: CharacteristicValue): Promise<void>;
|
|
13
|
+
getOn(): Promise<CharacteristicValue>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=MoodSwitch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MoodSwitch.d.ts","sourceRoot":"","sources":["../../src/items/MoodSwitch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,qBAAa,UAAU;IASnB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAT5B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,MAAM,CAAU;IAExB,OAAO,CAAC,KAAK,CAEX;gBAGiB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,iBAAiB;IAiB/C,cAAc,aAGZ;IAEF,QAAQ,OAAQ,MAAM,UAUpB;IAEI,KAAK,CAAC,KAAK,EAAE,mBAAmB;IAYhC,KAAK,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAG5C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoodSwitch = void 0;
|
|
4
|
+
class MoodSwitch {
|
|
5
|
+
constructor(platform, accessory) {
|
|
6
|
+
this.platform = platform;
|
|
7
|
+
this.accessory = accessory;
|
|
8
|
+
this.State = {
|
|
9
|
+
On: false,
|
|
10
|
+
};
|
|
11
|
+
// Register a listener to be notified of changes in this items value
|
|
12
|
+
this.LoxoneListener = () => {
|
|
13
|
+
this.platform.log.debug(`[${this.device.name}] Register Listener for MoodSwitch`);
|
|
14
|
+
this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.activeMoods, this.callBack.bind(this));
|
|
15
|
+
};
|
|
16
|
+
this.callBack = (id) => {
|
|
17
|
+
id = (JSON.parse(id));
|
|
18
|
+
this.State.On = (id[0] === this.device.cat) ? true : false;
|
|
19
|
+
this.platform.log.debug(`[${this.device.name}] Callback state update for MoodSwitch: ${this.State.On}`);
|
|
20
|
+
//also make sure this change is directly communicated to HomeKit
|
|
21
|
+
this.service
|
|
22
|
+
.getCharacteristic(this.platform.Characteristic.On)
|
|
23
|
+
.updateValue(this.State.On);
|
|
24
|
+
};
|
|
25
|
+
this.device = this.accessory.context.device;
|
|
26
|
+
this.service =
|
|
27
|
+
this.accessory.getService(this.platform.Service.Switch) ||
|
|
28
|
+
this.accessory.addService(this.platform.Service.Switch);
|
|
29
|
+
this.LoxoneListener();
|
|
30
|
+
this.service.getCharacteristic(this.platform.Characteristic.On)
|
|
31
|
+
.onSet(this.setOn.bind(this)) // SET - bind to the `setOn` method below
|
|
32
|
+
.onGet(this.getOn.bind(this)); // GET - bind to the `getOn` method below
|
|
33
|
+
}
|
|
34
|
+
async setOn(value) {
|
|
35
|
+
this.State.On = value;
|
|
36
|
+
this.platform.log.debug(`[${this.device.name}] MoodSwitch update from Homekit ->`, value);
|
|
37
|
+
const id = this.State.On ? this.device.cat : '0';
|
|
38
|
+
const command = `changeTo/${id}`;
|
|
39
|
+
const uuid = this.device.uuidAction.split('/');
|
|
40
|
+
this.platform.log.debug(`[${this.device.name}] - send message: ${command}`);
|
|
41
|
+
this.platform.LoxoneHandler.sendCommand(uuid[0], command);
|
|
42
|
+
}
|
|
43
|
+
async getOn() {
|
|
44
|
+
return this.State.On;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.MoodSwitch = MoodSwitch;
|
|
48
|
+
//# sourceMappingURL=MoodSwitch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MoodSwitch.js","sourceRoot":"","sources":["../../src/items/MoodSwitch.ts"],"names":[],"mappings":";;;AAIA,MAAa,UAAU;IAQrB,YACmB,QAAwB,EACxB,SAA4B;QAD5B,aAAQ,GAAR,QAAQ,CAAgB;QACxB,cAAS,GAAT,SAAS,CAAmB;QANvC,UAAK,GAAG;YACd,EAAE,EAAE,KAAK;SACV,CAAC;QAoBF,oEAAoE;QACpE,mBAAc,GAAG,GAAG,EAAE;YACpB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,oCAAoC,CAAC,CAAC;YAClF,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChH,CAAC,CAAC;QAEF,aAAQ,GAAG,CAAC,EAAU,EAAE,EAAE;YAExB,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAA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KAAgB,CAAC;QACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAE1F,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACjD,MAAM,OAAO,GAAG,YAAY,EAAE,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,qBAAqB,OAAO,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAE5D,CAAC;IAED,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACvB,CAAC;CACF;AA3DD,gCA2DC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PlatformAccessory } from 'homebridge';
|
|
2
|
+
import { LoxonePlatform } from '../LoxonePlatform';
|
|
3
|
+
export declare class Motion {
|
|
4
|
+
private readonly platform;
|
|
5
|
+
private readonly accessory;
|
|
6
|
+
private service;
|
|
7
|
+
private device;
|
|
8
|
+
private State;
|
|
9
|
+
constructor(platform: LoxonePlatform, accessory: PlatformAccessory);
|
|
10
|
+
LoxoneListener: () => void;
|
|
11
|
+
callBack: (message: {
|
|
12
|
+
uuid: string;
|
|
13
|
+
value: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Handle requests to get the current value of the "Motion Detected" characteristic
|
|
17
|
+
*/
|
|
18
|
+
handleMotionDetectedGet(): boolean;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=Motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Motion.d.ts","sourceRoot":"","sources":["../../src/items/Motion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,qBAAa,MAAM;IASf,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAT5B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,MAAM,CAAU;IAExB,OAAO,CAAC,KAAK,CAEX;gBAGiB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,iBAAiB;IAgB/C,cAAc,aAGZ;IAEF,QAAQ,YAAc;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,UAWjD;IAEF;;OAEG;IACH,uBAAuB;CAIxB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Motion = void 0;
|
|
4
|
+
class Motion {
|
|
5
|
+
constructor(platform, accessory) {
|
|
6
|
+
this.platform = platform;
|
|
7
|
+
this.accessory = accessory;
|
|
8
|
+
this.State = {
|
|
9
|
+
MotionDetected: false,
|
|
10
|
+
};
|
|
11
|
+
// Register a listener to be notified of changes in this items value
|
|
12
|
+
this.LoxoneListener = () => {
|
|
13
|
+
this.platform.log.debug(`[${this.device.name}] Register Listener for MotionSensor`);
|
|
14
|
+
this.platform.LoxoneHandler.registerListenerForUUID(this.device.states.active, this.callBack.bind(this));
|
|
15
|
+
};
|
|
16
|
+
this.callBack = (message) => {
|
|
17
|
+
if (message.uuid) {
|
|
18
|
+
this.platform.log.debug(`[${this.device.name}] Callback state update for MotionSensor: ${!!message.value}`);
|
|
19
|
+
this.State.MotionDetected = !!message.value;
|
|
20
|
+
//also make sure this change is directly communicated to HomeKit
|
|
21
|
+
this.service
|
|
22
|
+
.getCharacteristic(this.platform.Characteristic.MotionDetected)
|
|
23
|
+
.updateValue(this.State.MotionDetected);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.service =
|
|
27
|
+
this.accessory.getService(this.platform.Service.MotionSensor) ||
|
|
28
|
+
this.accessory.addService(this.platform.Service.MotionSensor);
|
|
29
|
+
this.device = this.accessory.context.device;
|
|
30
|
+
this.LoxoneListener();
|
|
31
|
+
// create handlers for required characteristics
|
|
32
|
+
this.service.getCharacteristic(this.platform.Characteristic.MotionDetected)
|
|
33
|
+
.onGet(this.handleMotionDetectedGet.bind(this));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Handle requests to get the current value of the "Motion Detected" characteristic
|
|
37
|
+
*/
|
|
38
|
+
handleMotionDetectedGet() {
|
|
39
|
+
this.platform.log.debug('Triggered GET MotionDetected');
|
|
40
|
+
return this.State.MotionDetected;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.Motion = Motion;
|
|
44
|
+
//# sourceMappingURL=Motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Motion.js","sourceRoot":"","sources":["../../src/items/Motion.ts"],"names":[],"mappings":";;;AAIA,MAAa,MAAM;IAQjB,YACmB,QAAwB,EACxB,SAA4B;QAD5B,aAAQ,GAAR,QAAQ,CAAgB;QACxB,cAAS,GAAT,SAAS,CAAmB;QANvC,UAAK,GAAG;YACd,cAAc,EAAE,KAAK;SACtB,CAAC;QAmBF,oEAAoE;QACpE,mBAAc,GAAG,GAAG,EAAE;YACpB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,sCAAsC,CAAC,CAAC;YACpF,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,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,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;IACnC,CAAC;CACF;AAnDD,wBAmDC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PlatformAccessory } from 'homebridge';
|
|
2
|
+
import { LoxonePlatform } from '../LoxonePlatform';
|
|
3
|
+
export declare class PresenceDetector {
|
|
4
|
+
private readonly platform;
|
|
5
|
+
private readonly accessory;
|
|
6
|
+
private service;
|
|
7
|
+
private device;
|
|
8
|
+
private State;
|
|
9
|
+
constructor(platform: LoxonePlatform, accessory: PlatformAccessory);
|
|
10
|
+
LoxoneListener: () => void;
|
|
11
|
+
callBack: (message: {
|
|
12
|
+
uuid: string;
|
|
13
|
+
value: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Handle requests to get the current value of the "Motion Detected" characteristic
|
|
17
|
+
*/
|
|
18
|
+
handleOccupancyDetectedGet(): boolean;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=PresenceDetector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresenceDetector.d.ts","sourceRoot":"","sources":["../../src/items/PresenceDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,qBAAa,gBAAgB;IASzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAT5B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,MAAM,CAAU;IAExB,OAAO,CAAC,KAAK,CAEX;gBAGiB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,iBAAiB;IAgB/C,cAAc,aAGZ;IAEF,QAAQ,YAAc;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,UAYjD;IAEF;;OAEG;IACH,0BAA0B;CAI3B"}
|