homebridge-cmd4 6.1.0 → 6.3.0-beta.1
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 +31 -6
- package/Cmd4AccDocGenerator.1 +1359 -0
- package/Cmd4Accessory.js +18 -0
- package/Cmd4Platform.js +6 -2
- package/Extras/Cmd4Scripts/State.js +168 -2374
- package/README.md +9 -2
- package/RUNNING_CHANGELOG.md +65 -0
- package/cmd4Constants.js +5 -0
- package/docs/Developers.md +3 -3
- package/index.js +14 -3
- package/lib/CMD4_ACC_TYPE_ENUM.js +193 -7
- package/lib/CMD4_DEVICE_TYPE_ENUM.js +322 -4
- package/package.json +2 -2
package/Cmd4Accessory.js
CHANGED
|
@@ -1483,6 +1483,24 @@ class Cmd4Accessory
|
|
|
1483
1483
|
case constants.SUBTYPE:
|
|
1484
1484
|
this.subType = value;
|
|
1485
1485
|
|
|
1486
|
+
break;
|
|
1487
|
+
case constants.MODEL:
|
|
1488
|
+
// createAccessorysInformationService uses these
|
|
1489
|
+
// to add to existing information service, when defined
|
|
1490
|
+
this.model = value;
|
|
1491
|
+
|
|
1492
|
+
break;
|
|
1493
|
+
case constants.MANUFACTURER:
|
|
1494
|
+
// createAccessorysInformationService uses these
|
|
1495
|
+
// to add to existing information service, when defined
|
|
1496
|
+
this.manufacturer = value;
|
|
1497
|
+
|
|
1498
|
+
break;
|
|
1499
|
+
case constants.SERIALNUMBER:
|
|
1500
|
+
// createAccessorysInformationService uses these
|
|
1501
|
+
// to add to existing information service, when defined
|
|
1502
|
+
this.serialNumber = value;
|
|
1503
|
+
|
|
1486
1504
|
break;
|
|
1487
1505
|
case constants.DISPLAYNAME:
|
|
1488
1506
|
// DisplayName is not a characteristic but used as a parm when
|
package/Cmd4Platform.js
CHANGED
|
@@ -658,7 +658,9 @@ class Cmd4Platform
|
|
|
658
658
|
if ( fromExisting == true )
|
|
659
659
|
{
|
|
660
660
|
if ( settings.cmd4Dbg ) this.log.debug( `Platform (AddedAccessory-existing) Step 3, ${ addedAccessory.displayName }.service = accessory.platform.getService( Service.${ devProperties.deviceName }, ${ addedAccessory.name }, ${ addedAccessory.subType }` );
|
|
661
|
-
|
|
661
|
+
// If you have added more than one service of the same type to an accessory, you will need to get the service using the name you defined when adding it.
|
|
662
|
+
//addedAccessory.service = addedAccessory.platform.getService( devProperties.service, addedAccessory.name, addedAccessory.subType );
|
|
663
|
+
addedAccessory.service = addedAccessory.platform.getService( addedAccessory.name, addedAccessory.subType );
|
|
662
664
|
} else
|
|
663
665
|
{
|
|
664
666
|
|
|
@@ -697,8 +699,10 @@ class Cmd4Platform
|
|
|
697
699
|
if ( fromExisting == true )
|
|
698
700
|
{
|
|
699
701
|
if ( settings.cmd4Dbg ) this.log.debug( `Platform (LinkedAccessory-existing) Step 4. ${ linkedAccessory.displayName }.service = ${ cmd4PlatformAccessory.displayName }.getService:( ${ devProperties.deviceName }.service, ${linkedAccessory.name }, ${linkedAccessory.subType } )` );
|
|
702
|
+
// If you have added more than one service of the same type to an accessory, you will need to get the service using the name you defined when adding it.
|
|
700
703
|
|
|
701
|
-
linkedAccessory.service = linkedAccessory.platform.getService( devProperties.service, linkedAccessory.name, linkedAccessory.subType );
|
|
704
|
+
//linkedAccessory.service = linkedAccessory.platform.getService( devProperties.service, linkedAccessory.name, linkedAccessory.subType );
|
|
705
|
+
linkedAccessory.service = linkedAccessory.platform.getService( linkedAccessory.name, linkedAccessory.subType );
|
|
702
706
|
} else
|
|
703
707
|
{
|
|
704
708
|
if ( settings.cmd4Dbg ) this.log.debug( `Platform (LinkedAccessory-new) Step 4. ${ linkedAccessory.displayName }.service = ${ cmd4PlatformAccessory.displayName }.addService:( ${ devProperties.deviceName }.service, ${linkedAccessory.name }, ${linkedAccessory.subType } )` );
|