homebridge-xbox-tv 2.7.7-beta.13 → 2.7.7-beta.15

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.
@@ -556,16 +556,47 @@
556
556
  "type": "string",
557
557
  "oneOf": [
558
558
  {
559
- "title": "View",
559
+ "title": "Game Pad View",
560
560
  "enum": [
561
561
  "view"
562
562
  ]
563
563
  },
564
564
  {
565
- "title": "Nexus",
565
+ "title": "Game Pad Nexus",
566
566
  "enum": [
567
567
  "nexus"
568
568
  ]
569
+ },
570
+ {
571
+ "title": "Game Pad Menu",
572
+ "enum": [
573
+ "menu1"
574
+ ]
575
+ },
576
+ {
577
+ "title": "Game Pad A",
578
+ "enum": [
579
+ "a"
580
+ ]
581
+ }
582
+ ,
583
+ {
584
+ "title": "Game Pad B",
585
+ "enum": [
586
+ "b"
587
+ ]
588
+ },
589
+ {
590
+ "title": "Game Pad X",
591
+ "enum": [
592
+ "x"
593
+ ]
594
+ },
595
+ {
596
+ "title": "Game Pad Y",
597
+ "enum": [
598
+ "y"
599
+ ]
569
600
  }
570
601
  ],
571
602
  "description": "Here select the function of info button in RC.",
@@ -805,13 +836,13 @@
805
836
  "expanded": false,
806
837
  "items": [
807
838
  "devices[].enableMqtt",
839
+ "devices[].mqttDebug",
808
840
  "devices[].mqttHost",
809
841
  "devices[].mqttPort",
810
842
  "devices[].mqttPrefix",
811
843
  "devices[].mqttAuth",
812
844
  "devices[].mqttUser",
813
- "devices[].mqttPasswd",
814
- "devices[].mqttDebug"
845
+ "devices[].mqttPasswd"
815
846
  ]
816
847
  }
817
848
  ]
package/index.js CHANGED
@@ -390,13 +390,13 @@ class XBOXDEVICE {
390
390
  this.televisionService = new Service.Television(`${accessoryName} Television`, 'Television');
391
391
  this.televisionService.getCharacteristic(Characteristic.ConfiguredName)
392
392
  .onGet(async () => {
393
- const logInfo = this.disableLogInfo ? false : this.log(`Device: ${this.host} ${accessoryName}.`);
393
+ const logInfo = this.disableLogInfo || this.firstRun ? false : this.log(`Device: ${this.host} Accessory Nane: ${accessoryName}.`);
394
394
  return accessoryName;
395
395
  })
396
396
  .onSet(async (value) => {
397
397
  try {
398
398
  this.name = value;
399
- const logInfo = this.disableLogInfo ? false : this.log(`Device: ${this.host} ${accessoryName}, set Accessory Name: ${value}`);
399
+ const logInfo = this.disableLogInfo || this.firstRun ? false : this.log(`Device: ${this.host} ${accessoryName}, set Accessory Name: ${value}`);
400
400
  } catch (error) {
401
401
  this.log.error(`Device: ${this.host} ${accessoryName}, set Brightness error: ${error}`);
402
402
  };
@@ -404,12 +404,12 @@ class XBOXDEVICE {
404
404
  this.televisionService.getCharacteristic(Characteristic.SleepDiscoveryMode)
405
405
  .onGet(async () => {
406
406
  const state = 1;
407
- const logInfo = this.disableLogInfo ? false : this.log(`Device: ${this.host} ${accessoryName}, Discovery Mode: ${state ? 'Always discoverable' : 'Not discoverable'}`);
407
+ const logInfo = this.disableLogInfo || this.firstRun ? false : this.log(`Device: ${this.host} ${accessoryName}, Discovery Mode: ${state ? 'Always Discoverable' : 'Not Discoverable'}`);
408
408
  return state;
409
409
  })
410
410
  .onSet(async (state) => {
411
411
  try {
412
- const logInfo = this.disableLogInfo ? false : this.log(`Device: ${this.host} ${accessoryName}, set Discovery Mode: ${state ? 'Always discoverable' : 'Not discoverable'}`);
412
+ const logInfo = this.disableLogInfo || this.firstRun ? false : this.log(`Device: ${this.host} ${accessoryName}, set Discovery Mode: ${state ? 'Always Discoverable' : 'Not Discoverable'}`);
413
413
  } catch (error) {
414
414
  this.log.error(`Device: ${this.host} ${accessoryName}, set Discovery Mode error: ${error}`);
415
415
  };
@@ -418,13 +418,13 @@ class XBOXDEVICE {
418
418
  this.televisionService.getCharacteristic(Characteristic.Active)
419
419
  .onGet(async () => {
420
420
  const state = this.power;
421
- const logInfo = this.disableLogInfo ? false : this.log(`Device: ${this.host} ${accessoryName}, Power: ${state ? 'ON' : 'OFF'}`);
421
+ const logInfo = this.disableLogInfo || this.firstRun ? false : this.log(`Device: ${this.host} ${accessoryName}, Power: ${state ? 'ON' : 'OFF'}`);
422
422
  return state;
423
423
  })
424
424
  .onSet(async (state) => {
425
425
  try {
426
426
  const setPower = state ? await this.xboxLocalApi.powerOn() : await this.xboxLocalApi.powerOff();
427
- const logInfo = this.disableLogInfo ? false : this.log(`Device: ${this.host} ${accessoryName}, set Power: ${state ? 'ON' : 'OFF'}`);
427
+ const logInfo = this.disableLogInfo || this.firstRun ? false : this.log(`Device: ${this.host} ${accessoryName}, set Power: ${state ? 'ON' : 'OFF'}`);
428
428
  } catch (error) {
429
429
  this.log.error(`Device: ${this.host} ${accessoryName}, set Power, error: ${error}`);
430
430
  };
@@ -770,10 +770,10 @@ class XBOXDEVICE {
770
770
 
771
771
  const newCustomName = JSON.stringify(savedInputsNames, null, 2);
772
772
  await fsPromises.writeFile(this.inputsNamesFile, newCustomName);
773
- const logDebug = this.enableDebugMode ? this.log(`Device: ${this.host} ${accessoryName}, saved Input: ${value}, Reference: ${nameIdentifier}.`) : false;
773
+ const logDebug = this.enableDebugMode ? this.log(`Device: ${this.host} ${accessoryName}, saved Input Name: ${value}, Reference: ${nameIdentifier}.`) : false;
774
774
  inputService.setCharacteristic(Characteristic.Name, inputName);
775
775
  } catch (error) {
776
- this.log.error(`Device: ${this.host} ${accessoryName}, save Input error: ${error}`);
776
+ this.log.error(`Device: ${this.host} ${accessoryName}, save Input Name error: ${error}`);
777
777
  }
778
778
  });
779
779
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "2.7.7-beta.13",
4
+ "version": "2.7.7-beta.15",
5
5
  "description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -67,7 +67,7 @@ class XBOXWEBAPI extends EventEmitter {
67
67
  }
68
68
  const debug = this.debugLog ? this.emit(`message', 'authorized and web Api enabled.`) : false;
69
69
  const rmEnabled = await this.getWebApiConsoleStatus();
70
- const debug1 = !rmEnabled ? this.emit('message', `remote management not enabled, please check your console settings!!!.`) : false;
70
+ const debug1 = !rmEnabled ? this.emit('message', `remote management not enabled, please check your console settings.`) : false;
71
71
  //await this.getWebApiConsolesList();
72
72
  await this.getWebApiInstalledApps();
73
73
  //await this.getWebApiStorageDevices();