homebridge-alexa 0.5.57 → 0.5.60-beta.2

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,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.60 (2021-01-17)
6
+
7
+ ## [Version 0.5.60](https://github.com/northernman54/homebridge-alexa/compare/v0.5.55...v0.5.60)
8
+
9
+ #### Changes
10
+
11
+ - Enable the usage of websockets instead of mqtt, to provide improved connectivity in some setups
12
+ - New configuration option `LegacyCloudTransport` which enables the mqtt transport
13
+ - Removed the Alexa contact sensor ( which shows the status of the connection to the cloud servers ) from the list of devices passed to Alexa.
14
+
5
15
  ## 0.5.54 (2021-01-03)
6
16
 
7
17
  ## [Version 0.5.54](https://github.com/northernman54/homebridge-alexa/compare/v0.5.52...v0.5.54)
@@ -67,10 +67,10 @@
67
67
  "maximum": 59
68
68
  },
69
69
  "LegacyCloudTransport": {
70
- "title": "Cloud Server Connection Transport",
70
+ "title": "Legacy Cloud Server Connection",
71
71
  "type": "boolean",
72
72
  "default": false,
73
- "description": "Enable Legacy Transport to Cloud Servers."
73
+ "description": "Enable Legacy Transport ( mqtt ) to Cloud Servers ( This is from version 0.5.55 or older )."
74
74
  },
75
75
  "filter": {
76
76
  "title": "Instance Filter",
package/lib/alexaLocal.js CHANGED
@@ -16,6 +16,7 @@ var checkAlexaMessage = Validator(alexaSchema, {
16
16
  verbose: true
17
17
  });
18
18
 
19
+ var connection;
19
20
  var count = 0;
20
21
  var username;
21
22
  var limiter;
@@ -48,7 +49,7 @@ function alexaLocal(options) {
48
49
  });
49
50
 
50
51
  username = options.mqttOptions.username;
51
- var connection = mqtt.connect(options.mqttURL, options.mqttOptions);
52
+ connection = mqtt.connect(options.mqttURL, options.mqttOptions);
52
53
  connection.on('connect', function() {
53
54
  debug('connect', "command/" + username + "/#");
54
55
  if (options.alexaService) {
@@ -57,7 +58,10 @@ function alexaLocal(options) {
57
58
  connection.subscribe("command/" + username + "/#");
58
59
  connection.publish("presence/" + username + "/1", JSON.stringify({
59
60
  Connected: options.username,
60
- version: packageConfig.version
61
+ version: packageConfig.version,
62
+ transport: options.transport,
63
+ keepalive: options.mqttOptions.keepalive,
64
+ routines: options.events
61
65
  }));
62
66
  });
63
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-alexa",
3
- "version": "0.5.57",
3
+ "version": "0.5.60-beta.2",
4
4
  "description": "Control your Homebridge devices with Amazon Alexa.",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
package/plugin.js CHANGED
@@ -106,6 +106,7 @@ alexaHome.prototype.didFinishLaunching = function() {
106
106
  log: this.log,
107
107
  debug: this.debug,
108
108
  mqttURL: (this.LegacyCloudTransport ? "mqtt://" + host + ":1883/" : "wss://" + host + "/ws"),
109
+ transport: (this.LegacyCloudTransport ? "mqtt" : "wss"),
109
110
  mqttOptions: {
110
111
  username: this.username,
111
112
  password: this.password,