homebridge-alexa 0.5.48 → 0.5.53
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/CHANGELOG.md +10 -0
- package/README.md +1 -3
- package/config.schema.json +0 -15
- package/lib/alexaActions.js +1 -1
- package/lib/parse/Characteristic.js +0 -6
- package/lib/parse/Service.js +0 -1
- package/lib/parse/messages.js +1 -37
- package/package.json +7 -7
- package/plugin.js +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 0.5.52 (2021-12-28)
|
|
6
|
+
|
|
7
|
+
## [Version 0.5.51](https://github.com/northernman54/homebridge-alexa/compare/v0.5.37...v0.5.52)
|
|
8
|
+
|
|
9
|
+
#### Changes
|
|
10
|
+
|
|
11
|
+
- Workaround for issue #481
|
|
12
|
+
- Cloud service connection tuning
|
|
13
|
+
- Jump version numbers
|
|
14
|
+
|
|
5
15
|
## 0.5.37 (2021-06-15)
|
|
6
16
|
|
|
7
17
|
## [Version 0.5.37](https://github.com/northernman54/homebridge-alexa/compare/v0.5.33...v0.5.37)
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<img src="docs/homebridge.png" height="200">
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
-
Enable Amazon Alexa to control your homebridge smart home devices and accessories. Full support for all Amazon Alexa devices, including the echo 2nd Generation and software based solutions. Uses an Amazon smart home skill based approach for integration between HomeBridge and Amazon Alexa.
|
|
9
|
+
Enable Amazon Alexa to control your homebridge smart home devices and accessories. Please note, that this does **NOT** bring Alexa enabled devices into homebridge. Full support for all Amazon Alexa devices, including the echo 2nd Generation and software based solutions. Uses an Amazon smart home skill based approach for integration between HomeBridge and Amazon Alexa.
|
|
10
10
|
|
|
11
11
|
Country availability - The plugin is available in these countries, English (AU), German (DE), English (CA), English (US), French (FR), English (UK), Italian (IT), English (IN), Spanish (ES), Japanese (JP), Spanish(US), Portuguese (BR) and Spanish (MX).
|
|
12
12
|
|
|
@@ -879,5 +879,3 @@ See [Roadmap](Roadmap.md)
|
|
|
879
879
|
* jelvs - Validate TV Integration for homebridge-samsung-tizen
|
|
880
880
|
* krocko - bose soundlink preset / channel change
|
|
881
881
|
* pwilms - deviceList feature
|
|
882
|
-
|
|
883
|
-
|
package/config.schema.json
CHANGED
|
@@ -58,12 +58,6 @@
|
|
|
58
58
|
"placeholder": "900",
|
|
59
59
|
"description": "Frequency of refreshes of the homebridge accessory cache, in seconds. Defaults to 15 minutes."
|
|
60
60
|
},
|
|
61
|
-
"keepalive": {
|
|
62
|
-
"title": "Cloud Server Connection Keepalive",
|
|
63
|
-
"type": "integer",
|
|
64
|
-
"placeholder": "1200",
|
|
65
|
-
"description": "Frequency of keepalive messages to cloud server, in seconds. Defaults to 20 minutes. Do not change from default unless requested as part of problem investigation."
|
|
66
|
-
},
|
|
67
61
|
"filter": {
|
|
68
62
|
"title": "Instance Filter",
|
|
69
63
|
"type": "string",
|
|
@@ -175,15 +169,6 @@
|
|
|
175
169
|
}
|
|
176
170
|
]
|
|
177
171
|
},
|
|
178
|
-
{
|
|
179
|
-
"type": "fieldset",
|
|
180
|
-
"title": "Advanced Settings",
|
|
181
|
-
"expandable": true,
|
|
182
|
-
"expanded": false,
|
|
183
|
-
"items": [
|
|
184
|
-
"keepalive"
|
|
185
|
-
]
|
|
186
|
-
},
|
|
187
172
|
{
|
|
188
173
|
"type": "fieldset",
|
|
189
174
|
"title": "Speakers",
|
package/lib/alexaActions.js
CHANGED
|
@@ -52,7 +52,6 @@ function _getActions(description, context, devices) {
|
|
|
52
52
|
var cookie = {};
|
|
53
53
|
var reportState = [];
|
|
54
54
|
var hapEvents = [];
|
|
55
|
-
debug("_getActions", description, devices);
|
|
56
55
|
switch (description) {
|
|
57
56
|
case "Active": // Active on a Fan 2 aka Dyson or Valve
|
|
58
57
|
case "On": // Accessory On/Off
|
|
@@ -93,7 +92,6 @@ function _getActions(description, context, devices) {
|
|
|
93
92
|
"iid": context.liid
|
|
94
93
|
})] = {
|
|
95
94
|
"endpointID": context.endpointID,
|
|
96
|
-
"friendlyName": context.name,
|
|
97
95
|
"true": "DETECTED",
|
|
98
96
|
"false": "NOT_DETECTED",
|
|
99
97
|
"1": "DETECTED",
|
|
@@ -120,7 +118,6 @@ function _getActions(description, context, devices) {
|
|
|
120
118
|
"iid": context.liid
|
|
121
119
|
})] = {
|
|
122
120
|
"endpointID": context.endpointID,
|
|
123
|
-
"friendlyName": context.name,
|
|
124
121
|
"0": "DETECTED", // Aka open for Alexa
|
|
125
122
|
"1": "NOT_DETECTED",
|
|
126
123
|
// "2": "DETECTED",
|
|
@@ -160,7 +157,6 @@ function _getActions(description, context, devices) {
|
|
|
160
157
|
"iid": context.liid
|
|
161
158
|
})] = {
|
|
162
159
|
"endpointID": context.endpointID,
|
|
163
|
-
"friendlyName": context.name,
|
|
164
160
|
"1": "DETECTED", // Aka open for Alexa
|
|
165
161
|
"0": "NOT_DETECTED",
|
|
166
162
|
"template": "ContactSensor"
|
|
@@ -176,7 +172,6 @@ function _getActions(description, context, devices) {
|
|
|
176
172
|
"iid": context.liid
|
|
177
173
|
})] = {
|
|
178
174
|
"endpointID": context.endpointID,
|
|
179
|
-
"friendlyName": context.name,
|
|
180
175
|
"0": "DETECTED", // Aka open for Alexa
|
|
181
176
|
"1": "NOT_DETECTED",
|
|
182
177
|
"template": "DoorbellEventSource"
|
|
@@ -258,7 +253,6 @@ function _getActions(description, context, devices) {
|
|
|
258
253
|
cookie["targetSetpoint"] = messages.cookie(context);
|
|
259
254
|
}
|
|
260
255
|
break;
|
|
261
|
-
case "Target Heater-Cooler State":
|
|
262
256
|
case "Target Heater Cooler State":
|
|
263
257
|
case "Target Heating Cooling State":
|
|
264
258
|
reportState.push(messages.reportState("Alexa.ThermostatControllerthermostatMode", context));
|
package/lib/parse/Service.js
CHANGED
|
@@ -35,7 +35,6 @@ function Service(devices, context) {
|
|
|
35
35
|
this.info = context.info;
|
|
36
36
|
this.characteristics = [];
|
|
37
37
|
this.linked = devices.linked;
|
|
38
|
-
this.name = context.name;
|
|
39
38
|
var endpointReg = /[^\w|_|-|=|#|;|:|?|@|&]/g; // Invalid characters in endpointid
|
|
40
39
|
this.endpointID = Buffer.from(this.id + "-" + context.homebridge + "-" + context.info.Manufacturer + "-" + context.info.Name + "-" + this.serviceType).toString('base64').replace(endpointReg, '#');
|
|
41
40
|
// this.endpointID = new Buffer(this.id + "-" + context.homebridge + "-" + context.info.Manufacturer + "-" + context.info.Name + "-" + this.serviceType).toString('base64');
|
package/lib/parse/messages.js
CHANGED
|
@@ -19,8 +19,7 @@ module.exports = {
|
|
|
19
19
|
round: round,
|
|
20
20
|
combine: combine,
|
|
21
21
|
channel: channel,
|
|
22
|
-
inputs: inputs
|
|
23
|
-
checkEventDeviceList: checkEventDeviceList
|
|
22
|
+
inputs: inputs
|
|
24
23
|
};
|
|
25
24
|
|
|
26
25
|
function createMessageId() {
|
|
@@ -1415,38 +1414,3 @@ function _getThermoMode(mode) {
|
|
|
1415
1414
|
return "AUTO";
|
|
1416
1415
|
}
|
|
1417
1416
|
}
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
function checkEventDeviceList(endpoints) {
|
|
1421
|
-
if (this.deviceList && this.deviceList.length > 0 && ['allow', 'deny'].includes(this.deviceListHandling)) {
|
|
1422
|
-
debug(`INFO: DeviceList - The following devices are ${this.deviceListHandling} =>`, this.deviceList);
|
|
1423
|
-
var response = [];
|
|
1424
|
-
// endpoints.forEach((endpoint) => {
|
|
1425
|
-
for (var key in endpoints) {
|
|
1426
|
-
var endpoint = endpoints[key];
|
|
1427
|
-
if (this.deviceListHandling === "allow") {
|
|
1428
|
-
if (verifyDeviceInList(this.deviceList, endpoint.friendlyName)) {
|
|
1429
|
-
response.push(endpoint);
|
|
1430
|
-
debug("INFO: DeviceList - allow =>", endpoint.friendlyName);
|
|
1431
|
-
}
|
|
1432
|
-
} else if (this.deviceListHandling === "deny") {
|
|
1433
|
-
if (verifyDeviceInList(this.deviceList, endpoint.friendlyName)) {
|
|
1434
|
-
debug("INFO: DeviceList - deny =>", endpoint.friendlyName);
|
|
1435
|
-
} else {
|
|
1436
|
-
response[key] = endpoint;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
return (response);
|
|
1441
|
-
} else {
|
|
1442
|
-
// this.log("INFO: DeviceList empty feature not enabled or config error in deviceListHandling");
|
|
1443
|
-
return endpoints;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
function verifyDeviceInList(deviceList, deviceName) {
|
|
1448
|
-
for (var i = 0, len = deviceList.length; i < len; i++) {
|
|
1449
|
-
if (deviceName === deviceList[i] || deviceName.match(new RegExp(deviceList[i]))) return true;
|
|
1450
|
-
}
|
|
1451
|
-
return false;
|
|
1452
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-alexa",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.53",
|
|
4
4
|
"description": "Control your Homebridge devices with Amazon Alexa.",
|
|
5
5
|
"main": "plugin.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"homebridge": ">=0.4.16"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"
|
|
35
|
+
"@oznu/hap-client": "^1.8.1",
|
|
36
|
+
"documentation": "^13.2.5",
|
|
36
37
|
"nodemon": "^2.0.4"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"debug": ">2.6.9",
|
|
40
|
+
"bottleneck": ">=2.19.5",
|
|
41
|
+
"debug": ">=4.3.3",
|
|
42
42
|
"hap-node-client": ">=0.1.16",
|
|
43
|
-
"is-my-json-valid": ">=2.
|
|
44
|
-
"mqtt": "
|
|
43
|
+
"is-my-json-valid": ">=2.20.6",
|
|
44
|
+
"mqtt": "4.2.7"
|
|
45
45
|
},
|
|
46
46
|
"author": "NorthernMan54",
|
|
47
47
|
"license": "Apache-2.0",
|
package/plugin.js
CHANGED
|
@@ -40,7 +40,6 @@ function alexaHome(log, config, api) {
|
|
|
40
40
|
this.deviceList = config['deviceList'] || []; // Use ea
|
|
41
41
|
this.door = config['door'] || false; // Use mode controller for Garage Doors
|
|
42
42
|
this.name = config['name'] || "homebridgeAlexa";
|
|
43
|
-
this.keepalive = config['keepalive'] || 1200; // MQTT Connection Keepalive
|
|
44
43
|
|
|
45
44
|
// Enable config based DEBUG logging enable
|
|
46
45
|
this.debug = config['debug'] || false;
|
|
@@ -104,7 +103,7 @@ alexaHome.prototype.didFinishLaunching = function() {
|
|
|
104
103
|
port: 1883
|
|
105
104
|
}],
|
|
106
105
|
reconnectPeriod: 65000,
|
|
107
|
-
keepalive:
|
|
106
|
+
keepalive: 1200, // Reduce client timeout to 20 minutes
|
|
108
107
|
// HAP Node Client options
|
|
109
108
|
pin: this.pin,
|
|
110
109
|
refresh: this.refresh,
|