homebridge 2.0.0-beta.34 → 2.0.0-beta.36
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/dist/api.d.ts +74 -32
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +48 -46
- package/dist/api.js.map +1 -1
- package/dist/api.spec.d.ts +2 -0
- package/dist/api.spec.d.ts.map +1 -0
- package/dist/api.spec.js +413 -0
- package/dist/api.spec.js.map +1 -0
- package/dist/childBridgeFork.d.ts +1 -18
- package/dist/childBridgeFork.d.ts.map +1 -1
- package/dist/childBridgeFork.js +21 -258
- package/dist/childBridgeFork.js.map +1 -1
- package/dist/externalPortService.d.ts +2 -9
- package/dist/externalPortService.d.ts.map +1 -1
- package/dist/externalPortService.js +20 -40
- package/dist/externalPortService.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/logger.spec.d.ts +2 -0
- package/dist/logger.spec.d.ts.map +1 -0
- package/dist/logger.spec.js +95 -0
- package/dist/logger.spec.js.map +1 -0
- package/dist/matter/ChildBridgeMatterManager.d.ts +96 -0
- package/dist/matter/ChildBridgeMatterManager.d.ts.map +1 -0
- package/dist/matter/ChildBridgeMatterManager.js +397 -0
- package/dist/matter/ChildBridgeMatterManager.js.map +1 -0
- package/dist/matter/ExternalMatterAccessoryPublisher.d.ts +48 -0
- package/dist/matter/ExternalMatterAccessoryPublisher.d.ts.map +1 -0
- package/dist/matter/ExternalMatterAccessoryPublisher.js +73 -0
- package/dist/matter/ExternalMatterAccessoryPublisher.js.map +1 -0
- package/dist/matter/ExternalMatterAccessoryPublisher.spec.d.ts +2 -0
- package/dist/matter/ExternalMatterAccessoryPublisher.spec.d.ts.map +1 -0
- package/dist/matter/ExternalMatterAccessoryPublisher.spec.js +293 -0
- package/dist/matter/ExternalMatterAccessoryPublisher.spec.js.map +1 -0
- package/dist/matter/{matterServer.d.ts → MatterAPIImpl.d.ts} +203 -367
- package/dist/matter/MatterAPIImpl.d.ts.map +1 -0
- package/dist/matter/MatterAPIImpl.js +305 -0
- package/dist/matter/MatterAPIImpl.js.map +1 -0
- package/dist/matter/MatterBridgeManager.d.ts +91 -0
- package/dist/matter/MatterBridgeManager.d.ts.map +1 -0
- package/dist/matter/MatterBridgeManager.js +426 -0
- package/dist/matter/MatterBridgeManager.js.map +1 -0
- package/dist/matter/MatterConfigCollector.d.ts +26 -0
- package/dist/matter/MatterConfigCollector.d.ts.map +1 -0
- package/dist/matter/MatterConfigCollector.js +78 -0
- package/dist/matter/MatterConfigCollector.js.map +1 -0
- package/dist/matter/{matterAccessoryCache.d.ts → accessoryCache.d.ts} +12 -3
- package/dist/matter/accessoryCache.d.ts.map +1 -0
- package/dist/matter/{matterAccessoryCache.js → accessoryCache.js} +32 -10
- package/dist/matter/accessoryCache.js.map +1 -0
- package/dist/matter/accessoryCache.spec.d.ts +2 -0
- package/dist/matter/accessoryCache.spec.d.ts.map +1 -0
- package/dist/matter/accessoryCache.spec.js +452 -0
- package/dist/matter/accessoryCache.spec.js.map +1 -0
- package/dist/matter/behaviors/BehaviorRegistry.d.ts +65 -0
- package/dist/matter/behaviors/BehaviorRegistry.d.ts.map +1 -0
- package/dist/matter/behaviors/BehaviorRegistry.js +139 -0
- package/dist/matter/behaviors/BehaviorRegistry.js.map +1 -0
- package/dist/matter/behaviors/BehaviorRegistry.spec.d.ts +2 -0
- package/dist/matter/behaviors/BehaviorRegistry.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/BehaviorRegistry.spec.js +307 -0
- package/dist/matter/behaviors/BehaviorRegistry.spec.js.map +1 -0
- package/dist/matter/behaviors/ColorControlBehavior.d.ts +64 -0
- package/dist/matter/behaviors/ColorControlBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/ColorControlBehavior.js +160 -0
- package/dist/matter/behaviors/ColorControlBehavior.js.map +1 -0
- package/dist/matter/behaviors/ColorControlBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/ColorControlBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/ColorControlBehavior.spec.js +29 -0
- package/dist/matter/behaviors/ColorControlBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/DoorLockBehavior.d.ts +21 -0
- package/dist/matter/behaviors/DoorLockBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/DoorLockBehavior.js +49 -0
- package/dist/matter/behaviors/DoorLockBehavior.js.map +1 -0
- package/dist/matter/behaviors/DoorLockBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/DoorLockBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/DoorLockBehavior.spec.js +108 -0
- package/dist/matter/behaviors/DoorLockBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/FanControlBehavior.d.ts +20 -0
- package/dist/matter/behaviors/FanControlBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/FanControlBehavior.js +45 -0
- package/dist/matter/behaviors/FanControlBehavior.js.map +1 -0
- package/dist/matter/behaviors/FanControlBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/FanControlBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/FanControlBehavior.spec.js +23 -0
- package/dist/matter/behaviors/FanControlBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/IdentifyBehavior.d.ts +21 -0
- package/dist/matter/behaviors/IdentifyBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/IdentifyBehavior.js +27 -0
- package/dist/matter/behaviors/IdentifyBehavior.js.map +1 -0
- package/dist/matter/behaviors/IdentifyBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/IdentifyBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/IdentifyBehavior.spec.js +64 -0
- package/dist/matter/behaviors/IdentifyBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/LevelControlBehavior.d.ts +34 -0
- package/dist/matter/behaviors/LevelControlBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/LevelControlBehavior.js +75 -0
- package/dist/matter/behaviors/LevelControlBehavior.js.map +1 -0
- package/dist/matter/behaviors/LevelControlBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/LevelControlBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/LevelControlBehavior.spec.js +140 -0
- package/dist/matter/behaviors/LevelControlBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/OnOffBehavior.d.ts +28 -0
- package/dist/matter/behaviors/OnOffBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/OnOffBehavior.js +63 -0
- package/dist/matter/behaviors/OnOffBehavior.js.map +1 -0
- package/dist/matter/behaviors/OnOffBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/OnOffBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/OnOffBehavior.spec.js +116 -0
- package/dist/matter/behaviors/OnOffBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/RvcCleanModeBehavior.d.ts +19 -0
- package/dist/matter/behaviors/RvcCleanModeBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/RvcCleanModeBehavior.js +27 -0
- package/dist/matter/behaviors/RvcCleanModeBehavior.js.map +1 -0
- package/dist/matter/behaviors/RvcCleanModeBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/RvcCleanModeBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/RvcCleanModeBehavior.spec.js +56 -0
- package/dist/matter/behaviors/RvcCleanModeBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/RvcOperationalStateBehavior.d.ts +23 -0
- package/dist/matter/behaviors/RvcOperationalStateBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/RvcOperationalStateBehavior.js +49 -0
- package/dist/matter/behaviors/RvcOperationalStateBehavior.js.map +1 -0
- package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.js +55 -0
- package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/RvcRunModeBehavior.d.ts +19 -0
- package/dist/matter/behaviors/RvcRunModeBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/RvcRunModeBehavior.js +27 -0
- package/dist/matter/behaviors/RvcRunModeBehavior.js.map +1 -0
- package/dist/matter/behaviors/RvcRunModeBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/RvcRunModeBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/RvcRunModeBehavior.spec.js +56 -0
- package/dist/matter/behaviors/RvcRunModeBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/ServiceAreaBehavior.d.ts +22 -0
- package/dist/matter/behaviors/ServiceAreaBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/ServiceAreaBehavior.js +35 -0
- package/dist/matter/behaviors/ServiceAreaBehavior.js.map +1 -0
- package/dist/matter/behaviors/ServiceAreaBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/ServiceAreaBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/ServiceAreaBehavior.spec.js +52 -0
- package/dist/matter/behaviors/ServiceAreaBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/ThermostatBehavior.d.ts +23 -0
- package/dist/matter/behaviors/ThermostatBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/ThermostatBehavior.js +79 -0
- package/dist/matter/behaviors/ThermostatBehavior.js.map +1 -0
- package/dist/matter/behaviors/ThermostatBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/ThermostatBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/ThermostatBehavior.spec.js +23 -0
- package/dist/matter/behaviors/ThermostatBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/WindowCoveringBehavior.d.ts +32 -0
- package/dist/matter/behaviors/WindowCoveringBehavior.d.ts.map +1 -0
- package/dist/matter/behaviors/WindowCoveringBehavior.js +106 -0
- package/dist/matter/behaviors/WindowCoveringBehavior.js.map +1 -0
- package/dist/matter/behaviors/WindowCoveringBehavior.spec.d.ts +2 -0
- package/dist/matter/behaviors/WindowCoveringBehavior.spec.d.ts.map +1 -0
- package/dist/matter/behaviors/WindowCoveringBehavior.spec.js +27 -0
- package/dist/matter/behaviors/WindowCoveringBehavior.spec.js.map +1 -0
- package/dist/matter/behaviors/index.d.ts +20 -0
- package/dist/matter/behaviors/index.d.ts.map +1 -0
- package/dist/matter/behaviors/index.js +21 -0
- package/dist/matter/behaviors/index.js.map +1 -0
- package/dist/matter/{matterConfigValidator.d.ts → configValidator.d.ts} +1 -1
- package/dist/matter/configValidator.d.ts.map +1 -0
- package/dist/matter/{matterConfigValidator.js → configValidator.js} +1 -1
- package/dist/matter/configValidator.js.map +1 -0
- package/dist/matter/configValidator.spec.d.ts +2 -0
- package/dist/matter/configValidator.spec.d.ts.map +1 -0
- package/dist/matter/configValidator.spec.js +390 -0
- package/dist/matter/configValidator.spec.js.map +1 -0
- package/dist/matter/errorHandler.d.ts +33 -0
- package/dist/matter/errorHandler.d.ts.map +1 -0
- package/dist/matter/errorHandler.js +113 -0
- package/dist/matter/errorHandler.js.map +1 -0
- package/dist/matter/errorHandler.spec.d.ts +2 -0
- package/dist/matter/errorHandler.spec.d.ts.map +1 -0
- package/dist/matter/errorHandler.spec.js +159 -0
- package/dist/matter/errorHandler.spec.js.map +1 -0
- package/dist/matter/index.d.ts +7 -4
- package/dist/matter/index.d.ts.map +1 -1
- package/dist/matter/index.js +7 -4
- package/dist/matter/index.js.map +1 -1
- package/dist/matter/{matterLogFormatter.d.ts → logFormatter.d.ts} +1 -1
- package/dist/matter/logFormatter.d.ts.map +1 -0
- package/dist/matter/{matterLogFormatter.js → logFormatter.js} +33 -6
- package/dist/matter/logFormatter.js.map +1 -0
- package/dist/matter/logFormatter.spec.d.ts +2 -0
- package/dist/matter/logFormatter.spec.d.ts.map +1 -0
- package/dist/matter/logFormatter.spec.js +284 -0
- package/dist/matter/logFormatter.spec.js.map +1 -0
- package/dist/matter/server.d.ts +350 -0
- package/dist/matter/server.d.ts.map +1 -0
- package/dist/matter/{matterServer.js → server.js} +533 -352
- package/dist/matter/server.js.map +1 -0
- package/dist/matter/{matterServerHelpers.d.ts → serverHelpers.d.ts} +2 -2
- package/dist/matter/serverHelpers.d.ts.map +1 -0
- package/dist/matter/{matterServerHelpers.js → serverHelpers.js} +11 -8
- package/dist/matter/serverHelpers.js.map +1 -0
- package/dist/matter/serverHelpers.spec.d.ts +2 -0
- package/dist/matter/serverHelpers.spec.d.ts.map +1 -0
- package/dist/matter/serverHelpers.spec.js +521 -0
- package/dist/matter/serverHelpers.spec.js.map +1 -0
- package/dist/matter/{matterSharedTypes.d.ts → sharedTypes.d.ts} +4 -10
- package/dist/matter/sharedTypes.d.ts.map +1 -0
- package/dist/matter/{matterSharedTypes.js → sharedTypes.js} +4 -10
- package/dist/matter/sharedTypes.js.map +1 -0
- package/dist/matter/{matterStorage.d.ts → storage.d.ts} +9 -2
- package/dist/matter/storage.d.ts.map +1 -0
- package/dist/matter/{matterStorage.js → storage.js} +14 -5
- package/dist/matter/{matterStorage.js.map → storage.js.map} +1 -1
- package/dist/matter/storage.spec.d.ts +2 -0
- package/dist/matter/storage.spec.d.ts.map +1 -0
- package/dist/matter/storage.spec.js +570 -0
- package/dist/matter/storage.spec.js.map +1 -0
- package/dist/matter/typeHelpers.d.ts +45 -0
- package/dist/matter/typeHelpers.d.ts.map +1 -0
- package/dist/matter/typeHelpers.js +57 -0
- package/dist/matter/typeHelpers.js.map +1 -0
- package/dist/matter/typeHelpers.spec.d.ts +2 -0
- package/dist/matter/typeHelpers.spec.d.ts.map +1 -0
- package/dist/matter/typeHelpers.spec.js +127 -0
- package/dist/matter/typeHelpers.spec.js.map +1 -0
- package/dist/matter/{matterTypes.d.ts → types.d.ts} +2 -2
- package/dist/matter/types.d.ts.map +1 -0
- package/dist/matter/{matterTypes.js → types.js} +1 -2
- package/dist/matter/types.js.map +1 -0
- package/dist/platformAccessory.spec.d.ts +2 -0
- package/dist/platformAccessory.spec.d.ts.map +1 -0
- package/dist/platformAccessory.spec.js +126 -0
- package/dist/platformAccessory.spec.js.map +1 -0
- package/dist/pluginManager.spec.d.ts +2 -0
- package/dist/pluginManager.spec.d.ts.map +1 -0
- package/dist/pluginManager.spec.js +43 -0
- package/dist/pluginManager.spec.js.map +1 -0
- package/dist/server.d.ts +4 -13
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +45 -333
- package/dist/server.js.map +1 -1
- package/dist/server.spec.d.ts +2 -0
- package/dist/server.spec.d.ts.map +1 -0
- package/dist/server.spec.js +57 -0
- package/dist/server.spec.js.map +1 -0
- package/dist/user.spec.d.ts +2 -0
- package/dist/user.spec.d.ts.map +1 -0
- package/dist/user.spec.js +31 -0
- package/dist/user.spec.js.map +1 -0
- package/dist/util/mac.spec.d.ts +2 -0
- package/dist/util/mac.spec.d.ts.map +1 -0
- package/dist/util/mac.spec.js +36 -0
- package/dist/util/mac.spec.js.map +1 -0
- package/dist/version.spec.d.ts +2 -0
- package/dist/version.spec.d.ts.map +1 -0
- package/dist/version.spec.js +20 -0
- package/dist/version.spec.js.map +1 -0
- package/package.json +4 -4
- package/dist/matter/matterAccessoryCache.d.ts.map +0 -1
- package/dist/matter/matterAccessoryCache.js.map +0 -1
- package/dist/matter/matterBehaviors.d.ts +0 -194
- package/dist/matter/matterBehaviors.d.ts.map +0 -1
- package/dist/matter/matterBehaviors.js +0 -665
- package/dist/matter/matterBehaviors.js.map +0 -1
- package/dist/matter/matterConfigValidator.d.ts.map +0 -1
- package/dist/matter/matterConfigValidator.js.map +0 -1
- package/dist/matter/matterErrorHandler.d.ts +0 -106
- package/dist/matter/matterErrorHandler.d.ts.map +0 -1
- package/dist/matter/matterErrorHandler.js +0 -495
- package/dist/matter/matterErrorHandler.js.map +0 -1
- package/dist/matter/matterLogFormatter.d.ts.map +0 -1
- package/dist/matter/matterLogFormatter.js.map +0 -1
- package/dist/matter/matterNetworkMonitor.d.ts +0 -68
- package/dist/matter/matterNetworkMonitor.d.ts.map +0 -1
- package/dist/matter/matterNetworkMonitor.js +0 -249
- package/dist/matter/matterNetworkMonitor.js.map +0 -1
- package/dist/matter/matterServer.d.ts.map +0 -1
- package/dist/matter/matterServer.js.map +0 -1
- package/dist/matter/matterServerHelpers.d.ts.map +0 -1
- package/dist/matter/matterServerHelpers.js.map +0 -1
- package/dist/matter/matterSharedTypes.d.ts.map +0 -1
- package/dist/matter/matterSharedTypes.js.map +0 -1
- package/dist/matter/matterStorage.d.ts.map +0 -1
- package/dist/matter/matterTypes.d.ts.map +0 -1
- package/dist/matter/matterTypes.js.map +0 -1
|
@@ -1,324 +1,120 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Matter
|
|
2
|
+
* Matter API Implementation
|
|
3
3
|
*
|
|
4
|
-
* This
|
|
5
|
-
*
|
|
4
|
+
* This class implements the Matter API facade, keeping Matter-specific logic
|
|
5
|
+
* separate from the core HomebridgeAPI class.
|
|
6
|
+
*
|
|
7
|
+
* Benefits:
|
|
8
|
+
* - Reduces changes to core api.ts file
|
|
9
|
+
* - Lazy-loads Matter code only when used
|
|
10
|
+
* - Clear separation between HAP and Matter
|
|
11
|
+
* - Easier to test in isolation
|
|
12
|
+
* - Validates accessories before registration
|
|
13
|
+
* - Provides detailed error messages for debugging
|
|
6
14
|
*/
|
|
7
15
|
import type { EndpointType } from '@matter/main';
|
|
8
|
-
import type {
|
|
9
|
-
import {
|
|
10
|
-
import * as clusters from '@matter/main/clusters';
|
|
11
|
-
import * as devices from '@matter/main/devices';
|
|
12
|
-
import { MatterServerConfig } from './matterSharedTypes.js';
|
|
13
|
-
import { MatterAccessory, MatterServerEvents } from './matterTypes.js';
|
|
14
|
-
export { MatterServerConfig } from './matterSharedTypes.js';
|
|
16
|
+
import type { HomebridgeAPI, MatterAPI, PlatformName, PluginIdentifier } from '../api.js';
|
|
17
|
+
import { clusters, MatterAccessory } from './index.js';
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* Extends EventEmitter to provide commissioning lifecycle events
|
|
19
|
+
* Implementation of the Matter API
|
|
20
|
+
* Delegates to the HomebridgeAPI instance for event emission and server access
|
|
21
|
+
* Provides validation and coordination for Matter accessory operations
|
|
20
22
|
*/
|
|
21
|
-
export declare class
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
removeListener: <K extends keyof MatterServerEvents>(event: K, listener: MatterServerEvents[K]) => this;
|
|
25
|
-
removeAllListeners: (event?: keyof MatterServerEvents) => this;
|
|
26
|
-
private readonly config;
|
|
27
|
-
private serverNode;
|
|
28
|
-
private aggregator;
|
|
29
|
-
private accessories;
|
|
30
|
-
private isRunning;
|
|
31
|
-
private readonly MAX_DEVICES;
|
|
32
|
-
private shutdownHandler;
|
|
33
|
-
private passcode;
|
|
34
|
-
private discriminator;
|
|
35
|
-
private readonly vendorId;
|
|
36
|
-
private readonly productId;
|
|
37
|
-
private commissioningInfo;
|
|
38
|
-
private serialNumber?;
|
|
39
|
-
private cleanupHandlers;
|
|
40
|
-
private storageManager;
|
|
41
|
-
private matterStoragePath?;
|
|
42
|
-
private accessoryCache;
|
|
43
|
-
private fabricMonitorInterval;
|
|
44
|
-
private previousFabrics;
|
|
45
|
-
constructor(config: MatterServerConfig);
|
|
46
|
-
/**
|
|
47
|
-
* Validate and sanitize Matter server configuration
|
|
48
|
-
* Throws descriptive errors if configuration is invalid
|
|
49
|
-
*/
|
|
50
|
-
private validateAndSanitizeConfig;
|
|
51
|
-
/**
|
|
52
|
-
* Generate a secure random passcode
|
|
53
|
-
* According to Matter spec, passcode must be:
|
|
54
|
-
* - 8 digits (00000001 to 99999998)
|
|
55
|
-
* - Not in the invalid list
|
|
56
|
-
* - Not sequential or repeating patterns
|
|
57
|
-
*/
|
|
58
|
-
private generateSecurePasscode;
|
|
59
|
-
/**
|
|
60
|
-
* Validate a passcode according to Matter specifications
|
|
61
|
-
*/
|
|
62
|
-
private isValidPasscode;
|
|
63
|
-
/**
|
|
64
|
-
* Generate a random discriminator
|
|
65
|
-
* According to Matter spec, discriminator must be:
|
|
66
|
-
* - 12 bits (0-4095)
|
|
67
|
-
* - Should be random for security
|
|
68
|
-
*/
|
|
69
|
-
private generateRandomDiscriminator;
|
|
70
|
-
/**
|
|
71
|
-
* Create ServerNode with automatic recovery from corrupted storage
|
|
72
|
-
*
|
|
73
|
-
* Matter.js can fail to start if fabric data is corrupted (common after
|
|
74
|
-
* hard shutdowns or disk errors). This method implements automatic recovery by:
|
|
75
|
-
*
|
|
76
|
-
* 1. Attempting normal ServerNode creation
|
|
77
|
-
* 2. If it fails with storage errors, identifying and removing corrupted files
|
|
78
|
-
* 3. Retrying ServerNode creation with fresh storage
|
|
79
|
-
*
|
|
80
|
-
* This prevents the need for manual intervention while preserving data
|
|
81
|
-
* safety by only removing storage on confirmed corruption errors.
|
|
82
|
-
*
|
|
83
|
-
* @param nodeOptions - Matter.js ServerNode configuration
|
|
84
|
-
* @param sanitizedId - Filesystem-safe bridge identifier
|
|
85
|
-
* @returns Initialized ServerNode instance
|
|
86
|
-
* @throws Error if recovery fails or error is not storage-related
|
|
87
|
-
*/
|
|
88
|
-
private createServerNodeWithRecovery;
|
|
89
|
-
/**
|
|
90
|
-
* Start the Matter server
|
|
91
|
-
*/
|
|
92
|
-
start(): Promise<void>;
|
|
93
|
-
/**
|
|
94
|
-
* Run the server after devices have been added (for external accessory mode)
|
|
95
|
-
* This must be called after registerPlatformAccessories() when using externalAccessory mode
|
|
96
|
-
*/
|
|
97
|
-
runServer(): Promise<void>;
|
|
98
|
-
/**
|
|
99
|
-
* Set up and validate storage
|
|
100
|
-
*/
|
|
101
|
-
private setupStorage;
|
|
102
|
-
/**
|
|
103
|
-
* Load or generate commissioning credentials (passcode and discriminator)
|
|
104
|
-
* These must be persistent across restarts to maintain the same QR code
|
|
105
|
-
*/
|
|
106
|
-
private loadOrGenerateCredentials;
|
|
107
|
-
/**
|
|
108
|
-
* Generate and display commissioning information
|
|
109
|
-
*/
|
|
110
|
-
private generateCommissioningInfo;
|
|
111
|
-
/**
|
|
112
|
-
* Wait for the server to be ready
|
|
113
|
-
*/
|
|
114
|
-
private waitForServerReady;
|
|
115
|
-
/**
|
|
116
|
-
* Start monitoring fabric changes to emit commissioning events
|
|
117
|
-
*/
|
|
118
|
-
private startFabricMonitoring;
|
|
119
|
-
/**
|
|
120
|
-
* Stop fabric monitoring
|
|
121
|
-
*/
|
|
122
|
-
private stopFabricMonitoring;
|
|
123
|
-
/**
|
|
124
|
-
* Check for fabric changes and emit appropriate events
|
|
125
|
-
*/
|
|
126
|
-
private checkFabricChanges;
|
|
127
|
-
/**
|
|
128
|
-
* Update commissioning info file when commissioning state changes
|
|
129
|
-
*/
|
|
130
|
-
private updateCommissioningFile;
|
|
131
|
-
/**
|
|
132
|
-
* Register Matter platform accessories (Plugin API - matches HAP pattern)
|
|
133
|
-
*/
|
|
134
|
-
registerPlatformAccessories(pluginIdentifier: string, platformName: string, accessories: MatterAccessory[]): Promise<void>;
|
|
135
|
-
/**
|
|
136
|
-
* Unregister Matter platform accessories (Plugin API - matches HAP pattern)
|
|
137
|
-
*/
|
|
138
|
-
unregisterPlatformAccessories(pluginIdentifier: string, platformName: string, accessories: MatterAccessory[]): Promise<void>;
|
|
139
|
-
/**
|
|
140
|
-
* Register a single Matter accessory (internal method)
|
|
141
|
-
*/
|
|
142
|
-
private registerAccessory;
|
|
143
|
-
/**
|
|
144
|
-
* Unregister a Matter accessory (Plugin API)
|
|
145
|
-
*/
|
|
146
|
-
unregisterAccessory(uuid: string): Promise<void>;
|
|
147
|
-
/**
|
|
148
|
-
* Update a Matter accessory's state (Plugin API)
|
|
149
|
-
*
|
|
150
|
-
* This method can be called from anywhere, including from within handlers.
|
|
151
|
-
* State updates are automatically deferred to avoid transaction conflicts.
|
|
152
|
-
*
|
|
153
|
-
* @param uuid - The UUID of the accessory
|
|
154
|
-
* @param cluster - The cluster name
|
|
155
|
-
* @param attributes - The attributes to update
|
|
156
|
-
* @param partId - Optional: ID of the part to update (for composed devices)
|
|
157
|
-
*/
|
|
158
|
-
updateAccessoryState(uuid: string, cluster: string, attributes: Record<string, unknown>, partId?: string): Promise<void>;
|
|
159
|
-
/**
|
|
160
|
-
* Get a Matter accessory's current state (Plugin API)
|
|
161
|
-
*
|
|
162
|
-
* Returns the current cluster attribute values that are exposed to Matter controllers.
|
|
163
|
-
* This is useful for:
|
|
164
|
-
* - Reading state after plugin restart (when local variables are lost)
|
|
165
|
-
* - Verifying current state before making changes
|
|
166
|
-
* - Multiple parts of code that need to read state
|
|
167
|
-
* - Debugging and logging
|
|
168
|
-
*
|
|
169
|
-
* @param uuid - The UUID of the accessory
|
|
170
|
-
* @param cluster - The cluster name (e.g., 'onOff', 'levelControl')
|
|
171
|
-
* @param partId - Optional: ID of the part to get state from (for composed devices)
|
|
172
|
-
* @returns Current cluster attribute values, or undefined if cluster not found
|
|
173
|
-
*/
|
|
174
|
-
getAccessoryState(uuid: string, cluster: string, partId?: string): Record<string, unknown> | undefined;
|
|
175
|
-
/**
|
|
176
|
-
* Get all cached accessories (Internal - for restore process)
|
|
177
|
-
* @internal
|
|
178
|
-
*/
|
|
179
|
-
getAllCachedAccessories(): SerializedMatterAccessory[];
|
|
180
|
-
/**
|
|
181
|
-
* Get all registered accessories (Plugin API)
|
|
182
|
-
*/
|
|
183
|
-
getAccessories(): MatterAccessory[];
|
|
184
|
-
/**
|
|
185
|
-
* Get a specific accessory by UUID (Plugin API)
|
|
186
|
-
*/
|
|
187
|
-
getAccessory(uuid: string): MatterAccessory | undefined;
|
|
188
|
-
/**
|
|
189
|
-
* Stop the Matter server
|
|
190
|
-
*/
|
|
191
|
-
stop(): Promise<void>;
|
|
23
|
+
export declare class MatterAPIImpl implements MatterAPI {
|
|
24
|
+
private readonly api;
|
|
25
|
+
constructor(api: HomebridgeAPI);
|
|
192
26
|
/**
|
|
193
|
-
*
|
|
27
|
+
* Validate a Matter accessory has required fields
|
|
28
|
+
* @throws MatterAccessoryValidationError if validation fails
|
|
194
29
|
*/
|
|
195
|
-
private
|
|
30
|
+
private validateAccessory;
|
|
196
31
|
/**
|
|
197
|
-
*
|
|
32
|
+
* Validate an array of accessories, logging errors for invalid ones
|
|
33
|
+
* @returns Array of valid accessories only
|
|
198
34
|
*/
|
|
199
|
-
|
|
200
|
-
fabricIndex: number;
|
|
201
|
-
fabricId: string;
|
|
202
|
-
nodeId: string;
|
|
203
|
-
rootVendorId: number;
|
|
204
|
-
label?: string;
|
|
205
|
-
}>;
|
|
35
|
+
private validateAccessories;
|
|
206
36
|
/**
|
|
207
|
-
*
|
|
37
|
+
* Validate cluster name is valid
|
|
208
38
|
*/
|
|
209
|
-
|
|
39
|
+
private validateClusterName;
|
|
210
40
|
/**
|
|
211
|
-
*
|
|
41
|
+
* UUID generator (alias of api.hap.uuid for convenience)
|
|
212
42
|
*/
|
|
213
|
-
|
|
43
|
+
get uuid(): typeof import("hap-nodejs/dist/lib/util/uuid.js");
|
|
214
44
|
/**
|
|
215
|
-
*
|
|
45
|
+
* Matter device types for creating accessories
|
|
216
46
|
*/
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
passcode?: number;
|
|
233
|
-
discriminator?: number;
|
|
234
|
-
commissioned: boolean;
|
|
235
|
-
};
|
|
236
|
-
/**
|
|
237
|
-
* Get storage statistics
|
|
238
|
-
*/
|
|
239
|
-
getStorageStats(): Array<{
|
|
240
|
-
entries: number;
|
|
241
|
-
namespace: string;
|
|
242
|
-
path: string;
|
|
243
|
-
}> | null;
|
|
244
|
-
/**
|
|
245
|
-
* Check if server is running
|
|
246
|
-
*/
|
|
247
|
-
isServerRunning(): boolean;
|
|
248
|
-
/**
|
|
249
|
-
* Get Matter device types available for plugin use
|
|
250
|
-
*/
|
|
251
|
-
getDeviceTypes(): {
|
|
252
|
-
readonly OnOffLight: devices.OnOffLightDevice;
|
|
253
|
-
readonly DimmableLight: devices.DimmableLightDevice;
|
|
254
|
-
readonly ColorTemperatureLight: devices.ColorTemperatureLightDevice;
|
|
255
|
-
readonly ExtendedColorLight: devices.ExtendedColorLightDevice;
|
|
256
|
-
readonly OnOffSwitch: devices.OnOffLightSwitchDevice;
|
|
257
|
-
readonly OnOffOutlet: devices.OnOffPlugInUnitDevice;
|
|
258
|
-
readonly DimmableOutlet: devices.DimmablePlugInUnitDevice;
|
|
259
|
-
readonly TemperatureSensor: devices.TemperatureSensorDevice;
|
|
260
|
-
readonly HumiditySensor: devices.HumiditySensorDevice;
|
|
261
|
-
readonly LightSensor: devices.LightSensorDevice;
|
|
262
|
-
readonly MotionSensor: devices.OccupancySensorDevice;
|
|
263
|
-
readonly ContactSensor: devices.ContactSensorDevice;
|
|
264
|
-
readonly LeakSensor: devices.WaterLeakDetectorDevice;
|
|
265
|
-
readonly SmokeSensor: devices.SmokeCoAlarmDevice;
|
|
47
|
+
get deviceTypes(): {
|
|
48
|
+
readonly OnOffLight: import("@matter/node/devices").OnOffLightDevice;
|
|
49
|
+
readonly DimmableLight: import("@matter/node/devices").DimmableLightDevice;
|
|
50
|
+
readonly ColorTemperatureLight: import("@matter/node/devices").ColorTemperatureLightDevice;
|
|
51
|
+
readonly ExtendedColorLight: import("@matter/node/devices").ExtendedColorLightDevice;
|
|
52
|
+
readonly OnOffSwitch: import("@matter/node/devices").OnOffLightSwitchDevice;
|
|
53
|
+
readonly OnOffOutlet: import("@matter/node/devices").OnOffPlugInUnitDevice;
|
|
54
|
+
readonly DimmableOutlet: import("@matter/node/devices").DimmablePlugInUnitDevice;
|
|
55
|
+
readonly TemperatureSensor: import("@matter/node/devices").TemperatureSensorDevice;
|
|
56
|
+
readonly HumiditySensor: import("@matter/node/devices").HumiditySensorDevice;
|
|
57
|
+
readonly LightSensor: import("@matter/node/devices").LightSensorDevice;
|
|
58
|
+
readonly MotionSensor: import("@matter/node/devices").OccupancySensorDevice;
|
|
59
|
+
readonly ContactSensor: import("@matter/node/devices").ContactSensorDevice;
|
|
60
|
+
readonly LeakSensor: import("@matter/node/devices").WaterLeakDetectorDevice;
|
|
61
|
+
readonly SmokeSensor: import("@matter/node/devices").SmokeCoAlarmDevice;
|
|
266
62
|
readonly Thermostat: import("@matter/main").MutableEndpoint.With<EndpointType.For<{
|
|
267
63
|
readonly name: "Thermostat";
|
|
268
64
|
readonly deviceType: 769;
|
|
269
65
|
readonly deviceRevision: 4;
|
|
270
|
-
readonly requirements: typeof devices.ThermostatRequirements;
|
|
66
|
+
readonly requirements: typeof import("@matter/node/devices").ThermostatRequirements;
|
|
271
67
|
readonly behaviors: {
|
|
272
|
-
readonly identify: typeof import("@matter/
|
|
68
|
+
readonly identify: typeof import("@matter/node/behaviors").IdentifyServer;
|
|
273
69
|
};
|
|
274
70
|
}>, import("@matter/main").SupportedBehaviors.With<{
|
|
275
|
-
readonly identify: typeof import("@matter/
|
|
71
|
+
readonly identify: typeof import("@matter/node/behaviors").IdentifyServer;
|
|
276
72
|
}, readonly [import("@matter/main").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
|
|
277
73
|
readonly id: 513;
|
|
278
74
|
readonly name: "Thermostat";
|
|
279
|
-
readonly revision:
|
|
75
|
+
readonly revision: 9;
|
|
280
76
|
readonly features: {
|
|
281
|
-
readonly heating: import("@matter/types
|
|
282
|
-
readonly cooling: import("@matter/types
|
|
283
|
-
readonly occupancy: import("@matter/types
|
|
284
|
-
readonly scheduleConfiguration: import("@matter/types
|
|
285
|
-
readonly setback: import("@matter/types
|
|
286
|
-
readonly autoMode: import("@matter/types
|
|
287
|
-
readonly localTemperatureNotExposed: import("@matter/types
|
|
288
|
-
readonly matterScheduleConfiguration: import("@matter/types
|
|
289
|
-
readonly presets: import("@matter/types
|
|
77
|
+
readonly heating: import("@matter/types").BitFlag;
|
|
78
|
+
readonly cooling: import("@matter/types").BitFlag;
|
|
79
|
+
readonly occupancy: import("@matter/types").BitFlag;
|
|
80
|
+
readonly scheduleConfiguration: import("@matter/types").BitFlag;
|
|
81
|
+
readonly setback: import("@matter/types").BitFlag;
|
|
82
|
+
readonly autoMode: import("@matter/types").BitFlag;
|
|
83
|
+
readonly localTemperatureNotExposed: import("@matter/types").BitFlag;
|
|
84
|
+
readonly matterScheduleConfiguration: import("@matter/types").BitFlag;
|
|
85
|
+
readonly presets: import("@matter/types").BitFlag;
|
|
290
86
|
};
|
|
291
87
|
readonly attributes: {
|
|
292
88
|
readonly localTemperature: import("@matter/types").Attribute<number | null, any>;
|
|
293
89
|
readonly outdoorTemperature: import("@matter/types").OptionalAttribute<number | null, any>;
|
|
294
|
-
readonly hvacSystemTypeConfiguration: import("@matter/types").OptionalWritableAttribute<import("@matter/types
|
|
295
|
-
coolingStage: import("@matter/types
|
|
296
|
-
heatingStage: import("@matter/types
|
|
297
|
-
heatingIsHeatPump: import("@matter/types
|
|
298
|
-
heatingUsesFuel: import("@matter/types
|
|
90
|
+
readonly hvacSystemTypeConfiguration: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
|
|
91
|
+
coolingStage: import("@matter/types").BitField;
|
|
92
|
+
heatingStage: import("@matter/types").BitField;
|
|
93
|
+
heatingIsHeatPump: import("@matter/types").BitFlag;
|
|
94
|
+
heatingUsesFuel: import("@matter/types").BitFlag;
|
|
299
95
|
}>, any>;
|
|
300
|
-
readonly remoteSensing: import("@matter/types").OptionalWritableAttribute<import("@matter/types
|
|
301
|
-
localTemperature: import("@matter/types
|
|
302
|
-
outdoorTemperature: import("@matter/types
|
|
303
|
-
occupancy: import("@matter/types
|
|
96
|
+
readonly remoteSensing: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
|
|
97
|
+
localTemperature: import("@matter/types").BitFlag;
|
|
98
|
+
outdoorTemperature: import("@matter/types").BitFlag;
|
|
99
|
+
occupancy: import("@matter/types").BitFlag;
|
|
304
100
|
}>, any>;
|
|
305
101
|
readonly controlSequenceOfOperation: import("@matter/types").WritableAttribute<clusters.Thermostat.ControlSequenceOfOperation, any>;
|
|
306
102
|
readonly systemMode: import("@matter/types").WritableAttribute<clusters.Thermostat.SystemMode, any>;
|
|
307
103
|
readonly temperatureSetpointHold: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.TemperatureSetpointHold, any>;
|
|
308
104
|
readonly temperatureSetpointHoldDuration: import("@matter/types").OptionalWritableAttribute<number | null, any>;
|
|
309
|
-
readonly thermostatProgrammingOperationMode: import("@matter/types").OptionalWritableAttribute<import("@matter/types
|
|
310
|
-
scheduleActive: import("@matter/types
|
|
311
|
-
autoRecovery: import("@matter/types
|
|
312
|
-
economy: import("@matter/types
|
|
105
|
+
readonly thermostatProgrammingOperationMode: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
|
|
106
|
+
scheduleActive: import("@matter/types").BitFlag;
|
|
107
|
+
autoRecovery: import("@matter/types").BitFlag;
|
|
108
|
+
economy: import("@matter/types").BitFlag;
|
|
313
109
|
}>, any>;
|
|
314
|
-
readonly thermostatRunningState: import("@matter/types").OptionalAttribute<import("@matter/types
|
|
315
|
-
heat: import("@matter/types
|
|
316
|
-
cool: import("@matter/types
|
|
317
|
-
fan: import("@matter/types
|
|
318
|
-
heatStage2: import("@matter/types
|
|
319
|
-
coolStage2: import("@matter/types
|
|
320
|
-
fanStage2: import("@matter/types
|
|
321
|
-
fanStage3: import("@matter/types
|
|
110
|
+
readonly thermostatRunningState: import("@matter/types").OptionalAttribute<import("@matter/types").TypeFromPartialBitSchema<{
|
|
111
|
+
heat: import("@matter/types").BitFlag;
|
|
112
|
+
cool: import("@matter/types").BitFlag;
|
|
113
|
+
fan: import("@matter/types").BitFlag;
|
|
114
|
+
heatStage2: import("@matter/types").BitFlag;
|
|
115
|
+
coolStage2: import("@matter/types").BitFlag;
|
|
116
|
+
fanStage2: import("@matter/types").BitFlag;
|
|
117
|
+
fanStage3: import("@matter/types").BitFlag;
|
|
322
118
|
}>, any>;
|
|
323
119
|
readonly setpointChangeSource: import("@matter/types").OptionalAttribute<clusters.Thermostat.SetpointChangeSource, any>;
|
|
324
120
|
readonly setpointChangeAmount: import("@matter/types").OptionalAttribute<number | null, any>;
|
|
@@ -328,12 +124,12 @@ export declare class MatterServer extends EventEmitter {
|
|
|
328
124
|
readonly acCapacity: import("@matter/types").OptionalWritableAttribute<number, any>;
|
|
329
125
|
readonly acRefrigerantType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcRefrigerantType, any>;
|
|
330
126
|
readonly acCompressorType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcCompressorType, any>;
|
|
331
|
-
readonly acErrorCode: import("@matter/types").OptionalWritableAttribute<import("@matter/types
|
|
332
|
-
compressorFail: import("@matter/types
|
|
333
|
-
roomSensorFail: import("@matter/types
|
|
334
|
-
outdoorSensorFail: import("@matter/types
|
|
335
|
-
coilSensorFail: import("@matter/types
|
|
336
|
-
fanFail: import("@matter/types
|
|
127
|
+
readonly acErrorCode: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
|
|
128
|
+
compressorFail: import("@matter/types").BitFlag;
|
|
129
|
+
roomSensorFail: import("@matter/types").BitFlag;
|
|
130
|
+
outdoorSensorFail: import("@matter/types").BitFlag;
|
|
131
|
+
coilSensorFail: import("@matter/types").BitFlag;
|
|
132
|
+
fanFail: import("@matter/types").BitFlag;
|
|
337
133
|
}>, any>;
|
|
338
134
|
readonly acLouverPosition: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcLouverPosition, any>;
|
|
339
135
|
readonly acCoilTemperature: import("@matter/types").OptionalAttribute<number | null, any>;
|
|
@@ -352,8 +148,8 @@ export declare class MatterServer extends EventEmitter {
|
|
|
352
148
|
};
|
|
353
149
|
readonly component: {
|
|
354
150
|
readonly attributes: {
|
|
355
|
-
readonly occupancy: import("@matter/types").Attribute<import("@matter/types
|
|
356
|
-
occupied: import("@matter/types
|
|
151
|
+
readonly occupancy: import("@matter/types").Attribute<import("@matter/types").TypeFromPartialBitSchema<{
|
|
152
|
+
occupied: import("@matter/types").BitFlag;
|
|
357
153
|
}>, any>;
|
|
358
154
|
};
|
|
359
155
|
};
|
|
@@ -437,19 +233,19 @@ export declare class MatterServer extends EventEmitter {
|
|
|
437
233
|
readonly commands: {
|
|
438
234
|
readonly setWeeklySchedule: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
|
|
439
235
|
numberOfTransitionsForSequence: import("@matter/types").FieldType<number>;
|
|
440
|
-
dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types
|
|
441
|
-
sunday: import("@matter/types
|
|
442
|
-
monday: import("@matter/types
|
|
443
|
-
tuesday: import("@matter/types
|
|
444
|
-
wednesday: import("@matter/types
|
|
445
|
-
thursday: import("@matter/types
|
|
446
|
-
friday: import("@matter/types
|
|
447
|
-
saturday: import("@matter/types
|
|
448
|
-
away: import("@matter/types
|
|
236
|
+
dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
237
|
+
sunday: import("@matter/types").BitFlag;
|
|
238
|
+
monday: import("@matter/types").BitFlag;
|
|
239
|
+
tuesday: import("@matter/types").BitFlag;
|
|
240
|
+
wednesday: import("@matter/types").BitFlag;
|
|
241
|
+
thursday: import("@matter/types").BitFlag;
|
|
242
|
+
friday: import("@matter/types").BitFlag;
|
|
243
|
+
saturday: import("@matter/types").BitFlag;
|
|
244
|
+
away: import("@matter/types").BitFlag;
|
|
449
245
|
}>>;
|
|
450
|
-
modeForSequence: import("@matter/types").FieldType<import("@matter/types
|
|
451
|
-
heatSetpointPresent: import("@matter/types
|
|
452
|
-
coolSetpointPresent: import("@matter/types
|
|
246
|
+
modeForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
247
|
+
heatSetpointPresent: import("@matter/types").BitFlag;
|
|
248
|
+
coolSetpointPresent: import("@matter/types").BitFlag;
|
|
453
249
|
}>>;
|
|
454
250
|
transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
|
|
455
251
|
transitionTime: import("@matter/types").FieldType<number>;
|
|
@@ -458,35 +254,35 @@ export declare class MatterServer extends EventEmitter {
|
|
|
458
254
|
}>[]>;
|
|
459
255
|
}>, void, any>;
|
|
460
256
|
readonly getWeeklySchedule: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
|
|
461
|
-
daysToReturn: import("@matter/types").FieldType<import("@matter/types
|
|
462
|
-
sunday: import("@matter/types
|
|
463
|
-
monday: import("@matter/types
|
|
464
|
-
tuesday: import("@matter/types
|
|
465
|
-
wednesday: import("@matter/types
|
|
466
|
-
thursday: import("@matter/types
|
|
467
|
-
friday: import("@matter/types
|
|
468
|
-
saturday: import("@matter/types
|
|
469
|
-
away: import("@matter/types
|
|
257
|
+
daysToReturn: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
258
|
+
sunday: import("@matter/types").BitFlag;
|
|
259
|
+
monday: import("@matter/types").BitFlag;
|
|
260
|
+
tuesday: import("@matter/types").BitFlag;
|
|
261
|
+
wednesday: import("@matter/types").BitFlag;
|
|
262
|
+
thursday: import("@matter/types").BitFlag;
|
|
263
|
+
friday: import("@matter/types").BitFlag;
|
|
264
|
+
saturday: import("@matter/types").BitFlag;
|
|
265
|
+
away: import("@matter/types").BitFlag;
|
|
470
266
|
}>>;
|
|
471
|
-
modeToReturn: import("@matter/types").FieldType<import("@matter/types
|
|
472
|
-
heatSetpointPresent: import("@matter/types
|
|
473
|
-
coolSetpointPresent: import("@matter/types
|
|
267
|
+
modeToReturn: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
268
|
+
heatSetpointPresent: import("@matter/types").BitFlag;
|
|
269
|
+
coolSetpointPresent: import("@matter/types").BitFlag;
|
|
474
270
|
}>>;
|
|
475
271
|
}>, import("@matter/types").TypeFromFields<{
|
|
476
272
|
numberOfTransitionsForSequence: import("@matter/types").FieldType<number>;
|
|
477
|
-
dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types
|
|
478
|
-
sunday: import("@matter/types
|
|
479
|
-
monday: import("@matter/types
|
|
480
|
-
tuesday: import("@matter/types
|
|
481
|
-
wednesday: import("@matter/types
|
|
482
|
-
thursday: import("@matter/types
|
|
483
|
-
friday: import("@matter/types
|
|
484
|
-
saturday: import("@matter/types
|
|
485
|
-
away: import("@matter/types
|
|
273
|
+
dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
274
|
+
sunday: import("@matter/types").BitFlag;
|
|
275
|
+
monday: import("@matter/types").BitFlag;
|
|
276
|
+
tuesday: import("@matter/types").BitFlag;
|
|
277
|
+
wednesday: import("@matter/types").BitFlag;
|
|
278
|
+
thursday: import("@matter/types").BitFlag;
|
|
279
|
+
friday: import("@matter/types").BitFlag;
|
|
280
|
+
saturday: import("@matter/types").BitFlag;
|
|
281
|
+
away: import("@matter/types").BitFlag;
|
|
486
282
|
}>>;
|
|
487
|
-
modeForSequence: import("@matter/types").FieldType<import("@matter/types
|
|
488
|
-
heatSetpointPresent: import("@matter/types
|
|
489
|
-
coolSetpointPresent: import("@matter/types
|
|
283
|
+
modeForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
284
|
+
heatSetpointPresent: import("@matter/types").BitFlag;
|
|
285
|
+
coolSetpointPresent: import("@matter/types").BitFlag;
|
|
490
286
|
}>>;
|
|
491
287
|
transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
|
|
492
288
|
transitionTime: import("@matter/types").FieldType<number>;
|
|
@@ -529,9 +325,9 @@ export declare class MatterServer extends EventEmitter {
|
|
|
529
325
|
readonly presetTypes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromFields<{
|
|
530
326
|
presetScenario: import("@matter/types").FieldType<clusters.Thermostat.PresetScenario>;
|
|
531
327
|
numberOfPresets: import("@matter/types").FieldType<number>;
|
|
532
|
-
presetTypeFeatures: import("@matter/types").FieldType<import("@matter/types
|
|
533
|
-
automatic: import("@matter/types
|
|
534
|
-
supportsNames: import("@matter/types
|
|
328
|
+
presetTypeFeatures: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
329
|
+
automatic: import("@matter/types").BitFlag;
|
|
330
|
+
supportsNames: import("@matter/types").BitFlag;
|
|
535
331
|
}>>;
|
|
536
332
|
}>[], any>;
|
|
537
333
|
readonly numberOfPresets: import("@matter/types").FixedAttribute<number, any>;
|
|
@@ -560,11 +356,11 @@ export declare class MatterServer extends EventEmitter {
|
|
|
560
356
|
readonly scheduleTypes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromFields<{
|
|
561
357
|
systemMode: import("@matter/types").FieldType<clusters.Thermostat.SystemMode>;
|
|
562
358
|
numberOfSchedules: import("@matter/types").FieldType<number>;
|
|
563
|
-
scheduleTypeFeatures: import("@matter/types").FieldType<import("@matter/types
|
|
564
|
-
supportsPresets: import("@matter/types
|
|
565
|
-
supportsSetpoints: import("@matter/types
|
|
566
|
-
supportsNames: import("@matter/types
|
|
567
|
-
supportsOff: import("@matter/types
|
|
359
|
+
scheduleTypeFeatures: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
360
|
+
supportsPresets: import("@matter/types").BitFlag;
|
|
361
|
+
supportsSetpoints: import("@matter/types").BitFlag;
|
|
362
|
+
supportsNames: import("@matter/types").BitFlag;
|
|
363
|
+
supportsOff: import("@matter/types").BitFlag;
|
|
568
364
|
}>>;
|
|
569
365
|
}>[], any>;
|
|
570
366
|
readonly numberOfSchedules: import("@matter/types").FixedAttribute<number, any>;
|
|
@@ -577,15 +373,15 @@ export declare class MatterServer extends EventEmitter {
|
|
|
577
373
|
name: import("@matter/types").OptionalFieldType<string>;
|
|
578
374
|
presetHandle: import("@matter/types").OptionalFieldType<AllowSharedBufferSource>;
|
|
579
375
|
transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
|
|
580
|
-
dayOfWeek: import("@matter/types").FieldType<import("@matter/types
|
|
581
|
-
sunday: import("@matter/types
|
|
582
|
-
monday: import("@matter/types
|
|
583
|
-
tuesday: import("@matter/types
|
|
584
|
-
wednesday: import("@matter/types
|
|
585
|
-
thursday: import("@matter/types
|
|
586
|
-
friday: import("@matter/types
|
|
587
|
-
saturday: import("@matter/types
|
|
588
|
-
away: import("@matter/types
|
|
376
|
+
dayOfWeek: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
|
|
377
|
+
sunday: import("@matter/types").BitFlag;
|
|
378
|
+
monday: import("@matter/types").BitFlag;
|
|
379
|
+
tuesday: import("@matter/types").BitFlag;
|
|
380
|
+
wednesday: import("@matter/types").BitFlag;
|
|
381
|
+
thursday: import("@matter/types").BitFlag;
|
|
382
|
+
friday: import("@matter/types").BitFlag;
|
|
383
|
+
saturday: import("@matter/types").BitFlag;
|
|
384
|
+
away: import("@matter/types").BitFlag;
|
|
589
385
|
}>>;
|
|
590
386
|
transitionTime: import("@matter/types").FieldType<number>;
|
|
591
387
|
presetHandle: import("@matter/types").OptionalFieldType<AllowSharedBufferSource>;
|
|
@@ -621,36 +417,76 @@ export declare class MatterServer extends EventEmitter {
|
|
|
621
417
|
};
|
|
622
418
|
readonly component: false;
|
|
623
419
|
}];
|
|
624
|
-
}>, readonly ["Heating", "Cooling"]>, typeof import("@matter/
|
|
625
|
-
readonly Fan: devices.FanDevice;
|
|
626
|
-
readonly DoorLock: devices.DoorLockDevice;
|
|
627
|
-
readonly WindowCovering: devices.WindowCoveringDevice;
|
|
628
|
-
readonly RoboticVacuumCleaner: devices.RoboticVacuumCleanerDevice;
|
|
629
|
-
readonly GenericSwitch: devices.GenericSwitchDevice;
|
|
630
|
-
readonly Pump: devices.PumpDevice;
|
|
631
|
-
readonly RoomAirConditioner: devices.RoomAirConditionerDevice;
|
|
420
|
+
}>, readonly ["Heating", "Cooling"]>, typeof import("@matter/node/behaviors").ThermostatServer, import("@matter/node/behaviors").ThermostatInterface>]>>;
|
|
421
|
+
readonly Fan: import("@matter/node/devices").FanDevice;
|
|
422
|
+
readonly DoorLock: import("@matter/node/devices").DoorLockDevice;
|
|
423
|
+
readonly WindowCovering: import("@matter/node/devices").WindowCoveringDevice;
|
|
424
|
+
readonly RoboticVacuumCleaner: import("@matter/node/devices").RoboticVacuumCleanerDevice;
|
|
425
|
+
readonly GenericSwitch: import("@matter/node/devices").GenericSwitchDevice;
|
|
426
|
+
readonly Pump: import("@matter/node/devices").PumpDevice;
|
|
427
|
+
readonly RoomAirConditioner: import("@matter/node/devices").RoomAirConditionerDevice;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Matter clusters - Direct access to Matter.js cluster definitions
|
|
431
|
+
*/
|
|
432
|
+
get clusters(): typeof clusters;
|
|
433
|
+
/**
|
|
434
|
+
* Matter cluster names for type safety and autocomplete
|
|
435
|
+
*/
|
|
436
|
+
get clusterNames(): {
|
|
437
|
+
readonly OnOff: "onOff";
|
|
438
|
+
readonly LevelControl: "levelControl";
|
|
439
|
+
readonly ColorControl: "colorControl";
|
|
440
|
+
readonly DoorLock: "doorLock";
|
|
441
|
+
readonly WindowCovering: "windowCovering";
|
|
442
|
+
readonly Thermostat: "thermostat";
|
|
443
|
+
readonly FanControl: "fanControl";
|
|
444
|
+
readonly TemperatureMeasurement: "temperatureMeasurement";
|
|
445
|
+
readonly RelativeHumidityMeasurement: "relativeHumidityMeasurement";
|
|
446
|
+
readonly IlluminanceMeasurement: "illuminanceMeasurement";
|
|
447
|
+
readonly OccupancySensing: "occupancySensing";
|
|
448
|
+
readonly BooleanState: "booleanState";
|
|
449
|
+
readonly SmokeCoAlarm: "smokeCoAlarm";
|
|
450
|
+
readonly RvcRunMode: "rvcRunMode";
|
|
451
|
+
readonly RvcOperationalState: "rvcOperationalState";
|
|
452
|
+
readonly RvcCleanMode: "rvcCleanMode";
|
|
453
|
+
readonly ServiceArea: "serviceArea";
|
|
454
|
+
readonly PumpConfigurationAndControl: "pumpConfigurationAndControl";
|
|
455
|
+
readonly Identify: "identify";
|
|
456
|
+
readonly BasicInformation: "basicInformation";
|
|
457
|
+
readonly BridgedDeviceBasicInformation: "bridgedDeviceBasicInformation";
|
|
632
458
|
};
|
|
633
459
|
/**
|
|
634
|
-
*
|
|
460
|
+
* Matter types - Access to Matter.js cluster type definitions and enums
|
|
461
|
+
*/
|
|
462
|
+
get types(): typeof clusters;
|
|
463
|
+
/**
|
|
464
|
+
* Register Matter platform accessories
|
|
465
|
+
* Automatically handles external accessories (e.g., RoboticVacuumCleaner) that need dedicated bridges
|
|
466
|
+
* Validates accessories before registration
|
|
467
|
+
* Returns a promise that resolves when all accessories are fully registered
|
|
468
|
+
*/
|
|
469
|
+
registerPlatformAccessories(pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: MatterAccessory[]): Promise<void>;
|
|
470
|
+
/**
|
|
471
|
+
* Update Matter platform accessories in the cache
|
|
472
|
+
* Similar to api.updatePlatformAccessories() for HAP accessories
|
|
635
473
|
*/
|
|
636
|
-
|
|
474
|
+
updatePlatformAccessories(accessories: MatterAccessory[]): Promise<void>;
|
|
637
475
|
/**
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
* @param fabricIndex - The fabric index to remove
|
|
642
|
-
* @returns Promise that resolves when the fabric is removed
|
|
476
|
+
* Unregister Matter platform accessories
|
|
477
|
+
* Automatically handles external accessories (e.g., RoboticVacuumCleaner) that have dedicated bridges
|
|
643
478
|
*/
|
|
644
|
-
|
|
479
|
+
unregisterPlatformAccessories(pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: MatterAccessory[]): Promise<void>;
|
|
645
480
|
/**
|
|
646
|
-
*
|
|
481
|
+
* Update a Matter accessory's cluster state
|
|
482
|
+
* Validates inputs before updating
|
|
647
483
|
*/
|
|
648
|
-
|
|
484
|
+
updateAccessoryState(uuid: string, cluster: string, attributes: Record<string, unknown>, partId?: string): Promise<void>;
|
|
649
485
|
/**
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
486
|
+
* Get a Matter accessory's current cluster state
|
|
487
|
+
* Checks both external servers and main bridge server
|
|
488
|
+
* Validates inputs before retrieving state
|
|
653
489
|
*/
|
|
654
|
-
|
|
490
|
+
getAccessoryState(uuid: string, cluster: string, partId?: string): Promise<Record<string, unknown> | undefined>;
|
|
655
491
|
}
|
|
656
|
-
//# sourceMappingURL=
|
|
492
|
+
//# sourceMappingURL=MatterAPIImpl.d.ts.map
|