homebridge-alexa 0.5.49 → 0.5.55

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 CHANGED
@@ -2,6 +2,17 @@
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.54 (2021-01-03)
6
+
7
+ ## [Version 0.5.54](https://github.com/northernman54/homebridge-alexa/compare/v0.5.52...v0.5.54)
8
+
9
+ #### Changes
10
+
11
+ - Merge current beta into master
12
+ - Expose cloud connection keep alive tuning parameter #479
13
+ - Extend filtering to routines event registration - Resolve #458 #459 #461 #465
14
+ - Reduce amount of logging
15
+
5
16
  ## 0.5.37 (2021-06-15)
6
17
 
7
18
  ## [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
-
@@ -61,8 +61,10 @@
61
61
  "keepalive": {
62
62
  "title": "Cloud Server Connection Keepalive",
63
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."
64
+ "placeholder": "20",
65
+ "description": "Frequency of keepalive messages to cloud server, in minutes. Defaults to 20 minutes. Do not change from default unless requested as part of problem investigation.",
66
+ "minimum": 1,
67
+ "maximum": 59
66
68
  },
67
69
  "filter": {
68
70
  "title": "Instance Filter",
@@ -36,9 +36,7 @@ function hapDiscovery(options) {
36
36
  alexaDiscovery.call(options, null, function() {
37
37
  // debug("Events", options);
38
38
  if (options.events) {
39
-
40
- registerEvents(messages.checkEventDeviceList.call(this, hbDevices.toEvents()));
41
-
39
+ registerEvents(messages.checkEventDeviceList.call(options, hbDevices.toEvents()));
42
40
  }
43
41
  });
44
42
  });
@@ -56,7 +54,6 @@ function registerEvents(message) {
56
54
  var HBMessage = [];
57
55
 
58
56
  for (var key in message) {
59
- // console.log("Key", key, JSON.parse(key));
60
57
  var endpoint = JSON.parse(key);
61
58
  var device = {
62
59
  "aid": endpoint.aid,
@@ -52,7 +52,7 @@ function _getActions(description, context, devices) {
52
52
  var cookie = {};
53
53
  var reportState = [];
54
54
  var hapEvents = [];
55
- debug("_getActions", description, devices);
55
+ // debug("_getActions", description, devices);
56
56
  switch (description) {
57
57
  case "Active": // Active on a Fan 2 aka Dyson or Valve
58
58
  case "On": // Accessory On/Off
@@ -1421,12 +1421,11 @@ function checkEventDeviceList(endpoints) {
1421
1421
  if (this.deviceList && this.deviceList.length > 0 && ['allow', 'deny'].includes(this.deviceListHandling)) {
1422
1422
  debug(`INFO: DeviceList - The following devices are ${this.deviceListHandling} =>`, this.deviceList);
1423
1423
  var response = [];
1424
- // endpoints.forEach((endpoint) => {
1425
1424
  for (var key in endpoints) {
1426
1425
  var endpoint = endpoints[key];
1427
1426
  if (this.deviceListHandling === "allow") {
1428
1427
  if (verifyDeviceInList(this.deviceList, endpoint.friendlyName)) {
1429
- response.push(endpoint);
1428
+ response[key] = endpoint;
1430
1429
  debug("INFO: DeviceList - allow =>", endpoint.friendlyName);
1431
1430
  }
1432
1431
  } else if (this.deviceListHandling === "deny") {
@@ -1439,7 +1438,7 @@ function checkEventDeviceList(endpoints) {
1439
1438
  }
1440
1439
  return (response);
1441
1440
  } else {
1442
- // this.log("INFO: DeviceList empty feature not enabled or config error in deviceListHandling");
1441
+ debug("INFO: DeviceList empty feature not enabled or config error in deviceListHandling");
1443
1442
  return endpoints;
1444
1443
  }
1445
1444
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-alexa",
3
- "version": "0.5.49",
3
+ "version": "0.5.55",
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
- "documentation": "^13.0.2",
35
+ "@oznu/hap-client": "^1.8.1",
36
+ "documentation": "^13.2.5",
36
37
  "nodemon": "^2.0.4"
37
38
  },
38
39
  "dependencies": {
39
- "@oznu/hap-client": "^1.7.2",
40
- "bottleneck": ">=2.18.0",
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.19.0",
44
- "mqtt": ">=2.18.8"
43
+ "is-my-json-valid": ">=2.20.6",
44
+ "mqtt": "4.2.8"
45
45
  },
46
46
  "author": "NorthernMan54",
47
47
  "license": "Apache-2.0",
package/plugin.js CHANGED
@@ -40,7 +40,14 @@ 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
43
+ var mqttKeepalive = config['keepalive'] || 20; // MQTT Connection Keepalive
44
+
45
+ if( mqttKeepalive < 60 )
46
+ {
47
+ this.keepalive = mqttKeepalive * 60;
48
+ } else {
49
+ this.keepalive = mqttKeepalive;
50
+ }
44
51
 
45
52
  // Enable config based DEBUG logging enable
46
53
  this.debug = config['debug'] || false;