Skip to content

Commit

Permalink
bump dep
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Feb 27, 2022
1 parent 916e083 commit 5628014
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
14 changes: 9 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Xbox TV",
"name": "homebridge-xbox-tv",
"version": "2.2.0",
"version": "2.2.1",
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Xbox game consoles.",
"license": "MIT",
"author": "grzegorz914",
Expand Down Expand Up @@ -37,7 +37,7 @@
"async-mqtt": "^2.6.2",
"elliptic": "^6.5.4",
"hex-to-binary": ">=1.0.1",
"jsrsasign": ">=10.5.1",
"jsrsasign": "^10.5.8",
"uuid": ">=8.3.2",
"uuid-parse": ">=1.1.0",
"xbox-webapi": ">=1.2.0"
Expand Down
3 changes: 2 additions & 1 deletion src/mqtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class MQTTCLIENT extends EventEmitter {
this.mqttAuth = config.auth;
this.mqttUser = config.user;
this.mqttPasswd = config.passwd;
this.mqttDebug = config.debug;
this.isConnected = false;

const run = this.mqttEnabled ? this.connect() : false;
Expand Down Expand Up @@ -43,7 +44,7 @@ class MQTTCLIENT extends EventEmitter {
try {
const fullTopic = `${this.mqttPrefix}/${this.mqttTopic}/${topic}`;
await this.mqttClient.publish(fullTopic, message);
this.emit('debug', `MQTT publish: ${fullTopic}: ${message}`);
const emitDebug = this.mqttDebug ? this.emit('debug', `MQTT publish: ${fullTopic}: ${message}`) : false;
} catch (error) {
await this.mqttClient.end();
this.isConnected = false;
Expand Down

0 comments on commit 5628014

Please sign in to comment.