@jay-d-tyler/homebridge-somfy-protect-automate 1.0.16 ā 2.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 +13 -17
- package/config.schema.json +23 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -58
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,32 +14,26 @@ This plugin creates a workaround by providing a **stateless switch** that, when
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
16
16
|
- š **Stateless Switch**: Acts like a button that automatically resets after use
|
|
17
|
-
-
|
|
17
|
+
- š **HTTP API Communication**: Uses REST API for reliable cross-plugin communication
|
|
18
18
|
- š **One-Way Operation**: Only disarms (prevents accidental arming via automation)
|
|
19
19
|
- ā” **Instant Response**: Triggers immediately when activated
|
|
20
20
|
- šÆ **Simple Setup**: Minimal configuration required
|
|
21
|
+
- š **Optional Security**: Supports token-based authentication
|
|
21
22
|
|
|
22
23
|
## Prerequisites
|
|
23
24
|
|
|
24
|
-
This plugin requires the main Somfy Protect plugin to be installed and configured:
|
|
25
|
+
This plugin requires the main Somfy Protect plugin (v2.2.0+) to be installed and configured with HTTP API enabled:
|
|
25
26
|
|
|
26
27
|
- [@jay-d-tyler/homebridge-somfy-protect](https://github.com/jay-d-tyler/homebridge-somfy-protect)
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## ā ļø Important: Bridge Configuration
|
|
31
|
-
|
|
32
|
-
**Both plugins must run on the Default Bridge (not child bridges)** for cross-plugin communication to work.
|
|
29
|
+
### Enable HTTP API in Somfy Protect Plugin:
|
|
33
30
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
3. Under **Bridge Settings**, select **"Default Bridge"**
|
|
39
|
-
4. Do the same for **Somfy Protect Automate**
|
|
40
|
-
5. Restart Homebridge
|
|
31
|
+
1. Go to Somfy Protect plugin settings
|
|
32
|
+
2. Set `httpPort` to `8581` (or any available port)
|
|
33
|
+
3. Optionally set `httpToken` for authentication
|
|
34
|
+
4. Restart Homebridge
|
|
41
35
|
|
|
42
|
-
|
|
36
|
+
Make sure your Somfy Protect alarm is working in HomeKit before installing this automation helper.
|
|
43
37
|
|
|
44
38
|
## Installation
|
|
45
39
|
|
|
@@ -68,7 +62,8 @@ Add this platform to your Homebridge `config.json`:
|
|
|
68
62
|
{
|
|
69
63
|
"platform": "SomfyProtectAutomate",
|
|
70
64
|
"name": "Somfy Protect Automate",
|
|
71
|
-
"
|
|
65
|
+
"httpPort": 8581,
|
|
66
|
+
"httpToken": "optional-secret-token"
|
|
72
67
|
}
|
|
73
68
|
]
|
|
74
69
|
}
|
|
@@ -80,7 +75,8 @@ Add this platform to your Homebridge `config.json`:
|
|
|
80
75
|
|--------|------|----------|---------|-------------|
|
|
81
76
|
| `platform` | string | Yes | `SomfyProtectAutomate` | Must be `SomfyProtectAutomate` |
|
|
82
77
|
| `name` | string | No | `Somfy Protect Automate` | The name that appears in Homebridge logs |
|
|
83
|
-
| `
|
|
78
|
+
| `httpPort` | number | No | `8581` | Port the Somfy Protect HTTP API is listening on |
|
|
79
|
+
| `httpToken` | string | No | - | Optional authentication token (must match Somfy Protect plugin) |
|
|
84
80
|
|
|
85
81
|
## Usage
|
|
86
82
|
|
package/config.schema.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"pluginAlias": "SomfyProtectAutomate",
|
|
3
3
|
"pluginType": "platform",
|
|
4
4
|
"singular": true,
|
|
5
|
-
"headerDisplay": "This plugin creates a switch called **Disarm Somfy Protect** that
|
|
6
|
-
"footerDisplay": "š” **Tip:**
|
|
5
|
+
"headerDisplay": "This plugin creates a switch called **Disarm Somfy Protect** that communicates with the Somfy Protect plugin's HTTP API to disarm your alarm via HomeKit automations.\n\nā ļø **IMPORTANT:** The Somfy Protect plugin must have the HTTP API enabled (httpPort setting). Both plugins can run on child bridges.",
|
|
6
|
+
"footerDisplay": "š” **Tip:** Make sure the HTTP port and token match what you configured in the Somfy Protect plugin settings.",
|
|
7
7
|
"schema": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"properties": {
|
|
@@ -13,25 +13,37 @@
|
|
|
13
13
|
"default": "Somfy Protect Automate",
|
|
14
14
|
"required": false
|
|
15
15
|
},
|
|
16
|
-
"
|
|
17
|
-
"title": "Somfy Protect
|
|
16
|
+
"httpPort": {
|
|
17
|
+
"title": "Somfy Protect HTTP API Port",
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"default": 8581,
|
|
20
|
+
"required": false,
|
|
21
|
+
"description": "The HTTP port that the Somfy Protect plugin is listening on. Must match the httpPort setting in Somfy Protect plugin."
|
|
22
|
+
},
|
|
23
|
+
"httpToken": {
|
|
24
|
+
"title": "HTTP API Token (Optional)",
|
|
18
25
|
"type": "string",
|
|
19
|
-
"required":
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
26
|
+
"required": false,
|
|
27
|
+
"description": "The authentication token if you configured httpToken in the Somfy Protect plugin. Leave blank if no token is set.",
|
|
28
|
+
"x-schema-form": {
|
|
29
|
+
"type": "password"
|
|
30
|
+
}
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
},
|
|
26
34
|
"layout": [
|
|
27
35
|
{
|
|
28
36
|
"type": "fieldset",
|
|
29
|
-
"title": "Configuration",
|
|
37
|
+
"title": "HTTP API Configuration",
|
|
30
38
|
"expandable": false,
|
|
31
39
|
"items": [
|
|
32
40
|
{
|
|
33
|
-
"key": "
|
|
34
|
-
"description": "
|
|
41
|
+
"key": "httpPort",
|
|
42
|
+
"description": "This must match the httpPort configured in the Somfy Protect plugin settings."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"key": "httpToken",
|
|
46
|
+
"description": "Optional security token. Only needed if you set httpToken in Somfy Protect plugin."
|
|
35
47
|
}
|
|
36
48
|
]
|
|
37
49
|
}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EAQJ,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EAQJ,MAAM,YAAY,CAAC;yBAWJ,KAAK,GAAG;AAAxB,wBAEE"}
|
package/dist/index.js
CHANGED
|
@@ -16,20 +16,27 @@ class SomfyProtectAutomatePlatform {
|
|
|
16
16
|
this.api = api;
|
|
17
17
|
this.Service = this.api.hap.Service;
|
|
18
18
|
this.Characteristic = this.api.hap.Characteristic;
|
|
19
|
-
this.log.info('=== Somfy Protect Automate
|
|
19
|
+
this.log.info('=== Somfy Protect Automate v2.0.3 Initializing ===');
|
|
20
20
|
this.log.info('Platform name:', this.config.name);
|
|
21
|
-
this.log.info('
|
|
21
|
+
this.log.info('HTTP API port:', this.config.httpPort || 8581);
|
|
22
|
+
if (this.config.httpToken) {
|
|
23
|
+
this.log.info('HTTP API authentication: enabled');
|
|
24
|
+
}
|
|
22
25
|
this.api.on('didFinishLaunching', () => {
|
|
23
26
|
this.log.info('Homebridge finished launching, discovering devices...');
|
|
24
27
|
this.discoverDevices();
|
|
25
28
|
});
|
|
26
29
|
}
|
|
27
30
|
configureAccessory(accessory) {
|
|
28
|
-
this.log.info('Loading accessory from cache:', accessory.displayName);
|
|
31
|
+
this.log.info('Loading accessory from cache:', accessory.displayName, 'UUID:', accessory.UUID);
|
|
29
32
|
this.accessories.push(accessory);
|
|
30
33
|
}
|
|
31
34
|
discoverDevices() {
|
|
32
35
|
this.log.info('Starting device discovery...');
|
|
36
|
+
this.log.info(`Total cached accessories: ${this.accessories.length}`);
|
|
37
|
+
this.accessories.forEach(acc => {
|
|
38
|
+
this.log.info(` - Cached: "${acc.displayName}" (UUID: ${acc.UUID})`);
|
|
39
|
+
});
|
|
33
40
|
const buttonLabel = 'Disarm Somfy Protect';
|
|
34
41
|
const uuid = this.api.hap.uuid.generate(buttonLabel);
|
|
35
42
|
this.log.info(`Generated UUID for "${buttonLabel}": ${uuid}`);
|
|
@@ -37,9 +44,17 @@ class SomfyProtectAutomatePlatform {
|
|
|
37
44
|
if (oldAccessoriesToRemove.length > 0) {
|
|
38
45
|
this.log.info(`Removing ${oldAccessoriesToRemove.length} old cached accessory(ies)...`);
|
|
39
46
|
oldAccessoriesToRemove.forEach(acc => {
|
|
40
|
-
this.log.info(` - Removing: "${acc.displayName}"`);
|
|
47
|
+
this.log.info(` - Removing: "${acc.displayName}" (UUID: ${acc.UUID})`);
|
|
48
|
+
const index = this.accessories.indexOf(acc);
|
|
49
|
+
if (index > -1) {
|
|
50
|
+
this.accessories.splice(index, 1);
|
|
51
|
+
}
|
|
41
52
|
});
|
|
42
53
|
this.api.unregisterPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, oldAccessoriesToRemove);
|
|
54
|
+
this.log.info('ā Old accessories removed');
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.log.info('No old accessories to remove');
|
|
43
58
|
}
|
|
44
59
|
const existingAccessory = this.accessories.find(accessory => accessory.UUID === uuid);
|
|
45
60
|
if (existingAccessory) {
|
|
@@ -97,66 +112,41 @@ class SomfyDisarmSwitch {
|
|
|
97
112
|
}
|
|
98
113
|
async disarmSomfyAlarm() {
|
|
99
114
|
try {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
const port = this.platform.config.httpPort || 8581;
|
|
116
|
+
const token = this.platform.config.httpToken;
|
|
117
|
+
const url = `http://localhost:${port}/disarm`;
|
|
118
|
+
this.platform.log.info(`Sending disarm command to Somfy Protect HTTP API at ${url}...`);
|
|
119
|
+
const headers = {};
|
|
120
|
+
if (token) {
|
|
121
|
+
headers.Authorization = `Bearer ${token}`;
|
|
103
122
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
this.platform.log.error(
|
|
111
|
-
this.platform.log.error('
|
|
123
|
+
const response = await fetch(url, {
|
|
124
|
+
method: 'POST',
|
|
125
|
+
headers,
|
|
126
|
+
});
|
|
127
|
+
if (!response.ok) {
|
|
128
|
+
const errorText = await response.text();
|
|
129
|
+
this.platform.log.error(`HTTP API returned error ${response.status}: ${errorText}`);
|
|
130
|
+
this.platform.log.error('Make sure the Somfy Protect plugin HTTP API is enabled and configured correctly.');
|
|
112
131
|
return;
|
|
113
132
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
this.platform.log.info(`
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
133
|
+
const result = await response.json();
|
|
134
|
+
this.platform.log.info('ā Successfully disarmed alarm via HTTP API');
|
|
135
|
+
this.platform.log.info(`Response: ${JSON.stringify(result)}`);
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
if (error instanceof Error) {
|
|
139
|
+
if (error.message.includes('ECONNREFUSED')) {
|
|
140
|
+
this.platform.log.error(`Could not connect to Somfy Protect HTTP API on port ${this.platform.config.httpPort || 8581}`);
|
|
141
|
+
this.platform.log.error('Make sure the Somfy Protect plugin is running and HTTP API is enabled.');
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.platform.log.error('Error calling Somfy Protect HTTP API:', error.message);
|
|
145
|
+
}
|
|
122
146
|
}
|
|
123
147
|
else {
|
|
124
|
-
this.platform.log.error('
|
|
125
|
-
this.platform.log.error('Make sure both plugins are running on the Default Bridge (not child bridges).');
|
|
126
|
-
return;
|
|
148
|
+
this.platform.log.error('Unknown error calling Somfy Protect HTTP API:', error);
|
|
127
149
|
}
|
|
128
|
-
const targetAccessory = bridgedAccessories.find((acc) => acc.displayName === this.platform.config.alarmName);
|
|
129
|
-
if (!targetAccessory) {
|
|
130
|
-
this.platform.log.error(`Could not find alarm with name "${this.platform.config.alarmName}"`);
|
|
131
|
-
this.platform.log.error('Available accessories:');
|
|
132
|
-
bridgedAccessories.forEach((acc) => {
|
|
133
|
-
this.platform.log.error(` - "${acc.displayName}"`);
|
|
134
|
-
});
|
|
135
|
-
this.platform.log.error('Please update the "alarmName" setting to match exactly.');
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
this.platform.log.info(`Found target accessory: "${targetAccessory.displayName}"`);
|
|
139
|
-
const services = targetAccessory.services;
|
|
140
|
-
this.platform.log.info(` Services: ${services.map((s) => s.displayName || s.UUID).join(', ')}`);
|
|
141
|
-
const securityService = services.find((s) => s.UUID === this.platform.Service.SecuritySystem.UUID);
|
|
142
|
-
if (!securityService) {
|
|
143
|
-
this.platform.log.error(`Accessory "${targetAccessory.displayName}" does not have a SecuritySystem service`);
|
|
144
|
-
this.platform.log.error('Make sure this is the correct alarm accessory.');
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
this.platform.log.info('Found SecuritySystem service');
|
|
148
|
-
const targetStateChar = securityService.characteristics.find((c) => c.UUID === this.platform.Characteristic.SecuritySystemTargetState.UUID);
|
|
149
|
-
if (!targetStateChar) {
|
|
150
|
-
this.platform.log.error('SecuritySystem service does not have TargetState characteristic');
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
const DISARM = this.platform.Characteristic.SecuritySystemTargetState.DISARM;
|
|
154
|
-
this.platform.log.info(`Setting SecuritySystemTargetState to DISARM (${DISARM})...`);
|
|
155
|
-
targetStateChar.setValue(DISARM);
|
|
156
|
-
this.platform.log.info(`ā Successfully sent DISARM command to "${targetAccessory.displayName}"`);
|
|
157
|
-
}
|
|
158
|
-
catch (error) {
|
|
159
|
-
this.platform.log.error('Error disarming Somfy alarm:', error);
|
|
160
150
|
}
|
|
161
151
|
}
|
|
162
152
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mapp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AAQ,CAAC,cAAc,CAAC,EAAE,CAAC;oBAC3C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,uDAAuD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC;oBACxH,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;gBACpG,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBAClF,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,+CAA+C,EAAE,KAAK,CAAC,CAAC;YAClF,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@jay-d-tyler/homebridge-somfy-protect-automate",
|
|
3
3
|
"displayName": "Somfy Protect Automate",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "2.0.3",
|
|
6
6
|
"private": false,
|
|
7
7
|
"description": "A Homebridge plugin that provides a stateless switch to disarm Somfy Protect alarms via automations",
|
|
8
8
|
"author": "Jay Tyler",
|