homebridge 2.0.0-beta.3 → 2.0.0-beta.31

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.
Files changed (169) hide show
  1. package/README.md +16 -17
  2. package/bin/homebridge.js +22 -0
  3. package/config-sample.json +3 -3
  4. package/dist/api.d.ts +457 -0
  5. package/dist/api.d.ts.map +1 -0
  6. package/dist/api.js +221 -0
  7. package/dist/api.js.map +1 -0
  8. package/{lib → dist}/bridgeService.d.ts +19 -10
  9. package/dist/bridgeService.d.ts.map +1 -0
  10. package/{lib → dist}/bridgeService.js +85 -117
  11. package/dist/bridgeService.js.map +1 -0
  12. package/dist/childBridgeFork.d.ts +65 -0
  13. package/dist/childBridgeFork.d.ts.map +1 -0
  14. package/dist/childBridgeFork.js +531 -0
  15. package/dist/childBridgeFork.js.map +1 -0
  16. package/{lib → dist}/childBridgeService.d.ts +30 -7
  17. package/dist/childBridgeService.d.ts.map +1 -0
  18. package/{lib → dist}/childBridgeService.js +127 -69
  19. package/dist/childBridgeService.js.map +1 -0
  20. package/dist/cli.d.ts +3 -0
  21. package/dist/cli.d.ts.map +1 -0
  22. package/dist/cli.js +90 -0
  23. package/dist/cli.js.map +1 -0
  24. package/dist/externalPortService.d.ts +54 -0
  25. package/dist/externalPortService.d.ts.map +1 -0
  26. package/dist/externalPortService.js +125 -0
  27. package/dist/externalPortService.js.map +1 -0
  28. package/dist/index.d.ts +122 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +34 -0
  31. package/dist/index.js.map +1 -0
  32. package/{lib → dist}/ipcService.d.ts +22 -5
  33. package/dist/ipcService.d.ts.map +1 -0
  34. package/{lib → dist}/ipcService.js +12 -12
  35. package/dist/ipcService.js.map +1 -0
  36. package/{lib → dist}/logger.d.ts +12 -6
  37. package/dist/logger.d.ts.map +1 -0
  38. package/{lib → dist}/logger.js +27 -28
  39. package/dist/logger.js.map +1 -0
  40. package/dist/matter/index.d.ts +123 -0
  41. package/dist/matter/index.d.ts.map +1 -0
  42. package/dist/matter/index.js +19 -0
  43. package/dist/matter/index.js.map +1 -0
  44. package/dist/matter/matterAccessoryCache.d.ts +96 -0
  45. package/dist/matter/matterAccessoryCache.d.ts.map +1 -0
  46. package/dist/matter/matterAccessoryCache.js +192 -0
  47. package/dist/matter/matterAccessoryCache.js.map +1 -0
  48. package/dist/matter/matterBehaviors.d.ts +194 -0
  49. package/dist/matter/matterBehaviors.d.ts.map +1 -0
  50. package/dist/matter/matterBehaviors.js +665 -0
  51. package/dist/matter/matterBehaviors.js.map +1 -0
  52. package/dist/matter/matterConfigValidator.d.ts +81 -0
  53. package/dist/matter/matterConfigValidator.d.ts.map +1 -0
  54. package/dist/matter/matterConfigValidator.js +240 -0
  55. package/dist/matter/matterConfigValidator.js.map +1 -0
  56. package/dist/matter/matterErrorHandler.d.ts +106 -0
  57. package/dist/matter/matterErrorHandler.d.ts.map +1 -0
  58. package/dist/matter/matterErrorHandler.js +495 -0
  59. package/dist/matter/matterErrorHandler.js.map +1 -0
  60. package/dist/matter/matterLogFormatter.d.ts +19 -0
  61. package/dist/matter/matterLogFormatter.d.ts.map +1 -0
  62. package/dist/matter/matterLogFormatter.js +144 -0
  63. package/dist/matter/matterLogFormatter.js.map +1 -0
  64. package/dist/matter/matterNetworkMonitor.d.ts +68 -0
  65. package/dist/matter/matterNetworkMonitor.d.ts.map +1 -0
  66. package/dist/matter/matterNetworkMonitor.js +249 -0
  67. package/dist/matter/matterNetworkMonitor.js.map +1 -0
  68. package/dist/matter/matterServer.d.ts +656 -0
  69. package/dist/matter/matterServer.d.ts.map +1 -0
  70. package/dist/matter/matterServer.js +1690 -0
  71. package/dist/matter/matterServer.js.map +1 -0
  72. package/dist/matter/matterServerHelpers.d.ts +81 -0
  73. package/dist/matter/matterServerHelpers.d.ts.map +1 -0
  74. package/dist/matter/matterServerHelpers.js +323 -0
  75. package/dist/matter/matterServerHelpers.js.map +1 -0
  76. package/dist/matter/matterSharedTypes.d.ts +170 -0
  77. package/dist/matter/matterSharedTypes.d.ts.map +1 -0
  78. package/dist/matter/matterSharedTypes.js +52 -0
  79. package/dist/matter/matterSharedTypes.js.map +1 -0
  80. package/dist/matter/matterStorage.d.ts +128 -0
  81. package/dist/matter/matterStorage.d.ts.map +1 -0
  82. package/dist/matter/matterStorage.js +415 -0
  83. package/dist/matter/matterStorage.js.map +1 -0
  84. package/dist/matter/matterTypes.d.ts +745 -0
  85. package/dist/matter/matterTypes.d.ts.map +1 -0
  86. package/dist/matter/matterTypes.js +174 -0
  87. package/dist/matter/matterTypes.js.map +1 -0
  88. package/{lib → dist}/platformAccessory.d.ts +8 -6
  89. package/dist/platformAccessory.d.ts.map +1 -0
  90. package/{lib → dist}/platformAccessory.js +19 -16
  91. package/dist/platformAccessory.js.map +1 -0
  92. package/{lib → dist}/plugin.d.ts +2 -3
  93. package/dist/plugin.d.ts.map +1 -0
  94. package/{lib → dist}/plugin.js +39 -51
  95. package/dist/plugin.js.map +1 -0
  96. package/{lib → dist}/pluginManager.d.ts +3 -3
  97. package/dist/pluginManager.d.ts.map +1 -0
  98. package/{lib → dist}/pluginManager.js +76 -81
  99. package/dist/pluginManager.js.map +1 -0
  100. package/{lib → dist}/server.d.ts +23 -1
  101. package/dist/server.d.ts.map +1 -0
  102. package/dist/server.js +811 -0
  103. package/dist/server.js.map +1 -0
  104. package/{lib → dist}/storageService.d.ts.map +1 -1
  105. package/dist/storageService.js +41 -0
  106. package/dist/storageService.js.map +1 -0
  107. package/{lib → dist}/user.d.ts +1 -0
  108. package/dist/user.d.ts.map +1 -0
  109. package/dist/user.js +32 -0
  110. package/dist/user.js.map +1 -0
  111. package/{lib → dist}/util/mac.d.ts +1 -0
  112. package/dist/util/mac.d.ts.map +1 -0
  113. package/dist/util/mac.js +14 -0
  114. package/dist/util/mac.js.map +1 -0
  115. package/dist/version.d.ts.map +1 -0
  116. package/dist/version.js +16 -0
  117. package/dist/version.js.map +1 -0
  118. package/package.json +48 -49
  119. package/bin/homebridge +0 -17
  120. package/lib/api.d.ts +0 -210
  121. package/lib/api.d.ts.map +0 -1
  122. package/lib/api.js +0 -155
  123. package/lib/api.js.map +0 -1
  124. package/lib/bridgeService.d.ts.map +0 -1
  125. package/lib/bridgeService.js.map +0 -1
  126. package/lib/childBridgeFork.d.ts +0 -37
  127. package/lib/childBridgeFork.d.ts.map +0 -1
  128. package/lib/childBridgeFork.js +0 -244
  129. package/lib/childBridgeFork.js.map +0 -1
  130. package/lib/childBridgeService.d.ts.map +0 -1
  131. package/lib/childBridgeService.js.map +0 -1
  132. package/lib/cli.d.ts +0 -4
  133. package/lib/cli.d.ts.map +0 -1
  134. package/lib/cli.js +0 -111
  135. package/lib/cli.js.map +0 -1
  136. package/lib/externalPortService.d.ts +0 -33
  137. package/lib/externalPortService.d.ts.map +0 -1
  138. package/lib/externalPortService.js +0 -64
  139. package/lib/externalPortService.js.map +0 -1
  140. package/lib/index.d.ts +0 -76
  141. package/lib/index.d.ts.map +0 -1
  142. package/lib/index.js +0 -72
  143. package/lib/index.js.map +0 -1
  144. package/lib/ipcService.d.ts.map +0 -1
  145. package/lib/ipcService.js.map +0 -1
  146. package/lib/logger.d.ts.map +0 -1
  147. package/lib/logger.js.map +0 -1
  148. package/lib/platformAccessory.d.ts.map +0 -1
  149. package/lib/platformAccessory.js.map +0 -1
  150. package/lib/plugin.d.ts.map +0 -1
  151. package/lib/plugin.js.map +0 -1
  152. package/lib/pluginManager.d.ts.map +0 -1
  153. package/lib/pluginManager.js.map +0 -1
  154. package/lib/server.d.ts.map +0 -1
  155. package/lib/server.js +0 -457
  156. package/lib/server.js.map +0 -1
  157. package/lib/storageService.js +0 -70
  158. package/lib/storageService.js.map +0 -1
  159. package/lib/user.d.ts.map +0 -1
  160. package/lib/user.js +0 -36
  161. package/lib/user.js.map +0 -1
  162. package/lib/util/mac.d.ts.map +0 -1
  163. package/lib/util/mac.js +0 -20
  164. package/lib/util/mac.js.map +0 -1
  165. package/lib/version.d.ts.map +0 -1
  166. package/lib/version.js +0 -21
  167. package/lib/version.js.map +0 -1
  168. /package/{lib → dist}/storageService.d.ts +0 -0
  169. /package/{lib → dist}/version.d.ts +0 -0
package/README.md CHANGED
@@ -16,19 +16,19 @@
16
16
 
17
17
  <img src="https://media.giphy.com/media/10l79ICohTu4iQ/giphy.gif" align="right" alt="Unlocking Door">
18
18
 
19
- **Homebridge** is a lightweight Node.js server you can run on your home network that emulates the iOS HomeKit API. It supports Plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of "smart home" devices.
19
+ **Homebridge** is a lightweight Node.js server you can run on your home network to emulate the HomeKit Accessory Protocol (HAP). It supports plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of "smart home" devices.
20
20
 
21
21
  Since Siri supports devices added through HomeKit, this means that with Homebridge you can ask Siri to control devices that don't have any support for HomeKit at all. For instance, using just some of the available plugins, you can say:
22
22
 
23
- * _Siri, unlock the back door._ [pictured to the right]
24
- * _Siri, open the garage door._
25
- * _Siri, turn on the coffee maker._
26
- * _Siri, turn on the living room lights._
27
- * _Siri, good morning!_
23
+ - _Siri, unlock the back door._ [pictured to the right]
24
+ - _Siri, open the garage door._
25
+ - _Siri, turn on the coffee maker._
26
+ - _Siri, turn on the living room lights._
27
+ - _Siri, good morning!_
28
28
 
29
29
  You can explore all available plugins at the NPM website by [searching for the keyword `homebridge-plugin`](https://www.npmjs.com/search?q=homebridge-plugin).
30
30
 
31
- ## Community
31
+ ## Community
32
32
 
33
33
  The official Homebridge Discord server and Reddit community are where users can discuss Homebridge and ask for help.
34
34
 
@@ -79,7 +79,7 @@ HomeKit communities can also be found on both [Discord](https://discord.gg/RcV7f
79
79
 
80
80
  ### Docker
81
81
 
82
- [Install Homebridge on Docker](https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Docker) <br> [Synology](https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-Synology) | [Unraid](https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-Unraid) | [QNAP](https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-QNAP) | [TrueNAS Scale](https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-TrueNAS-Scale)
82
+ [Install Homebridge on Docker](https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Docker) <br> [Synology](https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-Synology) | [Unraid](https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-Unraid) | [QNAP](https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-QNAP) | [TrueNAS Scale](https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-TrueNAS-Scale)
83
83
 
84
84
  ---
85
85
 
@@ -97,9 +97,9 @@ HomeKit communities can also be found on both [Discord](https://discord.gg/RcV7f
97
97
 
98
98
  1. Open the Home <img src="https://user-images.githubusercontent.com/3979615/78010622-4ea1d380-738e-11ea-8a17-e6a465eeec35.png" height="16.42px"> app on your device.
99
99
  2. Tap the Home tab, then tap <img src="https://user-images.githubusercontent.com/3979615/78010869-9aed1380-738e-11ea-9644-9f46b3633026.png" height="16.42px">.
100
- 3. Tap *Add Accessory*, then scan the QR code shown in the Homebridge UI or your Homebridge logs.
100
+ 3. Tap _Add Accessory_, then scan the QR code shown in the Homebridge UI or your Homebridge logs.
101
101
 
102
- If the bridge does not have any accessories yet, you may receive a message saying *Additional Set-up Required*, this is ok, as you add plugins they will show up in the Home app without the need to pair again (except for Cameras and TVs).
102
+ If the bridge does not have any accessories yet, you may receive a message saying _Additional Set-up Required_, this is ok, as you add plugins they will show up in the Home app without the need to pair again (except for Cameras and TVs).
103
103
 
104
104
  Cameras and most TV devices are exposed as separate accessories and each needs to be paired separately. See [this wiki article](https://github.com/homebridge/homebridge/wiki/Connecting-Homebridge-To-HomeKit#how-to-add-homebridge-cameras--tvs) for instructions.
105
105
 
@@ -113,18 +113,17 @@ One final thing to remember is that Siri will almost always prefer its default p
113
113
 
114
114
  The https://developers.homebridge.io website contains the Homebridge API reference, available service and characteristic types, and plugin examples.
115
115
 
116
- The [Homebridge Plugin Template](https://github.com/homebridge/homebridge-plugin-template) project provides a base you can use to create your own *platform* plugin.
116
+ The [Homebridge Plugin Template](https://github.com/homebridge/homebridge-plugin-template) project provides a base you can use to create your own _platform_ plugin.
117
117
 
118
118
  There are many existing plugins you can study; you might start with the [Homebridge Example Plugins](https://github.com/homebridge/homebridge-examples) or a plugin that already implements the device type you need.
119
119
 
120
120
  When writing your plugin, you'll want Homebridge to load it from your development directory instead of publishing it to `npm` each time. Run this command inside your plugin project folder so your global installation of Homebridge can discover it:
121
121
 
122
-
123
122
  ```shell
124
123
  npm link
125
124
  ```
126
125
 
127
- *You can undo this using the `npm unlink` command.*
126
+ _You can undo this using the `npm unlink` command._
128
127
 
129
128
  Then start Homebridge in debug mode:
130
129
 
@@ -150,13 +149,13 @@ To fix this, [Reset Homebridge](https://github.com/homebridge/homebridge/wiki/Co
150
149
 
151
150
  Try the following:
152
151
 
153
- 1. Swap between the `Bonjour HAP` and `Ciao` mDNS Advertiser options. See [the wiki](https://github.com/homebridge/homebridge/wiki/mDNS-Options) for more details.
154
- 2. iOS DNS cache has gone stale or gotten misconfigured. To fix this, turn airplane mode on and back off to flush the DNS cache.
152
+ 1. Swap between the `Bonjour HAP` and `Ciao` mDNS Advertiser options. See [the wiki](https://github.com/homebridge/homebridge/wiki/mDNS-Options) for more details.
153
+ 2. iOS DNS cache has gone stale or gotten misconfigured. To fix this, turn airplane mode on and back off to flush the DNS cache.
155
154
 
156
155
  ### Limitations
157
156
 
158
- * One bridge can only expose 150 accessories due to a HomeKit limit. You can however run your plugins as a [Child Bridge](https://github.com/homebridge/homebridge/wiki/Child-Bridges) or run [Multiple Homebridge Instances](https://github.com/homebridge/homebridge-config-ui-x/wiki/Homebridge-Service-Command#multiple-instances) to get around this limitation.
159
- * Once an accessory has been added to the Home app, changing its name via Homebridge won't be automatically reflected in iOS. You must change it via the Home app as well.
157
+ - One bridge can only expose 150 accessories due to a HomeKit limit. You can however run your plugins as a [Child Bridge](https://github.com/homebridge/homebridge/wiki/Child-Bridges) or run [Multiple Homebridge Instances](https://github.com/homebridge/homebridge-config-ui-x/wiki/Homebridge-Service-Command#multiple-instances) to get around this limitation.
158
+ - Once an accessory has been added to the Home app, changing its name via Homebridge won't be automatically reflected in iOS. You must change it via the Home app as well.
160
159
 
161
160
  ## Why Homebridge?
162
161
 
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+
3
+ //
4
+ // This executable sets up the environment and runs the Homebridge CLI.
5
+ //
6
+
7
+ import { realpathSync } from 'node:fs'
8
+ import { dirname, join } from 'node:path'
9
+ import process from 'node:process'
10
+ import { fileURLToPath, pathToFileURL } from 'node:url'
11
+
12
+ process.title = 'homebridge'
13
+
14
+ // Find the Homebridge lib
15
+ const __filename = fileURLToPath(import.meta.url)
16
+ const lib = join(dirname(realpathSync(__filename)), '../dist')
17
+
18
+ // Convert the path to a file URL
19
+ const libUrl = pathToFileURL(join(lib, 'cli.js')).href
20
+
21
+ // Run Homebridge
22
+ import(libUrl).then(({ default: run }) => run())
@@ -7,7 +7,7 @@
7
7
  "port": 51826,
8
8
  "pin": "031-45-154"
9
9
  },
10
-
10
+
11
11
  "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",
12
12
  "ports": {
13
13
  "start": 52100,
@@ -23,8 +23,8 @@
23
23
 
24
24
  "platforms": [
25
25
  {
26
- "platform" : "PhilipsHue",
27
- "name" : "Hue"
26
+ "platform": "PhilipsHue",
27
+ "name": "Hue"
28
28
  }
29
29
  ]
30
30
  }
package/dist/api.d.ts ADDED
@@ -0,0 +1,457 @@
1
+ import type { Controller, Service } from 'hap-nodejs';
2
+ import type { AccessoryConfig, PlatformConfig } from './bridgeService.js';
3
+ import type { Logging } from './logger.js';
4
+ import type { SerializedMatterAccessory } from './matter/matterAccessoryCache.js';
5
+ import { EventEmitter } from 'node:events';
6
+ import hapNodeJs from 'hap-nodejs';
7
+ import { clusterNames, clusters, deviceTypes, MatterAccessory, MatterServer, MatterTypes } from './matter/index.js';
8
+ import { PlatformAccessory } from './platformAccessory.js';
9
+ import { User } from './user.js';
10
+ export type HAP = typeof hapNodeJs;
11
+ export type HAPLegacyTypes = typeof hapNodeJs.LegacyTypes;
12
+ export type PluginIdentifier = PluginName | ScopedPluginName;
13
+ export type PluginName = string;
14
+ export type ScopedPluginName = string;
15
+ export type AccessoryName = string;
16
+ export type PlatformName = string;
17
+ export type AccessoryIdentifier = string;
18
+ export type PlatformIdentifier = string;
19
+ export declare const enum PluginType {
20
+ ACCESSORY = "accessory",
21
+ PLATFORM = "platform"
22
+ }
23
+ /**
24
+ * The {PluginInitializer} is a method which must be the default export for every homebridge plugin.
25
+ * It is called once the plugin is loaded from disk.
26
+ */
27
+ export interface PluginInitializer {
28
+ /**
29
+ * When the initializer is called the plugin must use the provided api instance and call the appropriate
30
+ * register methods - {@link API.registerAccessory} or {@link API.registerPlatform} - in order to
31
+ * correctly register for the following startup sequence.
32
+ *
33
+ * @param {API} api
34
+ */
35
+ (api: API): void | Promise<void>;
36
+ }
37
+ export interface AccessoryPluginConstructor {
38
+ new (logger: Logging, config: AccessoryConfig, api: API): AccessoryPlugin;
39
+ }
40
+ export interface AccessoryPlugin {
41
+ /**
42
+ * Optional method which will be called if an 'identify' of an Accessory is requested by HomeKit.
43
+ */
44
+ identify?: () => void;
45
+ /**
46
+ * This method will be called once on startup, to query all services to be exposed by the Accessory.
47
+ * All event handlers for characteristics should be set up before the array is returned.
48
+ *
49
+ * @returns {Service[]} services - returned services will be added to the Accessory
50
+ */
51
+ getServices: () => Service[];
52
+ /**
53
+ * This method will be called once on startup, to query all controllers to be exposed by the Accessory.
54
+ * It is optional to implement.
55
+ *
56
+ * This includes controllers like the RemoteController or the CameraController.
57
+ * Any necessary controller specific setup should have been done when returning the array.
58
+ * In most cases the plugin will only return an array of the size 1.
59
+ *
60
+ * In the case that the Plugin does not add any additional services (returned by {@link getServices}) the
61
+ * method {@link getServices} must be defined in any way and should just return an empty array.
62
+ *
63
+ * @returns {Controller[]} controllers - returned controllers will be configured for the Accessory
64
+ */
65
+ getControllers?: () => Controller[];
66
+ }
67
+ export interface PlatformPluginConstructor<Config extends PlatformConfig = PlatformConfig> {
68
+ new (logger: Logging, config: Config, api: API): DynamicPlatformPlugin | StaticPlatformPlugin | IndependentPlatformPlugin;
69
+ }
70
+ export interface PlatformPlugin {
71
+ }
72
+ /**
73
+ * Platform that is able to dynamically add or remove accessories.
74
+ * All configured accessories are stored to disk and recreated on startup.
75
+ * Accessories can be added or removed by using {@link API.registerPlatformAccessories} or {@link API.unregisterPlatformAccessories}.
76
+ */
77
+ export interface DynamicPlatformPlugin extends PlatformPlugin {
78
+ /**
79
+ * This method is called for every PlatformAccessory, which is recreated from disk on startup.
80
+ * It should be used to properly initialize the Accessory and setup all event handlers for
81
+ * all services and their characteristics.
82
+ *
83
+ * @param {PlatformAccessory} accessory which needs to be configured
84
+ */
85
+ configureAccessory: (accessory: PlatformAccessory) => void;
86
+ /**
87
+ * This method is called for every Matter accessory, which is recreated from cache on startup.
88
+ * It should be used to track cached accessories so the plugin can determine which accessories
89
+ * to re-register and which to remove (if they no longer exist in the external system).
90
+ *
91
+ * This is the Matter equivalent of configureAccessory for HAP accessories.
92
+ *
93
+ * @param {SerializedMatterAccessory} accessory - cached Matter accessory
94
+ */
95
+ configureMatterAccessory?: (accessory: SerializedMatterAccessory) => void;
96
+ }
97
+ /**
98
+ * Platform that exposes all available characteristics at the start of the plugin.
99
+ * The set of accessories can not change at runtime.
100
+ * The bridge waits for all callbacks to return before it is published and accessible by HomeKit controllers.
101
+ */
102
+ export interface StaticPlatformPlugin extends PlatformPlugin {
103
+ /**
104
+ * This method is called once at startup. The Platform should pass all accessories which need to be created
105
+ * to the callback in form of a {@link AccessoryPlugin}.
106
+ * The Platform must respond in a timely manner as otherwise the startup of the bridge would be unnecessarily delayed.
107
+ *
108
+ * @param {(foundAccessories: AccessoryPlugin[]) => void} callback
109
+ */
110
+ accessories: (callback: (foundAccessories: AccessoryPlugin[]) => void) => void;
111
+ }
112
+ /**
113
+ * Platform that does not aim to add any accessories to the main bridge accessory.
114
+ * This platform should be used if for example a plugin aims to only expose external accessories.
115
+ * It should also be used when the platform doesn't intend to expose any accessories at all, like plugins
116
+ * providing a UI for homebridge.
117
+ */
118
+ export interface IndependentPlatformPlugin extends PlatformPlugin {
119
+ }
120
+ export declare const enum APIEvent {
121
+ /**
122
+ * Event is fired once homebridge has finished with booting up and initializing all components and plugins.
123
+ * When this event is fired it is possible that the Bridge accessory isn't published yet, if homebridge still needs
124
+ * to wait for some {@see StaticPlatformPlugin | StaticPlatformPlugins} to finish accessory creation.
125
+ */
126
+ DID_FINISH_LAUNCHING = "didFinishLaunching",
127
+ /**
128
+ * This event is fired when homebridge gets shutdown. This could be a regular shutdown or an unexpected crash.
129
+ * At this stage all Accessories are already unpublished and all PlatformAccessories are already saved to disk!
130
+ */
131
+ SHUTDOWN = "shutdown"
132
+ }
133
+ export declare const enum InternalAPIEvent {
134
+ REGISTER_ACCESSORY = "registerAccessory",
135
+ REGISTER_PLATFORM = "registerPlatform",
136
+ PUBLISH_EXTERNAL_ACCESSORIES = "publishExternalAccessories",
137
+ REGISTER_PLATFORM_ACCESSORIES = "registerPlatformAccessories",
138
+ UPDATE_PLATFORM_ACCESSORIES = "updatePlatformAccessories",
139
+ UNREGISTER_PLATFORM_ACCESSORIES = "unregisterPlatformAccessories",
140
+ PUBLISH_EXTERNAL_MATTER_ACCESSORIES = "publishExternalMatterAccessories",
141
+ REGISTER_MATTER_PLATFORM_ACCESSORIES = "registerMatterPlatformAccessories",
142
+ UNREGISTER_MATTER_PLATFORM_ACCESSORIES = "unregisterMatterPlatformAccessories",
143
+ UPDATE_MATTER_ACCESSORY_STATE = "updateMatterAccessoryState"
144
+ }
145
+ /**
146
+ * Matter API Interface
147
+ * Provides access to Matter protocol functionality for creating Matter-compatible accessories.
148
+ * Similar to api.hap for HomeKit Accessory Protocol.
149
+ *
150
+ * @example
151
+ * ```typescript
152
+ * // Register a Matter accessory
153
+ * api.matter.registerAccessory({
154
+ * uuid: api.matter.uuid.generate('my-light-unique-id'),
155
+ * displayName: 'Living Room Light',
156
+ * deviceType: api.matter.deviceTypes.OnOffLight,
157
+ * // ...
158
+ * })
159
+ *
160
+ * // Update state when device changes externally
161
+ * api.matter.updateAccessoryState(uuid, api.matter.clusterNames.OnOff, { onOff: true })
162
+ *
163
+ * // Read current state
164
+ * const state = api.matter.getAccessoryState(uuid, api.matter.clusterNames.OnOff)
165
+ * ```
166
+ */
167
+ export interface MatterAPI {
168
+ /**
169
+ * UUID generator (alias of api.hap.uuid for convenience)
170
+ * Use this to generate unique identifiers for Matter accessories
171
+ *
172
+ * @example
173
+ * ```typescript
174
+ * const uuid = api.matter.uuid.generate('my-light-unique-id')
175
+ * api.matter.registerAccessory({
176
+ * uuid,
177
+ * displayName: 'Living Room Light',
178
+ * // ...
179
+ * })
180
+ * ```
181
+ */
182
+ readonly uuid: HAP['uuid'];
183
+ /**
184
+ * Matter device types for creating accessories
185
+ * Maps friendly names to Matter.js device types
186
+ */
187
+ readonly deviceTypes: typeof deviceTypes;
188
+ /**
189
+ * Matter clusters - Direct access to Matter.js cluster definitions
190
+ * For advanced use cases requiring low-level cluster access
191
+ */
192
+ readonly clusters: typeof clusters;
193
+ /**
194
+ * Matter cluster names for type safety and autocomplete
195
+ * Use these constants with updateAccessoryState() and getAccessoryState()
196
+ *
197
+ * @example
198
+ * ```typescript
199
+ * api.matter.updateAccessoryState(uuid, api.matter.clusterNames.OnOff, { onOff: true })
200
+ * api.matter.getAccessoryState(uuid, api.matter.clusterNames.LevelControl)
201
+ * ```
202
+ */
203
+ readonly clusterNames: typeof clusterNames;
204
+ /**
205
+ * Matter types - Access to Matter.js cluster type definitions and enums
206
+ * Use these for type-safe attribute values (modes, states, etc.)
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * // Fan mode enum
211
+ * api.matter.updateAccessoryState(
212
+ * uuid,
213
+ * api.matter.clusterNames.FanControl,
214
+ * { fanMode: api.matter.types.FanControl.FanMode.High }
215
+ * )
216
+ * ```
217
+ */
218
+ readonly types: typeof MatterTypes;
219
+ /**
220
+ * Register Matter platform accessories (works exactly like HAP's registerPlatformAccessories)
221
+ *
222
+ * @param pluginIdentifier - The plugin identifier (e.g., 'homebridge-example')
223
+ * @param platformName - The platform name (e.g., 'ExamplePlatform')
224
+ * @param accessories - Array of Matter accessories to register
225
+ */
226
+ registerPlatformAccessories: (pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: MatterAccessory[]) => void;
227
+ /**
228
+ * Unregister Matter platform accessories by UUID
229
+ * @param pluginIdentifier - The plugin identifier
230
+ * @param platformName - The platform name
231
+ * @param accessories - Array of Matter accessories to unregister (only uuid is required)
232
+ */
233
+ unregisterPlatformAccessories: (pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: MatterAccessory[]) => void;
234
+ /**
235
+ * Publish external Matter accessories on their own dedicated Matter bridge
236
+ *
237
+ * Use this for devices that require isolation from other Matter accessories.
238
+ * Each external accessory gets its own Matter server instance on a separate port.
239
+ *
240
+ * Apple Home requires certain device types (like Robotic Vacuum Cleaners) to be
241
+ * on their own bridge. Use this method for those devices.
242
+ *
243
+ * Similar to api.publishExternalAccessories() for HAP accessories.
244
+ *
245
+ * @param pluginIdentifier - The plugin identifier (e.g., 'homebridge-example')
246
+ * @param accessories - Array of Matter accessories to publish externally
247
+ */
248
+ publishExternalAccessories: (pluginIdentifier: PluginIdentifier, accessories: MatterAccessory[]) => void;
249
+ /**
250
+ * Update a Matter accessory's cluster state when device changes externally
251
+ *
252
+ * Use this for state updates from:
253
+ * - Native app controls
254
+ * - Physical button presses
255
+ * - Webhooks from cloud service
256
+ * - Polling results
257
+ *
258
+ * DO NOT use inside handlers - state auto-updates after handlers complete!
259
+ * Similar to HAP's characteristic.updateValue()
260
+ *
261
+ * @param uuid - The UUID of the accessory
262
+ * @param cluster - The cluster name (use api.matter.clusterNames for autocomplete)
263
+ * @param attributes - The attributes to update
264
+ * @param partId - Optional: ID of the part to update (for composed devices with multiple endpoints)
265
+ *
266
+ * @example
267
+ * ```typescript
268
+ * // Device turned on via native app:
269
+ * api.matter.updateAccessoryState(
270
+ * uuid,
271
+ * api.matter.clusterNames.OnOff,
272
+ * { onOff: true }
273
+ * )
274
+ *
275
+ * // Device brightness changed via physical button:
276
+ * api.matter.updateAccessoryState(
277
+ * uuid,
278
+ * api.matter.clusterNames.LevelControl,
279
+ * { currentLevel: 200 }
280
+ * )
281
+ *
282
+ * // Update a specific outlet in a power strip (composed device):
283
+ * api.matter.updateAccessoryState(
284
+ * uuid,
285
+ * api.matter.clusterNames.OnOff,
286
+ * { onOff: true },
287
+ * 'outlet-2' // Part ID
288
+ * )
289
+ * ```
290
+ */
291
+ updateAccessoryState: (uuid: string, cluster: string, attributes: Record<string, unknown>, partId?: string) => void;
292
+ /**
293
+ * Get a Matter accessory's current cluster state
294
+ *
295
+ * Returns the current attribute values that are exposed to Matter controllers.
296
+ * Useful for:
297
+ * - Reading state after plugin restart
298
+ * - Verifying current state before making changes
299
+ * - Debugging and logging
300
+ *
301
+ * Similar to HAP's characteristic.value getter.
302
+ *
303
+ * @param uuid - The UUID of the accessory
304
+ * @param cluster - The cluster name (use api.matter.clusterNames for autocomplete)
305
+ * @param partId - Optional: ID of the part to get state from (for composed devices with multiple endpoints)
306
+ * @returns Current cluster attribute values, or undefined if not found
307
+ *
308
+ * @example
309
+ * ```typescript
310
+ * const state = api.matter.getAccessoryState(uuid, api.matter.clusterNames.OnOff)
311
+ * if (state?.onOff) {
312
+ * console.log('Light is currently on')
313
+ * }
314
+ *
315
+ * // Get state of a specific outlet in a power strip:
316
+ * const outletState = api.matter.getAccessoryState(
317
+ * uuid,
318
+ * api.matter.clusterNames.OnOff,
319
+ * 'outlet-3' // Part ID
320
+ * )
321
+ * ```
322
+ */
323
+ getAccessoryState: (uuid: string, cluster: string, partId?: string) => Record<string, unknown> | undefined;
324
+ }
325
+ export interface API {
326
+ /**
327
+ * The homebridge API version as a floating point number.
328
+ */
329
+ readonly version: number;
330
+ /**
331
+ * The current homebridge semver version.
332
+ */
333
+ readonly serverVersion: string;
334
+ readonly user: typeof User;
335
+ readonly hap: HAP;
336
+ readonly hapLegacyTypes: HAPLegacyTypes;
337
+ readonly platformAccessory: typeof PlatformAccessory;
338
+ /**
339
+ * Matter Protocol API
340
+ * Provides access to Matter functionality, similar to api.hap for HomeKit
341
+ *
342
+ * @example
343
+ * ```typescript
344
+ * // Register a Matter accessory
345
+ * api.matter.registerAccessory({
346
+ * uuid: api.matter.uuid.generate('my-light'),
347
+ * displayName: 'Living Room Light',
348
+ * deviceType: api.matter.deviceTypes.OnOffLight,
349
+ * // ...
350
+ * })
351
+ *
352
+ * // Update state
353
+ * api.matter.updateAccessoryState(uuid, api.matter.clusterNames.OnOff, { onOff: true })
354
+ * ```
355
+ */
356
+ readonly matter: MatterAPI;
357
+ /**
358
+ * Returns true if the current running homebridge version is greater or equal to the
359
+ * passed version string.
360
+ *
361
+ * Example:
362
+ *
363
+ * We assume the homebridge version 1.3.0-beta.12 ({@link serverVersion}) and the following example calls below
364
+ * ```
365
+ * versionGreaterOrEqual("1.2.0"); // will return true
366
+ * versionGreaterOrEqual("1.3.0"); // will return false (the RELEASE version 1.3.0 is bigger than the BETA version 1.3.0-beta.12)
367
+ * versionGreaterOrEqual("1.3.0-beta.8); // will return true
368
+ * ```
369
+ *
370
+ * @param version
371
+ */
372
+ versionGreaterOrEqual: (version: string) => boolean;
373
+ registerAccessory: ((accessoryName: AccessoryName, constructor: AccessoryPluginConstructor) => void) & ((pluginIdentifier: PluginIdentifier, accessoryName: AccessoryName, constructor: AccessoryPluginConstructor) => void);
374
+ registerPlatform: (<Config extends PlatformConfig>(platformName: PlatformName, constructor: PlatformPluginConstructor<Config>) => void) & (<Config extends PlatformConfig>(pluginIdentifier: PluginIdentifier, platformName: PlatformName, constructor: PlatformPluginConstructor<Config>) => void);
375
+ registerPlatformAccessories: (pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: PlatformAccessory[]) => void;
376
+ updatePlatformAccessories: (accessories: PlatformAccessory[]) => void;
377
+ unregisterPlatformAccessories: (pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: PlatformAccessory[]) => void;
378
+ publishExternalAccessories: (pluginIdentifier: PluginIdentifier, accessories: PlatformAccessory[]) => void;
379
+ /**
380
+ * Check if Matter is available in this version of Homebridge
381
+ * @returns true if Homebridge version is >= 2.0.0-alpha.0
382
+ */
383
+ isMatterAvailable: () => boolean;
384
+ /**
385
+ * Check if Matter is enabled for this bridge
386
+ * For main bridge: returns true if Matter is enabled in `bridge.matter` config
387
+ * For child bridge: returns true if Matter is enabled in the _bridge.matter config
388
+ * @returns true if Matter is enabled
389
+ */
390
+ isMatterEnabled: () => boolean;
391
+ on: ((event: 'didFinishLaunching', listener: () => void) => this) & ((event: 'shutdown', listener: () => void) => this);
392
+ }
393
+ export declare interface HomebridgeAPI {
394
+ on: ((event: 'didFinishLaunching', listener: () => void) => this) & ((event: 'shutdown', listener: () => void) => this) & ((event: InternalAPIEvent.REGISTER_ACCESSORY, listener: (accessoryName: AccessoryName, accessoryConstructor: AccessoryPluginConstructor, pluginIdentifier?: PluginIdentifier) => void) => this) & ((event: InternalAPIEvent.REGISTER_PLATFORM, listener: (platformName: PlatformName, platformConstructor: PlatformPluginConstructor, pluginIdentifier?: PluginIdentifier) => void) => this) & ((event: InternalAPIEvent.PUBLISH_EXTERNAL_ACCESSORIES, listener: (accessories: PlatformAccessory[]) => void) => this) & ((event: InternalAPIEvent.REGISTER_PLATFORM_ACCESSORIES, listener: (accessories: PlatformAccessory[]) => void) => this) & ((event: InternalAPIEvent.UPDATE_PLATFORM_ACCESSORIES, listener: (accessories: PlatformAccessory[]) => void) => this) & ((event: InternalAPIEvent.UNREGISTER_PLATFORM_ACCESSORIES, listener: (accessories: PlatformAccessory[]) => void) => this) & ((event: InternalAPIEvent.PUBLISH_EXTERNAL_MATTER_ACCESSORIES, listener: (accessories: MatterAccessory[]) => void) => this) & ((event: InternalAPIEvent.REGISTER_MATTER_PLATFORM_ACCESSORIES, listener: (pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: MatterAccessory[]) => void) => this) & ((event: InternalAPIEvent.UNREGISTER_MATTER_PLATFORM_ACCESSORIES, listener: (pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: MatterAccessory[]) => void) => this) & ((event: InternalAPIEvent.UPDATE_MATTER_ACCESSORY_STATE, listener: (uuid: string, cluster: string, attributes: Record<string, any>, partId?: string) => void) => this);
395
+ emit: ((event: 'didFinishLaunching') => boolean) & ((event: 'shutdown') => boolean) & ((event: InternalAPIEvent.REGISTER_ACCESSORY, accessoryName: AccessoryName, accessoryConstructor: AccessoryPluginConstructor, pluginIdentifier?: PluginIdentifier) => boolean) & ((event: InternalAPIEvent.REGISTER_PLATFORM, platformName: PlatformName, platformConstructor: PlatformPluginConstructor, pluginIdentifier?: PluginIdentifier) => boolean) & ((event: InternalAPIEvent.PUBLISH_EXTERNAL_ACCESSORIES, accessories: PlatformAccessory[]) => boolean) & ((event: InternalAPIEvent.REGISTER_PLATFORM_ACCESSORIES, accessories: PlatformAccessory[]) => boolean) & ((event: InternalAPIEvent.UPDATE_PLATFORM_ACCESSORIES, accessories: PlatformAccessory[]) => boolean) & ((event: InternalAPIEvent.UNREGISTER_PLATFORM_ACCESSORIES, accessories: PlatformAccessory[]) => boolean) & ((event: InternalAPIEvent.PUBLISH_EXTERNAL_MATTER_ACCESSORIES, accessories: MatterAccessory[]) => boolean) & ((event: InternalAPIEvent.REGISTER_MATTER_PLATFORM_ACCESSORIES, pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: MatterAccessory[]) => boolean) & ((event: InternalAPIEvent.UNREGISTER_MATTER_PLATFORM_ACCESSORIES, pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: MatterAccessory[]) => boolean) & ((event: InternalAPIEvent.UPDATE_MATTER_ACCESSORY_STATE, uuid: string, cluster: string, attributes: Record<string, any>, partId?: string) => boolean);
396
+ }
397
+ export declare class HomebridgeAPI extends EventEmitter implements API {
398
+ readonly version = 2.7;
399
+ readonly serverVersion: string;
400
+ readonly user: typeof User;
401
+ readonly hap: typeof hapNodeJs;
402
+ readonly hapLegacyTypes: typeof hapNodeJs.LegacyTypes;
403
+ readonly platformAccessory: typeof PlatformAccessory;
404
+ /**
405
+ * Matter Protocol API
406
+ */
407
+ readonly matter: MatterAPI;
408
+ /**
409
+ * Internal state tracking whether Matter is enabled for this bridge
410
+ */
411
+ private matterEnabled;
412
+ /**
413
+ * Internal reference to MatterServer for API methods that need return values
414
+ * @internal
415
+ */
416
+ private _matterServer;
417
+ constructor();
418
+ /**
419
+ * Internal method to set Matter enabled status
420
+ * Called by Server or ChildBridgeFork after Matter initialization
421
+ * @internal
422
+ */
423
+ _setMatterEnabled(enabled: boolean): void;
424
+ /**
425
+ * Internal method to set MatterServer reference
426
+ * Called by Server or ChildBridgeFork after creating MatterServer
427
+ * @internal
428
+ */
429
+ _setMatterServer(server: MatterServer | null): void;
430
+ versionGreaterOrEqual(version: string): boolean;
431
+ static isDynamicPlatformPlugin(platformPlugin: PlatformPlugin): platformPlugin is DynamicPlatformPlugin;
432
+ static isStaticPlatformPlugin(platformPlugin: PlatformPlugin): platformPlugin is StaticPlatformPlugin;
433
+ signalFinished(): void;
434
+ signalShutdown(): void;
435
+ registerAccessory(accessoryName: AccessoryName, constructor: AccessoryPluginConstructor): void;
436
+ registerAccessory(pluginIdentifier: PluginIdentifier, accessoryName: AccessoryName, constructor: AccessoryPluginConstructor): void;
437
+ registerPlatform(platformName: PlatformName, constructor: PlatformPluginConstructor): void;
438
+ registerPlatform(pluginIdentifier: PluginIdentifier, platformName: PlatformName, constructor: PlatformPluginConstructor): void;
439
+ publishCameraAccessories(pluginIdentifier: PluginIdentifier, accessories: PlatformAccessory[]): void;
440
+ publishExternalAccessories(pluginIdentifier: PluginIdentifier, accessories: PlatformAccessory[]): void;
441
+ registerPlatformAccessories(pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: PlatformAccessory[]): void;
442
+ updatePlatformAccessories(accessories: PlatformAccessory[]): void;
443
+ unregisterPlatformAccessories(pluginIdentifier: PluginIdentifier, platformName: PlatformName, accessories: PlatformAccessory[]): void;
444
+ /**
445
+ * Check if Matter is available in this version of Homebridge
446
+ * @returns true if Homebridge version satisfies >= 2.0.0-alpha.0
447
+ */
448
+ isMatterAvailable(): boolean;
449
+ /**
450
+ * Check if Matter is enabled for this bridge
451
+ * For main bridge: returns true if Matter is enabled in `bridge.matter` config
452
+ * For child bridge: returns true if Matter is enabled in the `_bridge.matter` config
453
+ * @returns true if Matter is enabled
454
+ */
455
+ isMatterEnabled(): boolean;
456
+ }
457
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAErD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAEjF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,SAAS,MAAM,YAAY,CAAA;AAIlC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACnH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAKhC,MAAM,MAAM,GAAG,GAAG,OAAO,SA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