@homebridge-plugins/homebridge-matter 0.0.6 → 0.1.0

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 (95) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +67 -33
  3. package/config.schema.json +73 -77
  4. package/dist/devices/index.d.ts +13 -0
  5. package/dist/devices/index.js +22 -0
  6. package/dist/devices/index.js.map +1 -0
  7. package/dist/devices/section-12-robotic/index.d.ts +6 -0
  8. package/dist/devices/section-12-robotic/index.js +7 -0
  9. package/dist/devices/section-12-robotic/index.js.map +1 -0
  10. package/dist/devices/section-12-robotic/robotic-vacuum-cleaner.d.ts +63 -0
  11. package/dist/devices/section-12-robotic/robotic-vacuum-cleaner.js +318 -0
  12. package/dist/devices/section-12-robotic/robotic-vacuum-cleaner.js.map +1 -0
  13. package/dist/devices/section-4-lighting/color-temperature-light.d.ts +7 -0
  14. package/dist/devices/section-4-lighting/color-temperature-light.js +62 -0
  15. package/dist/devices/section-4-lighting/color-temperature-light.js.map +1 -0
  16. package/dist/devices/section-4-lighting/dimmable-light.d.ts +7 -0
  17. package/dist/devices/section-4-lighting/dimmable-light.js +48 -0
  18. package/dist/devices/section-4-lighting/dimmable-light.js.map +1 -0
  19. package/dist/devices/section-4-lighting/extended-color-light.d.ts +12 -0
  20. package/dist/devices/section-4-lighting/extended-color-light.js +142 -0
  21. package/dist/devices/section-4-lighting/extended-color-light.js.map +1 -0
  22. package/dist/devices/section-4-lighting/index.d.ts +9 -0
  23. package/dist/devices/section-4-lighting/index.js +10 -0
  24. package/dist/devices/section-4-lighting/index.js.map +1 -0
  25. package/dist/devices/section-4-lighting/on-off-light.d.ts +7 -0
  26. package/dist/devices/section-4-lighting/on-off-light.js +37 -0
  27. package/dist/devices/section-4-lighting/on-off-light.js.map +1 -0
  28. package/dist/devices/section-5-smart-plugs/dimmable-plug-in-unit.d.ts +7 -0
  29. package/dist/devices/section-5-smart-plugs/dimmable-plug-in-unit.js +48 -0
  30. package/dist/devices/section-5-smart-plugs/dimmable-plug-in-unit.js.map +1 -0
  31. package/dist/devices/section-5-smart-plugs/index.d.ts +7 -0
  32. package/dist/devices/section-5-smart-plugs/index.js +8 -0
  33. package/dist/devices/section-5-smart-plugs/index.js.map +1 -0
  34. package/dist/devices/section-5-smart-plugs/on-off-plug-in-unit.d.ts +7 -0
  35. package/dist/devices/section-5-smart-plugs/on-off-plug-in-unit.js +37 -0
  36. package/dist/devices/section-5-smart-plugs/on-off-plug-in-unit.js.map +1 -0
  37. package/dist/devices/section-6-switches/index.d.ts +6 -0
  38. package/dist/devices/section-6-switches/index.js +7 -0
  39. package/dist/devices/section-6-switches/index.js.map +1 -0
  40. package/dist/devices/section-6-switches/on-off-light-switch.d.ts +7 -0
  41. package/dist/devices/section-6-switches/on-off-light-switch.js +30 -0
  42. package/dist/devices/section-6-switches/on-off-light-switch.js.map +1 -0
  43. package/dist/devices/section-7-sensors/contact-sensor.d.ts +7 -0
  44. package/dist/devices/section-7-sensors/contact-sensor.js +27 -0
  45. package/dist/devices/section-7-sensors/contact-sensor.js.map +1 -0
  46. package/dist/devices/section-7-sensors/humidity-sensor.d.ts +7 -0
  47. package/dist/devices/section-7-sensors/humidity-sensor.js +29 -0
  48. package/dist/devices/section-7-sensors/humidity-sensor.js.map +1 -0
  49. package/dist/devices/section-7-sensors/index.d.ts +12 -0
  50. package/dist/devices/section-7-sensors/index.js +13 -0
  51. package/dist/devices/section-7-sensors/index.js.map +1 -0
  52. package/dist/devices/section-7-sensors/light-sensor.d.ts +7 -0
  53. package/dist/devices/section-7-sensors/light-sensor.js +29 -0
  54. package/dist/devices/section-7-sensors/light-sensor.js.map +1 -0
  55. package/dist/devices/section-7-sensors/occupancy-sensor.d.ts +8 -0
  56. package/dist/devices/section-7-sensors/occupancy-sensor.js +33 -0
  57. package/dist/devices/section-7-sensors/occupancy-sensor.js.map +1 -0
  58. package/dist/devices/section-7-sensors/smoke-co-alarm.d.ts +7 -0
  59. package/dist/devices/section-7-sensors/smoke-co-alarm.js +37 -0
  60. package/dist/devices/section-7-sensors/smoke-co-alarm.js.map +1 -0
  61. package/dist/devices/section-7-sensors/temperature-sensor.d.ts +7 -0
  62. package/dist/devices/section-7-sensors/temperature-sensor.js +29 -0
  63. package/dist/devices/section-7-sensors/temperature-sensor.js.map +1 -0
  64. package/dist/devices/section-7-sensors/water-leak-detector.d.ts +7 -0
  65. package/dist/devices/section-7-sensors/water-leak-detector.js +27 -0
  66. package/dist/devices/section-7-sensors/water-leak-detector.js.map +1 -0
  67. package/dist/devices/section-8-closure/door-lock.d.ts +7 -0
  68. package/dist/devices/section-8-closure/door-lock.js +48 -0
  69. package/dist/devices/section-8-closure/door-lock.js.map +1 -0
  70. package/dist/devices/section-8-closure/index.d.ts +7 -0
  71. package/dist/devices/section-8-closure/index.js +8 -0
  72. package/dist/devices/section-8-closure/index.js.map +1 -0
  73. package/dist/devices/section-8-closure/window-covering.d.ts +9 -0
  74. package/dist/devices/section-8-closure/window-covering.js +154 -0
  75. package/dist/devices/section-8-closure/window-covering.js.map +1 -0
  76. package/dist/devices/section-9-hvac/fan.d.ts +7 -0
  77. package/dist/devices/section-9-hvac/fan.js +56 -0
  78. package/dist/devices/section-9-hvac/fan.js.map +1 -0
  79. package/dist/devices/section-9-hvac/index.d.ts +7 -0
  80. package/dist/devices/section-9-hvac/index.js +8 -0
  81. package/dist/devices/section-9-hvac/index.js.map +1 -0
  82. package/dist/devices/section-9-hvac/thermostat.d.ts +7 -0
  83. package/dist/devices/section-9-hvac/thermostat.js +61 -0
  84. package/dist/devices/section-9-hvac/thermostat.js.map +1 -0
  85. package/dist/devices/types.d.ts +16 -0
  86. package/dist/devices/types.js +5 -0
  87. package/dist/devices/types.js.map +1 -0
  88. package/dist/homebridge-ui/public/index.html +269 -0
  89. package/dist/homebridge-ui/server.js +47 -0
  90. package/dist/platform.d.ts +25 -21
  91. package/dist/platform.js +133 -1023
  92. package/dist/platform.js.map +1 -1
  93. package/package.json +9 -9
  94. package/plugin-header.png +0 -0
  95. package/.claude/settings.local.json +0 -28
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Section 4: Lighting Devices
3
+ *
4
+ * Matter Specification § 4 - Fundamental lighting device types
5
+ */
6
+ export { registerColorTemperatureLight } from './color-temperature-light.js';
7
+ export { registerDimmableLight } from './dimmable-light.js';
8
+ export { registerExtendedColorLight } from './extended-color-light.js';
9
+ export { registerOnOffLight } from './on-off-light.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/devices/section-4-lighting/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * On/Off Light Device (Matter Spec § 4.1)
3
+ *
4
+ * The On/Off Light is a lighting device that is capable of being switched on or off.
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerOnOffLight(context: DeviceContext): any[];
@@ -0,0 +1,37 @@
1
+ /**
2
+ * On/Off Light Device (Matter Spec § 4.1)
3
+ *
4
+ * The On/Off Light is a lighting device that is capable of being switched on or off.
5
+ */
6
+ export function registerOnOffLight(context) {
7
+ const { api, log, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableOnOffLight) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.matter.uuid.generate('matter-onoff-light'),
14
+ displayName: 'On/Off Light',
15
+ deviceType: api.matter.deviceTypes.OnOffLight,
16
+ serialNumber: 'LIGHT-001',
17
+ manufacturer: 'Matter Examples',
18
+ model: 'OnOffLight v1',
19
+ clusters: {
20
+ onOff: {
21
+ onOff: true,
22
+ },
23
+ },
24
+ handlers: {
25
+ onOff: {
26
+ on: async () => {
27
+ log.info('[On/Off Light] ✓ Handler `on` called (user controlled via Home app)');
28
+ },
29
+ off: async () => {
30
+ log.info('[On/Off Light] ✓ Handler `off` called (user controlled via Home app)');
31
+ },
32
+ },
33
+ },
34
+ });
35
+ return accessories;
36
+ }
37
+ //# sourceMappingURL=on-off-light.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"on-off-light.js","sourceRoot":"","sources":["../../../src/devices/section-4-lighting/on-off-light.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,kBAAkB,CAAC,OAAsB;IACvD,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IACpC,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC7B,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACpD,WAAW,EAAE,cAAc;QAC3B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU;QAC7C,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,iBAAiB;QAC/B,KAAK,EAAE,eAAe;QAEtB,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI;aACZ;SACF;QAED,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,EAAE,EAAE,KAAK,IAAI,EAAE;oBACb,GAAG,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAA;gBACjF,CAAC;gBACD,GAAG,EAAE,KAAK,IAAI,EAAE;oBACd,GAAG,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAA;gBAClF,CAAC;aACF;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Dimmable Plug-in Unit Device (Matter Spec § 5.2)
3
+ *
4
+ * A plug-in unit with on/off and level control.
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerDimmablePlugInUnit(context: DeviceContext): any[];
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Dimmable Plug-in Unit Device (Matter Spec § 5.2)
3
+ *
4
+ * A plug-in unit with on/off and level control.
5
+ */
6
+ export function registerDimmablePlugInUnit(context) {
7
+ const { api, log, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableDimmableOutlet) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.matter.uuid.generate('matter-dimmable-outlet'),
14
+ displayName: 'Dimmable Outlet',
15
+ deviceType: api.matter.deviceTypes.DimmableOutlet,
16
+ serialNumber: 'OUTLET-002',
17
+ manufacturer: 'Matter Examples',
18
+ model: 'DimmableOutlet v1',
19
+ clusters: {
20
+ onOff: {
21
+ onOff: false,
22
+ },
23
+ levelControl: {
24
+ currentLevel: 127,
25
+ minLevel: 1,
26
+ maxLevel: 254,
27
+ },
28
+ },
29
+ handlers: {
30
+ onOff: {
31
+ on: async () => {
32
+ log.info('[Dimmable Outlet] ✓ Handler `on` called (user controlled via Home app)');
33
+ },
34
+ off: async () => {
35
+ log.info('[Dimmable Outlet] ✓ Handler `off` called (user controlled via Home app)');
36
+ },
37
+ },
38
+ levelControl: {
39
+ moveToLevelWithOnOff: async (request) => {
40
+ const { level } = request;
41
+ log.info(`[Dimmable Outlet] ✓ Handler \`moveToLevel\` called with ${level} (${Math.round(level / 254 * 100)}%)`);
42
+ },
43
+ },
44
+ },
45
+ });
46
+ return accessories;
47
+ }
48
+ //# sourceMappingURL=dimmable-plug-in-unit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dimmable-plug-in-unit.js","sourceRoot":"","sources":["../../../src/devices/section-5-smart-plugs/dimmable-plug-in-unit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,UAAU,0BAA0B,CAAC,OAAsB;IAC/D,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IACpC,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC;QACjC,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,WAAW,EAAE,iBAAiB;QAC9B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,cAAc;QACjD,YAAY,EAAE,YAAY;QAC1B,YAAY,EAAE,iBAAiB;QAC/B,KAAK,EAAE,mBAAmB;QAE1B,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,KAAK,EAAE,KAAK;aACb;YACD,YAAY,EAAE;gBACZ,YAAY,EAAE,GAAG;gBACjB,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,GAAG;aACd;SACF;QAED,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,EAAE,EAAE,KAAK,IAAI,EAAE;oBACb,GAAG,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAA;gBACpF,CAAC;gBACD,GAAG,EAAE,KAAK,IAAI,EAAE;oBACd,GAAG,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAA;gBACrF,CAAC;aACF;YACD,YAAY,EAAE;gBACZ,oBAAoB,EAAE,KAAK,EAAE,OAAmC,EAAE,EAAE;oBAClE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAA;oBACzB,GAAG,CAAC,IAAI,CAAC,2DAA2D,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,CAAA;gBAClH,CAAC;aACF;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Section 5: Smart Plugs/Actuators
3
+ *
4
+ * Matter Specification § 5 - Devices that control power and fluid flow
5
+ */
6
+ export { registerDimmablePlugInUnit } from './dimmable-plug-in-unit.js';
7
+ export { registerOnOffPlugInUnit } from './on-off-plug-in-unit.js';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Section 5: Smart Plugs/Actuators
3
+ *
4
+ * Matter Specification § 5 - Devices that control power and fluid flow
5
+ */
6
+ export { registerDimmablePlugInUnit } from './dimmable-plug-in-unit.js';
7
+ export { registerOnOffPlugInUnit } from './on-off-plug-in-unit.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/devices/section-5-smart-plugs/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * On/Off Plug-in Unit Device (Matter Spec § 5.1)
3
+ *
4
+ * A plug-in unit with on/off control (smart plug).
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerOnOffPlugInUnit(context: DeviceContext): any[];
@@ -0,0 +1,37 @@
1
+ /**
2
+ * On/Off Plug-in Unit Device (Matter Spec § 5.1)
3
+ *
4
+ * A plug-in unit with on/off control (smart plug).
5
+ */
6
+ export function registerOnOffPlugInUnit(context) {
7
+ const { api, log, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableOnOffOutlet) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.matter.uuid.generate('matter-onoff-outlet'),
14
+ displayName: 'On/Off Outlet',
15
+ deviceType: api.matter.deviceTypes.OnOffOutlet,
16
+ serialNumber: 'OUTLET-001',
17
+ manufacturer: 'Matter Examples',
18
+ model: 'OnOffOutlet v1',
19
+ clusters: {
20
+ onOff: {
21
+ onOff: false,
22
+ },
23
+ },
24
+ handlers: {
25
+ onOff: {
26
+ on: async () => {
27
+ log.info('[On/Off Outlet] ✓ Handler `on` called (user controlled via Home app)');
28
+ },
29
+ off: async () => {
30
+ log.info('[On/Off Outlet] ✓ Handler `off` called (user controlled via Home app)');
31
+ },
32
+ },
33
+ },
34
+ });
35
+ return accessories;
36
+ }
37
+ //# sourceMappingURL=on-off-plug-in-unit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"on-off-plug-in-unit.js","sourceRoot":"","sources":["../../../src/devices/section-5-smart-plugs/on-off-plug-in-unit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,uBAAuB,CAAC,OAAsB;IAC5D,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IACpC,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC9B,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QACrD,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW;QAC9C,YAAY,EAAE,YAAY;QAC1B,YAAY,EAAE,iBAAiB;QAC/B,KAAK,EAAE,gBAAgB;QAEvB,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,KAAK,EAAE,KAAK;aACb;SACF;QAED,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,EAAE,EAAE,KAAK,IAAI,EAAE;oBACb,GAAG,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAA;gBAClF,CAAC;gBACD,GAAG,EAAE,KAAK,IAAI,EAAE;oBACd,GAAG,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAA;gBACnF,CAAC;aACF;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Section 6: Switches & Controllers
3
+ *
4
+ * Matter Specification § 6 - Input devices and control interfaces
5
+ */
6
+ export { registerOnOffLightSwitch } from './on-off-light-switch.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Section 6: Switches & Controllers
3
+ *
4
+ * Matter Specification § 6 - Input devices and control interfaces
5
+ */
6
+ export { registerOnOffLightSwitch } from './on-off-light-switch.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/devices/section-6-switches/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * On/Off Light Switch Device (Matter Spec § 6.1)
3
+ *
4
+ * A switch for controlling on/off lights.
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerOnOffLightSwitch(context: DeviceContext): any[];
@@ -0,0 +1,30 @@
1
+ /**
2
+ * On/Off Light Switch Device (Matter Spec § 6.1)
3
+ *
4
+ * A switch for controlling on/off lights.
5
+ */
6
+ export function registerOnOffLightSwitch(context) {
7
+ const { api, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableOnOffSwitch) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.matter.uuid.generate('matter-onoff-switch'),
14
+ displayName: 'On/Off Switch',
15
+ deviceType: api.matter.deviceTypes.OnOffSwitch,
16
+ serialNumber: 'SWITCH-001',
17
+ manufacturer: 'Matter Examples',
18
+ model: 'OnOffSwitch v1',
19
+ clusters: {
20
+ // Switches are input devices - they send commands rather than expose state
21
+ // The switch cluster configuration depends on the specific implementation
22
+ },
23
+ handlers: {
24
+ // Switch handlers depend on the specific switch implementation
25
+ // Typically, switches trigger events rather than respond to commands
26
+ },
27
+ });
28
+ return accessories;
29
+ }
30
+ //# sourceMappingURL=on-off-light-switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"on-off-light-switch.js","sourceRoot":"","sources":["../../../src/devices/section-6-switches/on-off-light-switch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,wBAAwB,CAAC,OAAsB;IAC7D,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC9B,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QACrD,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW;QAC9C,YAAY,EAAE,YAAY;QAC1B,YAAY,EAAE,iBAAiB;QAC/B,KAAK,EAAE,gBAAgB;QAEvB,QAAQ,EAAE;QACR,2EAA2E;QAC3E,0EAA0E;SAC3E;QAED,QAAQ,EAAE;QACR,+DAA+D;QAC/D,qEAAqE;SACtE;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Contact Sensor Device (Matter Spec § 7.1)
3
+ *
4
+ * A sensor that detects open/close state (e.g., door, window).
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerContactSensor(context: DeviceContext): any[];
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Contact Sensor Device (Matter Spec § 7.1)
3
+ *
4
+ * A sensor that detects open/close state (e.g., door, window).
5
+ */
6
+ export function registerContactSensor(context) {
7
+ const { api, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableContactSensor) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.hap.uuid.generate('matter-contact-sensor'),
14
+ displayName: 'Contact Sensor',
15
+ deviceType: api.matter.deviceTypes.ContactSensor,
16
+ serialNumber: 'CONTACT-001',
17
+ manufacturer: 'Homebridge',
18
+ model: 'Contact Sensor Example',
19
+ clusters: {
20
+ booleanState: {
21
+ stateValue: false, // Contact closed (false = closed, true = open)
22
+ },
23
+ },
24
+ });
25
+ return accessories;
26
+ }
27
+ //# sourceMappingURL=contact-sensor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-sensor.js","sourceRoot":"","sources":["../../../src/devices/section-7-sensors/contact-sensor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,qBAAqB,CAAC,OAAsB;IAC1D,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAChC,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACpD,WAAW,EAAE,gBAAgB;QAC7B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa;QAChD,YAAY,EAAE,aAAa;QAC3B,YAAY,EAAE,YAAY;QAC1B,KAAK,EAAE,wBAAwB;QAC/B,QAAQ,EAAE;YACR,YAAY,EAAE;gBACZ,UAAU,EAAE,KAAK,EAAE,+CAA+C;aACnE;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Humidity Sensor Device (Matter Spec § 7.7)
3
+ *
4
+ * A sensor that measures relative humidity.
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerHumiditySensor(context: DeviceContext): any[];
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Humidity Sensor Device (Matter Spec § 7.7)
3
+ *
4
+ * A sensor that measures relative humidity.
5
+ */
6
+ export function registerHumiditySensor(context) {
7
+ const { api, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableHumiditySensor) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.hap.uuid.generate('matter-humidity-sensor'),
14
+ displayName: 'Humidity Sensor',
15
+ deviceType: api.matter.deviceTypes.HumiditySensor,
16
+ serialNumber: 'HUM-001',
17
+ manufacturer: 'Homebridge',
18
+ model: 'Humidity Sensor Example',
19
+ clusters: {
20
+ relativeHumidityMeasurement: {
21
+ measuredValue: 5500, // 55% (in hundredths of a percent)
22
+ minMeasuredValue: 0,
23
+ maxMeasuredValue: 10000, // 100%
24
+ },
25
+ },
26
+ });
27
+ return accessories;
28
+ }
29
+ //# sourceMappingURL=humidity-sensor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"humidity-sensor.js","sourceRoot":"","sources":["../../../src/devices/section-7-sensors/humidity-sensor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,sBAAsB,CAAC,OAAsB;IAC3D,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC;QACjC,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACrD,WAAW,EAAE,iBAAiB;QAC9B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,cAAc;QACjD,YAAY,EAAE,SAAS;QACvB,YAAY,EAAE,YAAY;QAC1B,KAAK,EAAE,yBAAyB;QAChC,QAAQ,EAAE;YACR,2BAA2B,EAAE;gBAC3B,aAAa,EAAE,IAAI,EAAE,mCAAmC;gBACxD,gBAAgB,EAAE,CAAC;gBACnB,gBAAgB,EAAE,KAAK,EAAE,OAAO;aACjC;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Section 7: Sensors
3
+ *
4
+ * Matter Specification § 7 - All sensor types
5
+ */
6
+ export { registerContactSensor } from './contact-sensor.js';
7
+ export { registerHumiditySensor } from './humidity-sensor.js';
8
+ export { registerLightSensor } from './light-sensor.js';
9
+ export { registerOccupancySensor } from './occupancy-sensor.js';
10
+ export { registerSmokeCoAlarm } from './smoke-co-alarm.js';
11
+ export { registerTemperatureSensor } from './temperature-sensor.js';
12
+ export { registerWaterLeakDetector } from './water-leak-detector.js';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Section 7: Sensors
3
+ *
4
+ * Matter Specification § 7 - All sensor types
5
+ */
6
+ export { registerContactSensor } from './contact-sensor.js';
7
+ export { registerHumiditySensor } from './humidity-sensor.js';
8
+ export { registerLightSensor } from './light-sensor.js';
9
+ export { registerOccupancySensor } from './occupancy-sensor.js';
10
+ export { registerSmokeCoAlarm } from './smoke-co-alarm.js';
11
+ export { registerTemperatureSensor } from './temperature-sensor.js';
12
+ export { registerWaterLeakDetector } from './water-leak-detector.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/devices/section-7-sensors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Light Sensor Device (Matter Spec § 7.2)
3
+ *
4
+ * A sensor that measures illuminance (light level).
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerLightSensor(context: DeviceContext): any[];
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Light Sensor Device (Matter Spec § 7.2)
3
+ *
4
+ * A sensor that measures illuminance (light level).
5
+ */
6
+ export function registerLightSensor(context) {
7
+ const { api, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableLightSensor) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.hap.uuid.generate('matter-light-sensor'),
14
+ displayName: 'Light Sensor',
15
+ deviceType: api.matter.deviceTypes.LightSensor,
16
+ serialNumber: 'LIGHT-001',
17
+ manufacturer: 'Homebridge',
18
+ model: 'Light Sensor Example',
19
+ clusters: {
20
+ illuminanceMeasurement: {
21
+ measuredValue: 5000, // 500 lux (in 10,000 * log10(lux) format)
22
+ minMeasuredValue: 1,
23
+ maxMeasuredValue: 65534,
24
+ },
25
+ },
26
+ });
27
+ return accessories;
28
+ }
29
+ //# sourceMappingURL=light-sensor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"light-sensor.js","sourceRoot":"","sources":["../../../src/devices/section-7-sensors/light-sensor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,mBAAmB,CAAC,OAAsB;IACxD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC9B,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QAClD,WAAW,EAAE,cAAc;QAC3B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW;QAC9C,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,YAAY;QAC1B,KAAK,EAAE,sBAAsB;QAC7B,QAAQ,EAAE;YACR,sBAAsB,EAAE;gBACtB,aAAa,EAAE,IAAI,EAAE,0CAA0C;gBAC/D,gBAAgB,EAAE,CAAC;gBACnB,gBAAgB,EAAE,KAAK;aACxB;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Occupancy Sensor Device (Matter Spec § 7.3)
3
+ *
4
+ * A sensor that detects occupancy/motion using various sensing methods.
5
+ * This implementation uses Passive Infrared (PIR) detection.
6
+ */
7
+ import type { DeviceContext } from '../types.js';
8
+ export declare function registerOccupancySensor(context: DeviceContext): any[];
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Occupancy Sensor Device (Matter Spec § 7.3)
3
+ *
4
+ * A sensor that detects occupancy/motion using various sensing methods.
5
+ * This implementation uses Passive Infrared (PIR) detection.
6
+ */
7
+ export function registerOccupancySensor(context) {
8
+ const { api, config } = context;
9
+ const accessories = [];
10
+ if (!config.enableMotionSensor) {
11
+ return accessories;
12
+ }
13
+ // OccupancySensorDevice requires specifying features (PIR, Ultrasonic, or PhysicalContact)
14
+ const OccupancySensingServer = api.matter.deviceTypes.MotionSensor.requirements.OccupancySensingServer;
15
+ const MotionSensorWithPIR = api.matter.deviceTypes.MotionSensor.with(OccupancySensingServer.with('PassiveInfrared'));
16
+ accessories.push({
17
+ uuid: api.hap.uuid.generate('matter-motion-sensor'),
18
+ displayName: 'Motion Sensor',
19
+ deviceType: MotionSensorWithPIR,
20
+ serialNumber: 'MOTION-001',
21
+ manufacturer: 'Homebridge',
22
+ model: 'Motion Sensor Example',
23
+ clusters: {
24
+ occupancySensing: {
25
+ occupancy: {
26
+ occupied: false, // No motion detected
27
+ },
28
+ },
29
+ },
30
+ });
31
+ return accessories;
32
+ }
33
+ //# sourceMappingURL=occupancy-sensor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"occupancy-sensor.js","sourceRoot":"","sources":["../../../src/devices/section-7-sensors/occupancy-sensor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,UAAU,uBAAuB,CAAC,OAAsB;IAC5D,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC;QAC/B,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,2FAA2F;IAC3F,MAAM,sBAAsB,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,YAAY,CAAC,sBAAsB,CAAA;IACtG,MAAM,mBAAmB,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAClE,sBAAsB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAC/C,CAAA;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QACnD,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,mBAAmB;QAC/B,YAAY,EAAE,YAAY;QAC1B,YAAY,EAAE,YAAY;QAC1B,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE;YACR,gBAAgB,EAAE;gBAChB,SAAS,EAAE;oBACT,QAAQ,EAAE,KAAK,EAAE,qBAAqB;iBACvC;aACF;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Smoke/CO Alarm Device (Matter Spec § 7.9)
3
+ *
4
+ * A combined smoke and carbon monoxide alarm sensor.
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerSmokeCoAlarm(context: DeviceContext): any[];
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Smoke/CO Alarm Device (Matter Spec § 7.9)
3
+ *
4
+ * A combined smoke and carbon monoxide alarm sensor.
5
+ */
6
+ export function registerSmokeCoAlarm(context) {
7
+ const { api, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableSmokeSensor) {
10
+ return accessories;
11
+ }
12
+ // SmokeCoAlarmDevice requires specifying features (SmokeAlarm and/or CoAlarm)
13
+ const SmokeCoAlarmServer = api.matter.deviceTypes.SmokeSensor.requirements.SmokeCoAlarmServer;
14
+ const SmokeSensorWithBoth = api.matter.deviceTypes.SmokeSensor.with(SmokeCoAlarmServer.with('SmokeAlarm', 'CoAlarm'));
15
+ accessories.push({
16
+ uuid: api.hap.uuid.generate('matter-smoke-sensor'),
17
+ displayName: 'Smoke Sensor',
18
+ deviceType: SmokeSensorWithBoth,
19
+ serialNumber: 'SMOKE-001',
20
+ manufacturer: 'Homebridge',
21
+ model: 'Smoke Sensor Example',
22
+ clusters: {
23
+ smokeCoAlarm: {
24
+ smokeState: 0, // 0 = Normal, 1 = Warning, 2 = Critical
25
+ coState: 0, // 0 = Normal, 1 = Warning, 2 = Critical
26
+ batteryAlert: 0, // 0 = Normal
27
+ testInProgress: false,
28
+ hardwareFaultAlert: false,
29
+ endOfServiceAlert: 0, // 0 = Normal
30
+ interconnectSmokeAlarm: 0, // 0 = Normal
31
+ interconnectCoAlarm: 0, // 0 = Normal
32
+ },
33
+ },
34
+ });
35
+ return accessories;
36
+ }
37
+ //# sourceMappingURL=smoke-co-alarm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smoke-co-alarm.js","sourceRoot":"","sources":["../../../src/devices/section-7-sensors/smoke-co-alarm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,oBAAoB,CAAC,OAAsB;IACzD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC9B,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,8EAA8E;IAC9E,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAA;IAC7F,MAAM,mBAAmB,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CACjE,kBAAkB,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CACjD,CAAA;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QAClD,WAAW,EAAE,cAAc;QAC3B,UAAU,EAAE,mBAAmB;QAC/B,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,YAAY;QAC1B,KAAK,EAAE,sBAAsB;QAC7B,QAAQ,EAAE;YACR,YAAY,EAAE;gBACZ,UAAU,EAAE,CAAC,EAAE,wCAAwC;gBACvD,OAAO,EAAE,CAAC,EAAE,wCAAwC;gBACpD,YAAY,EAAE,CAAC,EAAE,aAAa;gBAC9B,cAAc,EAAE,KAAK;gBACrB,kBAAkB,EAAE,KAAK;gBACzB,iBAAiB,EAAE,CAAC,EAAE,aAAa;gBACnC,sBAAsB,EAAE,CAAC,EAAE,aAAa;gBACxC,mBAAmB,EAAE,CAAC,EAAE,aAAa;aACtC;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Temperature Sensor Device (Matter Spec § 7.4)
3
+ *
4
+ * A sensor that measures ambient temperature.
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerTemperatureSensor(context: DeviceContext): any[];
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Temperature Sensor Device (Matter Spec § 7.4)
3
+ *
4
+ * A sensor that measures ambient temperature.
5
+ */
6
+ export function registerTemperatureSensor(context) {
7
+ const { api, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableTemperatureSensor) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.hap.uuid.generate('matter-temperature-sensor'),
14
+ displayName: 'Temperature Sensor',
15
+ deviceType: api.matter.deviceTypes.TemperatureSensor,
16
+ serialNumber: 'TEMP-001',
17
+ manufacturer: 'Homebridge',
18
+ model: 'Temperature Sensor Example',
19
+ clusters: {
20
+ temperatureMeasurement: {
21
+ measuredValue: 2100, // 21.00°C (in hundredths of a degree Celsius)
22
+ minMeasuredValue: -5000, // -50°C
23
+ maxMeasuredValue: 10000, // 100°C
24
+ },
25
+ },
26
+ });
27
+ return accessories;
28
+ }
29
+ //# sourceMappingURL=temperature-sensor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"temperature-sensor.js","sourceRoot":"","sources":["../../../src/devices/section-7-sensors/temperature-sensor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,yBAAyB,CAAC,OAAsB;IAC9D,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC;QACpC,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QACxD,WAAW,EAAE,oBAAoB;QACjC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,iBAAiB;QACpD,YAAY,EAAE,UAAU;QACxB,YAAY,EAAE,YAAY;QAC1B,KAAK,EAAE,4BAA4B;QACnC,QAAQ,EAAE;YACR,sBAAsB,EAAE;gBACtB,aAAa,EAAE,IAAI,EAAE,8CAA8C;gBACnE,gBAAgB,EAAE,CAAC,IAAI,EAAE,QAAQ;gBACjC,gBAAgB,EAAE,KAAK,EAAE,QAAQ;aAClC;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Water Leak Detector Device (Matter Spec § 7.12)
3
+ *
4
+ * A sensor that detects the presence of water/leaks.
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerWaterLeakDetector(context: DeviceContext): any[];
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Water Leak Detector Device (Matter Spec § 7.12)
3
+ *
4
+ * A sensor that detects the presence of water/leaks.
5
+ */
6
+ export function registerWaterLeakDetector(context) {
7
+ const { api, config } = context;
8
+ const accessories = [];
9
+ if (!config.enableLeakSensor) {
10
+ return accessories;
11
+ }
12
+ accessories.push({
13
+ uuid: api.hap.uuid.generate('matter-leak-sensor'),
14
+ displayName: 'Leak Sensor',
15
+ deviceType: api.matter.deviceTypes.LeakSensor,
16
+ serialNumber: 'LEAK-001',
17
+ manufacturer: 'Homebridge',
18
+ model: 'Leak Sensor Example',
19
+ clusters: {
20
+ booleanState: {
21
+ stateValue: false, // No leak detected (false = dry, true = leak)
22
+ },
23
+ },
24
+ });
25
+ return accessories;
26
+ }
27
+ //# sourceMappingURL=water-leak-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"water-leak-detector.js","sourceRoot":"","sources":["../../../src/devices/section-7-sensors/water-leak-detector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,yBAAyB,CAAC,OAAsB;IAC9D,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAU,EAAE,CAAA;IAE7B,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC7B,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,WAAW,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACjD,WAAW,EAAE,aAAa;QAC1B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU;QAC7C,YAAY,EAAE,UAAU;QACxB,YAAY,EAAE,YAAY;QAC1B,KAAK,EAAE,qBAAqB;QAC5B,QAAQ,EAAE;YACR,YAAY,EAAE;gBACZ,UAAU,EAAE,KAAK,EAAE,8CAA8C;aAClE;SACF;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Door Lock Device (Matter Spec § 8.1)
3
+ *
4
+ * A lock that can be locked and unlocked remotely.
5
+ */
6
+ import type { DeviceContext } from '../types.js';
7
+ export declare function registerDoorLock(context: DeviceContext): any[];