homebridge-xbox-tv 2.13.7 → 2.13.8
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/package.json +4 -2
- package/src/mqtt.js +3 -1
- package/src/xboxdevice.js +1 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Xbox TV",
|
|
3
3
|
"name": "homebridge-xbox-tv",
|
|
4
|
-
"version": "2.13.
|
|
4
|
+
"version": "2.13.8",
|
|
5
5
|
"description": "Homebridge plugin to control Xbox game consoles.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
"homekit",
|
|
46
46
|
"xbox",
|
|
47
47
|
"microsoft",
|
|
48
|
-
"smartglass"
|
|
48
|
+
"smartglass",
|
|
49
|
+
"mqtt",
|
|
50
|
+
"restful"
|
|
49
51
|
],
|
|
50
52
|
"funding": {
|
|
51
53
|
"type": "github",
|
package/src/mqtt.js
CHANGED
|
@@ -28,7 +28,9 @@ class Mqtt extends EventEmitter {
|
|
|
28
28
|
try {
|
|
29
29
|
const subscribedMessage = JSON.parse(message.toString());
|
|
30
30
|
const emitDebug = config.debug ? this.emit('debug', `MQTT Received topic: ${topic}, message: ${JSON.stringify(subscribedMessage, null, 2)}`) : false;
|
|
31
|
-
|
|
31
|
+
const key = Object.keys(data)[0];
|
|
32
|
+
const value = Object.values(data)[0];
|
|
33
|
+
this.emit('subscribedMessage', key, value);
|
|
32
34
|
} catch (error) {
|
|
33
35
|
this.emit('error', `MQTT Parse message error: ${error}`);
|
|
34
36
|
};
|
package/src/xboxdevice.js
CHANGED
|
@@ -311,9 +311,7 @@ class XboxDevice extends EventEmitter {
|
|
|
311
311
|
.on('subscribed', (message) => {
|
|
312
312
|
this.emit('message', message);
|
|
313
313
|
})
|
|
314
|
-
.on('subscribedMessage', async (
|
|
315
|
-
const key = Object.keys(data)[0];
|
|
316
|
-
const value = Object.values(data)[0];
|
|
314
|
+
.on('subscribedMessage', async (key, value) => {
|
|
317
315
|
try {
|
|
318
316
|
switch (key) {
|
|
319
317
|
case 'Power':
|