@@ -24,7 +24,8 @@ export class HomebridgeEasyMQTT implements DynamicPlatformPlugin {
2424 private readonly log : Log ;
2525
2626 private readonly homekitAccessories : Map < string , HomeKitAccessory > = new Map ( ) ;
27- private readonly accessories : ( BaseAccessory < BaseAccessoryConfig > | GroupAccessory ) [ ] = [ ] ;
27+
28+ private readonly mqttAccessories : ( BaseAccessory < BaseAccessoryConfig > | GroupAccessory ) [ ] = [ ] ;
2829
2930 constructor (
3031 logger : Logger ,
@@ -37,12 +38,13 @@ export class HomebridgeEasyMQTT implements DynamicPlatformPlugin {
3738 this . log = new Log ( logger , config . verbose ) ;
3839
3940 this . log . ifVerbose (
40- 'v%s | System %s | Node %s | HB v%s | HAPNodeJS v%s' ,
41+ 'v%s | System %s | Node %s | HB v%s | HAPNodeJS v%s | Matter %s ' ,
4142 getVersion ( ) ,
4243 process . platform ,
4344 process . version ,
4445 api . serverVersion ,
4546 api . hap . HAPLibraryVersion ( ) ,
47+ api . isMatterEnabled ?.( ) === true ? 'Enabled' : 'Disabled' ,
4648 ) ;
4749
4850 initEveCharacteristics ( api ) ;
@@ -57,12 +59,12 @@ export class HomebridgeEasyMQTT implements DynamicPlatformPlugin {
5759 }
5860
5961 configureAccessory ( accessory : HomeKitAccessory ) : void {
60- this . log . ifVerbose ( strings . startup . restoringAccessory , accessory . displayName ) ;
62+ this . log . ifVerbose ( strings . startup . restoringHomeKitAccessory , accessory . displayName ) ;
6163 this . homekitAccessories . set ( accessory . context . identifier , accessory ) ;
6264 }
6365
6466 private teardown ( ) {
65- this . accessories . forEach ( accessory => {
67+ this . mqttAccessories . forEach ( accessory => {
6668 accessory . teardown ( ) ;
6769 } ) ;
6870 }
@@ -120,7 +122,7 @@ export class HomebridgeEasyMQTT implements DynamicPlatformPlugin {
120122 }
121123
122124 keepIdentifiers . add ( uuid ) ;
123- this . accessories . push ( accessory ) ;
125+ this . mqttAccessories . push ( accessory ) ;
124126 }
125127
126128 for ( const groupName of groups . keys ( ) ) {
@@ -140,17 +142,14 @@ export class HomebridgeEasyMQTT implements DynamicPlatformPlugin {
140142 const groupAccessory = new GroupAccessory ( dependency , groupName , configs ) ;
141143
142144 keepIdentifiers . add ( uuid ) ;
143- this . accessories . push ( groupAccessory ) ;
145+ this . mqttAccessories . push ( groupAccessory ) ;
144146 }
145147
146148 this . homekitAccessories . forEach ( accessory => {
147149 if ( ! keepIdentifiers . has ( accessory . context . identifier ) ) {
148150 this . removeHomeKitAccessory ( accessory ) ;
149151 }
150152 } ) ;
151-
152- const randIndex = Math . floor ( Math . random ( ) * strings . startup . welcome . length ) ;
153- this . log . always ( `${ strings . startup . complete } \n${ strings . startup . welcome [ randIndex ] } ` ) ;
154153 }
155154
156155 private createHomeKitAccessory ( name : string , uuid : string ) : HomeKitAccessory {
@@ -165,7 +164,7 @@ export class HomebridgeEasyMQTT implements DynamicPlatformPlugin {
165164
166165 this . homekitAccessories . set ( uuid , homekitAccessory ) ;
167166
168- this . log . always ( strings . startup . newAccessory , name ) ;
167+ this . log . always ( strings . startup . newHomeKitAccessory , name ) ;
169168 }
170169
171170 if ( name !== homekitAccessory . displayName ) {
@@ -176,7 +175,7 @@ export class HomebridgeEasyMQTT implements DynamicPlatformPlugin {
176175 }
177176
178177 private removeHomeKitAccessory ( accessory : HomeKitAccessory ) {
179- this . log . always ( strings . startup . removeAccessory , accessory . displayName ) ;
178+ this . log . always ( strings . startup . removeHomeKitAccessory , accessory . displayName ) ;
180179 this . api . unregisterPlatformAccessories ( PLUGIN_NAME , PLATFORM_NAME , [ accessory ] ) ;
181180 this . homekitAccessories . delete ( accessory . context . identifier ) ;
182181 }
0 commit comments