diff --git a/CHANGELOG.md b/CHANGELOG.md index fc4c5ad..225af3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,17 @@ All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/). +## 0.8.2 (2024-12-27) + +## [Version 0.8.2](https://github.com/northernman54/homebridge-alexa/compare/v0.8.1...v0.8.2) + +#### Bug Fix + +- Doorbell events not being received + ## 0.8.1 (2024-12-24) -## [Version 0.8.0](https://github.com/northernman54/homebridge-alexa/compare/v0.8.0...v0.8.1) +## [Version 0.8.1](https://github.com/northernman54/homebridge-alexa/compare/v0.8.0...v0.8.1) #### Bug Fix diff --git a/package-lock.json b/package-lock.json index 9c406bc..2cc93e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "homebridge-alexa", - "version": "0.8.0", + "version": "0.8.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "homebridge-alexa", - "version": "0.8.0", + "version": "0.8.2", "license": "Apache-2.0", "dependencies": { "axios": "^1.7.9", diff --git a/package.json b/package.json index a42b3c3..fec6bf6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-alexa", - "version": "0.8.1", + "version": "0.8.2", "description": "Control your Homebridge devices with Amazon Alexa.", "main": "src/plugin.js", "scripts": { diff --git a/src/lib/alexaLocal.js b/src/lib/alexaLocal.js index 9fd92a5..84542a2 100644 --- a/src/lib/alexaLocal.js +++ b/src/lib/alexaLocal.js @@ -161,16 +161,25 @@ function handleError(err, options) { } function alexaEvent(message) { - publishMessage(`event/${username}/1`, message); + var topic = "event/" + username + "/1"; + var publish = function (callback) { + debug("Sending message", topic, JSON.stringify(message)); + connection.client.publish(topic, JSON.stringify(message), { + retain: false + }, callback); + }; + limiter.submit(publish); } function alexaPriorityEvent(message) { - limiter.submit({ priority: 4 }, publishMessage, `event/${username}/1`, message); -} - -function publishMessage(topic, message, callback) { - debug("Publishing message", topic, JSON.stringify(message)); - connection.client.publish(topic, JSON.stringify(message), { retain: false }, callback); + var topic = "event/" + username + "/1"; + var publish = function (callback) { + debug("Sending priority message", topic, JSON.stringify(message)); + connection.client.publish(topic, JSON.stringify(message), { + retain: false + }, callback); + }; + limiter.submit({ priority: 4 }, publish); } function createAlexaErrorResponse(message) {