homebridge-loxone-proxy 1.6.1 → 1.6.2-beta.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 +43 -13
- package/config.schema.json +1 -1
- package/dist/homekit/services/SecuritySystem.d.ts +3 -0
- package/dist/homekit/services/SecuritySystem.d.ts.map +1 -1
- package/dist/homekit/services/SecuritySystem.js +15 -4
- package/dist/homekit/services/SecuritySystem.js.map +1 -1
- package/dist/loxone/items/Alarm.d.ts.map +1 -1
- package/dist/loxone/items/Alarm.js +1 -0
- package/dist/loxone/items/Alarm.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,32 +6,32 @@
|
|
|
6
6
|
[](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
7
7
|
[](https://github.com/0x5e/homebridge-loxone-proxy/blob/main/LICENSE)
|
|
8
8
|
|
|
9
|
-
Homebridge
|
|
9
|
+
Homebridge Dynamic Platform Plugin which exposes a Loxone System to Homekit.
|
|
10
10
|
|
|
11
11
|
The plugin uses Loxone [Lxcommunicator](https://github.com/Loxone/lxcommunicator) to setup a websocket connection to a Loxone miniserver.
|
|
12
|
-
It retrieves the loxone StructureFile and tries to map all items to HomeKit accessories.
|
|
12
|
+
It retrieves the loxone [Structure-File](https://www.loxone.com/wp-content/uploads/datasheets/StructureFile.pdf) and tries to map all items to HomeKit accessories. The websocket connection allows for realtime 2 way updates between Loxone and HomeKit.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
# Mapped Items
|
|
15
15
|
The following list displays all supported itemtypes supported by this plugin.
|
|
16
16
|
|
|
17
17
|
|loxone Item |HomeKit Accessory |Mapping |Note
|
|
18
18
|
|--- |--- |--- |--- |
|
|
19
19
|
| `Alarm` | SecuritySystem | Auto
|
|
20
|
-
|`Brightness` | LightSensor | Manual |
|
|
20
|
+
|`Brightness` | LightSensor | Manual | InfoOnlyAnalog Item. Requires a mapping.
|
|
21
21
|
| `ColorPickerV2` | Lightbulb | Auto | Individual ColorPickers, or items parsed from LightControllerV2.
|
|
22
22
|
| `Dimmer` | Lightbulb | Auto | Individual Dimmers, or items parsed from LightControllerV2.
|
|
23
23
|
|`Gate` | GarageDoorOpener | Auto
|
|
24
|
-
|`Humidity` | HumiditySensor | Manual |
|
|
24
|
+
|`Humidity` | HumiditySensor | Manual | InfoOnlyAnalog Item. Requires a mapping.
|
|
25
25
|
|`Intercom` | Doorbell, Camera | Auto
|
|
26
26
|
|`IntercomV2` | Doorbell, MotionSensor, Camera | Auto | "Use in userinterface" has to be enabled on the MotionSensor for it to be detected.
|
|
27
27
|
|`IRoomControllerV2` | Thermostat | Auto
|
|
28
28
|
|`Jalousie` | Window Covering | Auto
|
|
29
29
|
|`LightControllerV2` | MoodSwitch, Lightbulb | Auto | When enabled, all LightControllerV2 moods are mapped to a Switch Group as a seperate switch. Individual lights are mapped to a Lightbulb.
|
|
30
|
-
|`Lock` | LockMechanism | Manual |
|
|
31
|
-
|`Motion` | MotionSensor | Manual |
|
|
30
|
+
|`Lock` | LockMechanism | Manual | Switch Item. Requires a mapping.
|
|
31
|
+
|`Motion` | MotionSensor | Manual | InfoOnlyDigital Item. Requires a mapping.
|
|
32
32
|
|`PresenceDetector` | OccupancySensor | Auto
|
|
33
33
|
|`Switch, Pushbutton` | Switch, Outlet, or Lightbulb | Auto
|
|
34
|
-
|`Temperature` | TemperatureSensor | Manual |
|
|
34
|
+
|`Temperature` | TemperatureSensor | Manual | InfoOnlyAnalog Item. Requires a mapping.
|
|
35
35
|
|`Ventilation` | Fanv2 | Auto
|
|
36
36
|
|`WindowMonitor` | ContactSensor | Auto
|
|
37
37
|
|
|
@@ -39,14 +39,44 @@ For the plugin to recognize the items, the item needs to be vissible in the user
|
|
|
39
39
|
|
|
40
40
|
<img width="408" alt="useinuserinterface" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/b422015b-4a5d-411e-b98c-42ef86cf8d58">
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
# Configuration
|
|
43
|
+
Configuration of the plugin can be done using the Homebridge UI without having to manually edit the Homebridge config.json file.
|
|
44
|
+
|
|
45
|
+
### Required Settings
|
|
46
|
+
At a minimum, the plugin requires these settings to connect to the miniserver.
|
|
47
|
+
|
|
48
|
+
| Parameter | Note |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `host` | IP of your loxone miniserver |
|
|
51
|
+
| `port` | optional, port of your miniserver (default: 80) |
|
|
52
|
+
| `username` | loxone username |
|
|
53
|
+
| `password` | loxone password |
|
|
54
|
+
|
|
55
|
+
If you create a dedicated user for the plugin, you can filter items by only assigning rights to items you want to expose to HomeBridge.
|
|
56
|
+
|
|
57
|
+
### Filters
|
|
58
|
+
Filters allow you to select what to expose to HomeKit.
|
|
59
|
+
|
|
60
|
+
#### Moodswitches
|
|
61
|
+
When enabled, all LightControllerV2 moods are mapped to a homekit switch. All Switches from the same LightController will be grouped together. In homeKit this works as a radio switch, so only one switch (mood) can be active at the same time. Mixing moods is not possible.
|
|
62
|
+
|
|
63
|
+
#### Exclusions
|
|
64
|
+
To exclude Itemtypes from being mapped, they can be added to the Exclussions section in the config. Use a comma-seperated list for multiple ItemTypes.
|
|
65
|
+
|
|
66
|
+
<img width="748" alt="filters" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/c61daa1b-83aa-467b-a258-8b648a6f575e">
|
|
67
|
+
|
|
68
|
+
The itemtype name can be found in the "mapped items" table.
|
|
44
69
|
|
|
45
70
|
### Manual mapping
|
|
46
|
-
Some items cannot be mapped automatically and require a naming convention to be recognized. For example, giving all
|
|
71
|
+
Some items cannot be mapped automatically and require a naming convention to be recognized. For example, giving all Brightness sensors the convention "MH0'XX'" in Loxone Config
|
|
72
|
+
|
|
73
|
+
<img width="408" alt="mapping2" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/4fd61eaf-4080-41aa-bdc0-363b5ca0fcb1">
|
|
74
|
+
|
|
75
|
+
and then setting the alias "MH0" in the plugin will result in all InfoOnlyAnalog items with "MH0" in the name being recognized as LightSensors.
|
|
47
76
|
|
|
48
|
-
|
|
77
|
+
<img width="748" alt="filters" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/4ed2ce2b-4003-41bb-930c-f9eee7df517a">
|
|
49
78
|
|
|
50
|
-
|
|
79
|
+
Items that require an alias are listed in the "mapped items" table.
|
|
51
80
|
|
|
81
|
+
# Limitations
|
|
52
82
|
Apple does not allow more than 150 items per bridge. This plugin will not map more than 150 items, but if you have other plugins activated, you might still hit this limit. To prevent this you can run this plugin as a child bridge. Another way to solve it is to use a dedicated loxone user for the plugin and only expose the items that you want to use in HomeKit.
|
package/config.schema.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"pluginType": "platform",
|
|
4
4
|
"singular": true,
|
|
5
5
|
"headerDisplay": "Homebridge Proxy which exposes a Loxone System to Homekit",
|
|
6
|
-
"footerDisplay": "",
|
|
6
|
+
"footerDisplay": "For setup information, bug reports and feature requests please visit the [Plugin Homepage](https://github.com/rudyberends/homebridge-loxone-proxy).",
|
|
7
7
|
"schema": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"properties": {
|
|
@@ -2,11 +2,14 @@ import { BaseService } from './BaseService';
|
|
|
2
2
|
import { CharacteristicValue } from 'homebridge';
|
|
3
3
|
export declare class SecuritySystem extends BaseService {
|
|
4
4
|
State: {
|
|
5
|
+
disabledMove: number;
|
|
5
6
|
SecuritySystemCurrentState: number;
|
|
6
7
|
SecuritySystemTargetState: number;
|
|
7
8
|
};
|
|
8
9
|
setupService(): void;
|
|
10
|
+
updateAlarmState(): void;
|
|
9
11
|
updateService(message: {
|
|
12
|
+
state: string;
|
|
10
13
|
value: number;
|
|
11
14
|
}): void;
|
|
12
15
|
handleSecuritySystemCurrentStateGet(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecuritySystem.d.ts","sourceRoot":"","sources":["../../../src/homekit/services/SecuritySystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,qBAAa,cAAe,SAAQ,WAAW;IAC7C,KAAK
|
|
1
|
+
{"version":3,"file":"SecuritySystem.d.ts","sourceRoot":"","sources":["../../../src/homekit/services/SecuritySystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,qBAAa,cAAe,SAAQ,WAAW;IAC7C,KAAK;;;;MAIH;IAEF,YAAY,IAAI,IAAI;IAapB,gBAAgB,IAAI,IAAI;IAWxB,aAAa,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAW9D,mCAAmC,IAAI,MAAM;IAK7C,kCAAkC,IAAI,MAAM;IAK5C,kCAAkC,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;CAOrE"}
|
|
@@ -6,6 +6,7 @@ class SecuritySystem extends BaseService_1.BaseService {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.State = {
|
|
9
|
+
disabledMove: 1,
|
|
9
10
|
SecuritySystemCurrentState: 3,
|
|
10
11
|
SecuritySystemTargetState: 3,
|
|
11
12
|
};
|
|
@@ -20,15 +21,25 @@ class SecuritySystem extends BaseService_1.BaseService {
|
|
|
20
21
|
.onGet(this.handleSecuritySystemTargetStateGet.bind(this))
|
|
21
22
|
.onSet(this.handleSecuritySystemTargetStateSet.bind(this));
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
updateAlarmState() {
|
|
25
|
+
if (this.State.SecuritySystemCurrentState === 1 && this.State.disabledMove === 1) {
|
|
26
|
+
this.State.SecuritySystemCurrentState = this.State.SecuritySystemTargetState = 2;
|
|
27
|
+
}
|
|
27
28
|
this.service.getCharacteristic(this.platform.Characteristic.SecuritySystemTargetState)
|
|
28
29
|
.updateValue(this.State.SecuritySystemTargetState);
|
|
29
30
|
this.service.getCharacteristic(this.platform.Characteristic.SecuritySystemCurrentState)
|
|
30
31
|
.updateValue(this.State.SecuritySystemCurrentState);
|
|
31
32
|
}
|
|
33
|
+
updateService(message) {
|
|
34
|
+
this.platform.log.debug(`[${this.device.name}] Callback state update for SecuritySystem: ${message.state}: ${message.value}`);
|
|
35
|
+
if (message.state === 'disabledMove') {
|
|
36
|
+
this.State.disabledMove = message.value;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
this.State.SecuritySystemTargetState = this.State.SecuritySystemCurrentState = message.value;
|
|
40
|
+
}
|
|
41
|
+
this.updateAlarmState();
|
|
42
|
+
}
|
|
32
43
|
handleSecuritySystemCurrentStateGet() {
|
|
33
44
|
this.platform.log.debug('Triggered GET SecuritySystemCurrentState');
|
|
34
45
|
return this.State.SecuritySystemCurrentState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecuritySystem.js","sourceRoot":"","sources":["../../../src/homekit/services/SecuritySystem.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAG5C,MAAa,cAAe,SAAQ,yBAAW;IAA/C;;QACE,UAAK,GAAG;YACN,0BAA0B,EAAE,CAAC;YAC7B,yBAAyB,EAAE,CAAC;SAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"SecuritySystem.js","sourceRoot":"","sources":["../../../src/homekit/services/SecuritySystem.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAG5C,MAAa,cAAe,SAAQ,yBAAW;IAA/C;;QACE,UAAK,GAAG;YACN,YAAY,EAAE,CAAC;YACf,0BAA0B,EAAE,CAAC;YAC7B,yBAAyB,EAAE,CAAC;SAC7B,CAAC;IAsDJ,CAAC;IApDC,YAAY;QACV,IAAI,CA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ExC,iBAAiB,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"Alarm.d.ts","sourceRoot":"","sources":["../../../src/loxone/items/Alarm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAMxD,qBAAa,KAAM,SAAQ,eAAe;IAExC,iBAAiB,IAAI,IAAI;CAU1B"}
|
|
@@ -7,6 +7,7 @@ class Alarm extends LoxoneAccessory_1.LoxoneAccessory {
|
|
|
7
7
|
configureServices() {
|
|
8
8
|
this.ItemStates = {
|
|
9
9
|
[this.device.states.armed]: { 'service': 'PrimaryService', 'state': 'armed' },
|
|
10
|
+
[this.device.states.disabledMove]: { 'service': 'PrimaryService', 'state': 'disabledMove' },
|
|
10
11
|
};
|
|
11
12
|
this.Service.PrimaryService = new SecuritySystem_1.SecuritySystem(this.platform, this.Accessory);
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alarm.js","sourceRoot":"","sources":["../../../src/loxone/items/Alarm.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,0EAAuE;AAKvE,MAAa,KAAM,SAAQ,iCAAe;IAExC,iBAAiB;QAEf,IAAI,CAAC,UAAU,GAAG;YAChB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAC;
|
|
1
|
+
{"version":3,"file":"Alarm.js","sourceRoot":"","sources":["../../../src/loxone/items/Alarm.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,0EAAuE;AAKvE,MAAa,KAAM,SAAQ,iCAAe;IAExC,iBAAiB;QAEf,IAAI,CAAC,UAAU,GAAG;YAChB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAC;YAC3E,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,EAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,cAAc,EAAC;SAC1F,CAAC;QAGF,IAAI,CAAC,OAAO,CAAC,cAAc,GAAG,IAAI,+BAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAU,CAAC,CAAC;IACnF,CAAC;CACF;AAZD,sBAYC"}
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"displayName": "Homebridge Loxone Proxy",
|
|
4
4
|
"name": "homebridge-loxone-proxy",
|
|
5
|
-
"version": "1.6.1",
|
|
6
|
-
"description": "Homebridge
|
|
5
|
+
"version": "1.6.2-beta.1",
|
|
6
|
+
"description": "Homebridge Dynamic Platform Plugin which exposes a Loxone System to Homekit.",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|