homebridge-loxone-proxy 1.0.1 → 1.0.3
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 -0
- package/config.schema.json +7 -15
- package/dist/LoxoneAccessory.d.ts +0 -1
- package/dist/LoxoneAccessory.d.ts.map +1 -1
- package/dist/LoxoneAccessory.js +0 -20
- package/dist/LoxoneAccessory.js.map +1 -1
- package/dist/LoxonePlatform.d.ts +1 -0
- package/dist/LoxonePlatform.d.ts.map +1 -1
- package/dist/LoxonePlatform.js +46 -17
- package/dist/LoxonePlatform.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,3 +9,28 @@
|
|
|
9
9
|
# Homebridge Loxone Proxy
|
|
10
10
|
|
|
11
11
|
Homebridge Proxy which exposes a Loxone System to Homekit.
|
|
12
|
+
|
|
13
|
+
The plugin uses Loxone [Lxcommunicator](https://github.com/Loxone/lxcommunicator) to setup a websocket connection to a Loxone miniserver.
|
|
14
|
+
It retrieves the loxone StructureFile and tries to map all items to HomeKit accessories.
|
|
15
|
+
|
|
16
|
+
### Mapped Items
|
|
17
|
+
|
|
18
|
+
|loxone Item |HomeKit Accessory |Mapping |Note
|
|
19
|
+
|--- |--- |--- |--- |
|
|
20
|
+
| `Alarm` | SecuritySystem | Auto
|
|
21
|
+
|`Brightness` | LightSensor | Manual | Requires an alias in the config.
|
|
22
|
+
| `Dimmer` | Lightbulb | Auto | Individual Dimmers, or items parsed from LightControllerV2.
|
|
23
|
+
|`Gate` | GarageDoorOpener | Auto
|
|
24
|
+
|`Humidity` | HumiditySensor | Manual | Requires an alias in the config.
|
|
25
|
+
|`IntercomV2` | Doorbell, MotionSensor, Camera | Auto
|
|
26
|
+
|`IRoomControllerV2` | Thermostat | Auto
|
|
27
|
+
|`Lock` | LockMechanism | Manual | A switch with an alias that is defined in the config.
|
|
28
|
+
|`MoodSwitch` | Switch | Auto | all LightControllerV2 moods are maped to a seperate switch.
|
|
29
|
+
|`Motion` | MotionSensor | Manual | Requires an alias in the config.
|
|
30
|
+
|`PresenceDetector` | OccupancySensor | Auto
|
|
31
|
+
|`Switch` | Switch, Outlet, or Lightbulb | Auto
|
|
32
|
+
|`Ventilation` | Fanv2 | Auto
|
|
33
|
+
|
|
34
|
+
### Limitations
|
|
35
|
+
|
|
36
|
+
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
|
@@ -8,41 +8,35 @@
|
|
|
8
8
|
"properties": {
|
|
9
9
|
"host": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"required": true
|
|
12
|
-
"description": "Loxone miniserver ip"
|
|
11
|
+
"required": true
|
|
13
12
|
},
|
|
14
13
|
"port": {
|
|
15
14
|
"type": "integer",
|
|
16
15
|
"default": "80",
|
|
17
|
-
"required": true
|
|
18
|
-
"description": "miniserver port"
|
|
16
|
+
"required": true
|
|
19
17
|
},
|
|
20
18
|
"username": {
|
|
21
19
|
"type": "string",
|
|
22
|
-
"required": true
|
|
23
|
-
"description": "Loxone username"
|
|
20
|
+
"required": true
|
|
24
21
|
},
|
|
25
22
|
"password": {
|
|
26
23
|
"type": "string",
|
|
27
|
-
"required": true
|
|
28
|
-
"description": "Loxone password"
|
|
24
|
+
"required": true
|
|
29
25
|
},
|
|
30
26
|
"options": {
|
|
31
27
|
"type": "object",
|
|
32
28
|
"title": "Options",
|
|
33
29
|
"properties": {
|
|
34
30
|
"MoodSwitches": {
|
|
35
|
-
"type": "
|
|
36
|
-
"default": "
|
|
37
|
-
"enum": ["
|
|
38
|
-
"description": "Include Lighting Controller Moods as Switches."
|
|
31
|
+
"type": "string",
|
|
32
|
+
"default": "enabled",
|
|
33
|
+
"enum": ["enabled","disabled"]
|
|
39
34
|
}
|
|
40
35
|
}
|
|
41
36
|
},
|
|
42
37
|
"switchAlias": {
|
|
43
38
|
"type": "object",
|
|
44
39
|
"title": "Switch aliases",
|
|
45
|
-
"description": "Change the prefixes being used for the assumptions",
|
|
46
40
|
"properties": {
|
|
47
41
|
"Lock": {
|
|
48
42
|
"type": "string"
|
|
@@ -52,7 +46,6 @@
|
|
|
52
46
|
"InfoOnlyDigitalAlias": {
|
|
53
47
|
"type": "object",
|
|
54
48
|
"title": "InfoOnlyDigital aliases",
|
|
55
|
-
"description": "Change the prefixes being used for the assumptions",
|
|
56
49
|
"properties": {
|
|
57
50
|
"Motion": {
|
|
58
51
|
"type": "string"
|
|
@@ -62,7 +55,6 @@
|
|
|
62
55
|
"InfoOnlyAnalogAlias": {
|
|
63
56
|
"type": "object",
|
|
64
57
|
"title": "InfoOnlyAnalog aliases",
|
|
65
|
-
"description": "Change the prefixes being used for the assumptions",
|
|
66
58
|
"properties": {
|
|
67
59
|
"Humidity": {
|
|
68
60
|
"type": "string"
|
|
@@ -3,7 +3,6 @@ import { Control } from './structure/LoxAPP3';
|
|
|
3
3
|
export declare class LoxoneAccessory {
|
|
4
4
|
private readonly platform;
|
|
5
5
|
private readonly device;
|
|
6
|
-
private SupportedItems;
|
|
7
6
|
constructor(platform: LoxonePlatform, device: Control);
|
|
8
7
|
mapLoxoneItem(accessory: any): void;
|
|
9
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoxoneAccessory.d.ts","sourceRoot":"","sources":["../src/LoxoneAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAiB9C,qBAAa,eAAe;
|
|
1
|
+
{"version":3,"file":"LoxoneAccessory.d.ts","sourceRoot":"","sources":["../src/LoxoneAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAiB9C,qBAAa,eAAe;IAGxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,OAAO;IAmClC,aAAa,CAAC,SAAS,KAAA;CAgExB"}
|
package/dist/LoxoneAccessory.js
CHANGED
|
@@ -19,26 +19,6 @@ class LoxoneAccessory {
|
|
|
19
19
|
constructor(platform, device) {
|
|
20
20
|
this.platform = platform;
|
|
21
21
|
this.device = device;
|
|
22
|
-
// Items supported by this Plugin
|
|
23
|
-
this.SupportedItems = [
|
|
24
|
-
'Alarm',
|
|
25
|
-
'Brightness',
|
|
26
|
-
'Dimmer',
|
|
27
|
-
'Gate',
|
|
28
|
-
'Humidity',
|
|
29
|
-
'IntercomV2',
|
|
30
|
-
'IRoomControllerV2',
|
|
31
|
-
'Lock',
|
|
32
|
-
'MoodSwitch',
|
|
33
|
-
'Motion',
|
|
34
|
-
'PresenceDetector',
|
|
35
|
-
'Switch',
|
|
36
|
-
'Ventilation',
|
|
37
|
-
];
|
|
38
|
-
if (!(this.SupportedItems.includes(this.device.type))) {
|
|
39
|
-
this.platform.log.info(`[LoxoneAccesory] Skipping Unsupported item: ${this.device.name} with type ${this.device.type}`);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
22
|
const uuid = this.platform.api.hap.uuid.generate(this.device.uuidAction);
|
|
43
23
|
const existingAccessory = this.platform.accessories.find(accessory => accessory.UUID === uuid);
|
|
44
24
|
if (existingAccessory) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoxoneAccessory.js","sourceRoot":"","sources":["../src/LoxoneAccessory.ts"],"names":[],"mappings":";;;AAGA,eAAe;AACf,yCAAsC;AACtC,mDAAgD;AAChD,2CAAwC;AACxC,uCAAoC;AACpC,+CAA2C;AAC3C,mDAAgD;AAChD,iEAA8D;AAC9D,uCAAoC;AACpC,mDAAgD;AAChD,2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|
package/dist/LoxonePlatform.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare class LoxonePlatform implements DynamicPlatformPlugin {
|
|
|
8
8
|
private LoxoneCats;
|
|
9
9
|
private LoxoneItems;
|
|
10
10
|
private LoxoneIntercomMotion;
|
|
11
|
+
private SupportedItems;
|
|
11
12
|
LoxoneHandler: any;
|
|
12
13
|
readonly Service: typeof Service;
|
|
13
14
|
readonly Characteristic: typeof Characteristic;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoxonePlatform.d.ts","sourceRoot":"","sources":["../src/LoxonePlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG5H,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEvE,qBAAa,cAAe,YAAW,qBAAqB;
|
|
1
|
+
{"version":3,"file":"LoxonePlatform.d.ts","sourceRoot":"","sources":["../src/LoxonePlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG5H,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEvE,qBAAa,cAAe,YAAW,qBAAqB;aA+BxC,GAAG,EAAE,MAAM;aACX,MAAM,EAAE,cAAc;aACtB,GAAG,EAAE,GAAG;IA/B1B,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,oBAAoB,CAAM;IAGlC,OAAO,CAAC,cAAc,CAcpB;IAGK,aAAa,EAAE,GAAG,CAAC;IAC1B,SAAgB,OAAO,EAAE,OAAO,OAAO,CAAwB;IAC/D,SAAgB,cAAc,EAAE,OAAO,cAAc,CAA+B;IACpF,SAAgB,WAAW,EAAE,iBAAiB,EAAE,CAAM;gBAGpC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG;IAKpB,UAAU;IAeV,iBAAiB,CAAC,MAAM,EAAE,aAAa;IA6B7C,0BAA0B,CAAC,iBAAiB,EAAE,OAAO;IAoCrD,eAAe,CAAC,UAAU,EAAE,OAAO;IA6C7B,cAAc,CAAC,WAAW,EAAE,QAAQ;IAmB1C;;;OAGG;IACH,kBAAkB,CAAC,SAAS,EAAE,iBAAiB;CAIhD"}
|
package/dist/LoxonePlatform.js
CHANGED
|
@@ -15,6 +15,22 @@ class LoxonePlatform {
|
|
|
15
15
|
this.LoxoneCats = {};
|
|
16
16
|
this.LoxoneItems = {};
|
|
17
17
|
this.LoxoneIntercomMotion = '';
|
|
18
|
+
// Items supported by this Platform
|
|
19
|
+
this.SupportedItems = [
|
|
20
|
+
'Alarm',
|
|
21
|
+
'Brightness',
|
|
22
|
+
'Dimmer',
|
|
23
|
+
'Gate',
|
|
24
|
+
'Humidity',
|
|
25
|
+
'IntercomV2',
|
|
26
|
+
'IRoomControllerV2',
|
|
27
|
+
'Lock',
|
|
28
|
+
'MoodSwitch',
|
|
29
|
+
'Motion',
|
|
30
|
+
'PresenceDetector',
|
|
31
|
+
'Switch',
|
|
32
|
+
'Ventilation',
|
|
33
|
+
];
|
|
18
34
|
this.Service = this.api.hap.Service;
|
|
19
35
|
this.Characteristic = this.api.hap.Characteristic;
|
|
20
36
|
this.accessories = []; // this is used to track restored cached accessories
|
|
@@ -26,10 +42,10 @@ class LoxonePlatform {
|
|
|
26
42
|
this.LoxoneHandler = new LoxoneHandler_1.default(this);
|
|
27
43
|
// Wait for configfile. (LoxAPP3.json)
|
|
28
44
|
while (!this.LoxoneHandler.loxdata) {
|
|
29
|
-
await new Promise(resolve => setTimeout(resolve,
|
|
30
|
-
this.log.info(`[LoxoneInit] got structure file; last modified on ${this.LoxoneHandler.loxdata.lastModified}`);
|
|
31
|
-
this.parseLoxoneConfig(this.LoxoneHandler.loxdata);
|
|
45
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
32
46
|
}
|
|
47
|
+
this.log.info(`[LoxoneInit] got structure file; last modified on ${this.LoxoneHandler.loxdata.lastModified}`);
|
|
48
|
+
this.parseLoxoneConfig(this.LoxoneHandler.loxdata);
|
|
33
49
|
}
|
|
34
50
|
async parseLoxoneConfig(config) {
|
|
35
51
|
// Loxone Rooms
|
|
@@ -56,18 +72,20 @@ class LoxonePlatform {
|
|
|
56
72
|
this.mapLoxoneItems(this.LoxoneItems);
|
|
57
73
|
}
|
|
58
74
|
parseLoxoneLightController(LightControllerV2) {
|
|
59
|
-
// Create Mood Switches
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
// Create Mood Switches if enabled in config
|
|
76
|
+
if (this.config.options.MoodSwitches === 'enabled') {
|
|
77
|
+
const moods = JSON.parse(this.LoxoneHandler.getLastCachedValue(LightControllerV2.states.moodList));
|
|
78
|
+
for (const mood of moods) {
|
|
79
|
+
if (mood.name !== 'Uit') {
|
|
80
|
+
const MoodSwitch = Object.assign({}, LightControllerV2);
|
|
81
|
+
MoodSwitch.name = `[${this.LoxoneRooms[LightControllerV2.room]}] ${mood.name}`;
|
|
82
|
+
MoodSwitch.uuidAction = `${LightControllerV2.uuidAction}/${mood.name}`;
|
|
83
|
+
MoodSwitch.type = 'MoodSwitch';
|
|
84
|
+
MoodSwitch.cat = mood.id;
|
|
85
|
+
MoodSwitch.details = {};
|
|
86
|
+
MoodSwitch.subControls = {};
|
|
87
|
+
this.LoxoneItems[`${LightControllerV2.uuidAction}/${mood.name}`] = MoodSwitch;
|
|
88
|
+
}
|
|
71
89
|
}
|
|
72
90
|
}
|
|
73
91
|
// Create individual Lights
|
|
@@ -121,9 +139,20 @@ class LoxonePlatform {
|
|
|
121
139
|
return LoxoneItem.type;
|
|
122
140
|
}
|
|
123
141
|
async mapLoxoneItems(LoxoneItems) {
|
|
142
|
+
let itemid = 1;
|
|
124
143
|
for (const uuid in LoxoneItems) {
|
|
125
|
-
this.
|
|
126
|
-
|
|
144
|
+
if (this.SupportedItems.includes(LoxoneItems[uuid].type)) {
|
|
145
|
+
if (itemid >= 149) {
|
|
146
|
+
this.log.info('[mapLoxoneitems] Maximum number of supported HomeKit items reached. Stop mapping Items.');
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this.log.info(`[mapLoxoneItems][Item ${itemid}] Found item: ${LoxoneItems[uuid].name} with type ${LoxoneItems[uuid].type}`);
|
|
150
|
+
new LoxoneAccessory_1.LoxoneAccessory(this, LoxoneItems[uuid]);
|
|
151
|
+
itemid++;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
this.log.debug(`[mapLoxoneitems] Skipping Unsupported item: ${LoxoneItems[uuid].name} with type ${LoxoneItems[uuid].name}`);
|
|
155
|
+
}
|
|
127
156
|
}
|
|
128
157
|
}
|
|
129
158
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoxonePlatform.js","sourceRoot":"","sources":["../src/LoxonePlatform.ts"],"names":[],"mappings":";;;;;;AACA,wEAAgD;AAChD,uDAAoD;AAGpD,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"LoxonePlatform.js","sourceRoot":"","sources":["../src/LoxonePlatform.ts"],"names":[],"mappings":";;;;;;AACA,wEAAgD;AAChD,uDAAoD;AAGpD,MAAa,cAAc;IA8BzB,YACkB,GAAW,EACX,MAAsB,EACtB,GAAQ;QAFR,QAAG,GAAH,GAAG,CAAQ;QACX,WAAM,GAAN,MAAM,CAAgB;QACtB,QAAG,GAAH,GAAG,CAAK;QA/BlB,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C,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,cAAc,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;aAC7H;SACF;IACH,CAAC;IAED;;;OAGG;IACH,kBAAkB,CAAC,SAA4B;QAC7C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,+BAA+B,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;QACtE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;CACF;AA9LD,wCA8LC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"displayName": "Homebridge Loxone Proxy",
|
|
4
4
|
"name": "homebridge-loxone-proxy",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.3",
|
|
6
6
|
"description": "Homebridge plugin which exposes a Loxone system to HomeKit.",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|