homebridge-dummy 1.1.0-beta.1 → 1.1.0-beta.10

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 (67) hide show
  1. package/CHANGELOG.md +15 -5
  2. package/README.md +59 -27
  3. package/config.schema.json +178 -93
  4. package/dist/accessory/base.d.ts +6 -3
  5. package/dist/accessory/base.js +22 -10
  6. package/dist/accessory/base.js.map +1 -1
  7. package/dist/accessory/helpers.js +3 -0
  8. package/dist/accessory/helpers.js.map +1 -1
  9. package/dist/accessory/lock.d.ts +1 -1
  10. package/dist/accessory/lock.js +12 -1
  11. package/dist/accessory/lock.js.map +1 -1
  12. package/dist/accessory/onoff/lightbulb.d.ts +2 -2
  13. package/dist/accessory/onoff/lightbulb.js +5 -0
  14. package/dist/accessory/onoff/lightbulb.js.map +1 -1
  15. package/dist/accessory/onoff/onoff.d.ts +3 -4
  16. package/dist/accessory/onoff/onoff.js +15 -6
  17. package/dist/accessory/onoff/onoff.js.map +1 -1
  18. package/dist/accessory/position/position.d.ts +1 -1
  19. package/dist/accessory/position/position.js +12 -1
  20. package/dist/accessory/position/position.js.map +1 -1
  21. package/dist/accessory/sensor.d.ts +11 -11
  22. package/dist/accessory/sensor.js +44 -30
  23. package/dist/accessory/sensor.js.map +1 -1
  24. package/dist/accessory/thermostat.d.ts +28 -0
  25. package/dist/accessory/thermostat.js +151 -0
  26. package/dist/accessory/thermostat.js.map +1 -0
  27. package/dist/homebridge-ui/public/index.html +2 -2
  28. package/dist/homebridge-ui/public/ui.js +1 -1
  29. package/dist/i18n/en.d.ts +26 -4
  30. package/dist/i18n/en.js +34 -12
  31. package/dist/i18n/en.js.map +1 -1
  32. package/dist/i18n/i18n.d.ts +26 -4
  33. package/dist/i18n/template.d.ts +26 -4
  34. package/dist/i18n/zz.d.ts +26 -4
  35. package/dist/model/types.d.ts +33 -9
  36. package/dist/model/types.js +19 -5
  37. package/dist/model/types.js.map +1 -1
  38. package/dist/timeout/schedule.d.ts +14 -0
  39. package/dist/timeout/schedule.js +68 -0
  40. package/dist/timeout/schedule.js.map +1 -0
  41. package/dist/timeout/timeout.d.ts +23 -0
  42. package/dist/timeout/timeout.js +91 -0
  43. package/dist/timeout/timeout.js.map +1 -0
  44. package/dist/timeout/timer.d.ts +10 -0
  45. package/dist/timeout/timer.js +29 -0
  46. package/dist/timeout/timer.js.map +1 -0
  47. package/dist/tools/configMigration.js +2 -2
  48. package/dist/tools/configMigration.js.map +1 -1
  49. package/dist/tools/storage.d.ts +1 -0
  50. package/dist/tools/storage.js +1 -0
  51. package/dist/tools/storage.js.map +1 -1
  52. package/dist/tools/temperature.d.ts +3 -0
  53. package/dist/tools/temperature.js +14 -0
  54. package/dist/tools/temperature.js.map +1 -0
  55. package/dist/tools/validation.d.ts +2 -0
  56. package/dist/tools/validation.js +7 -0
  57. package/dist/tools/validation.js.map +1 -1
  58. package/package.json +19 -3
  59. package/dist/model/timer.d.ts +0 -16
  60. package/dist/model/timer.js +0 -65
  61. package/dist/model/timer.js.map +0 -1
  62. package/dist/model/trigger.d.ts +0 -14
  63. package/dist/model/trigger.js +0 -73
  64. package/dist/model/trigger.js.map +0 -1
  65. package/dist/tools/time.d.ts +0 -5
  66. package/dist/tools/time.js +0 -15
  67. package/dist/tools/time.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to homebridge-dummy will be documented in this file.
4
4
 
5
- ## 1.1.0-beta.1 (2025-07-29)
5
+ ## 1.1.0 (2025-08-13)
6
6
 
7
7
  ### ‼️ WARNING — Read this if upgrading from v0.9.2 or earlier…
8
8
 
@@ -11,15 +11,25 @@ Automations and scenes using Homebridge Dummy accessories will need to be reconf
11
11
  ---
12
12
 
13
13
  ### Added
14
- - Groups (Beta) - Items sharing the same group name will be collected together in the Home app UI
14
+ - Groups (Beta) - Items sharing the same group name can be grouped together in a single accessory in the Home.app UI ([#46](https://github.com/mpatfield/homebridge-dummy/issues/46))
15
15
  - ⚠️ Adding/removing/changing the group name for an accessory will require you to reconfigure any HomeKit scenes or automations
16
- - Auto-Trigger feature to invoke accessory at a specified interval or times
16
+ - "Schedule" feature to invoke accessory at a specified interval or times via cron ([#136](https://github.com/mpatfield/homebridge-dummy/issues/136))
17
+ - Added "Activate Sensor on Auto-Reset" option ([#142](https://github.com/mpatfield/homebridge-dummy/issues/142))
18
+ - Instead of mirroring accessory, sensor will be activated only when accessory auto-resets
19
+ - Millisecond unit option ([#149](https://github.com/mpatfield/homebridge-dummy/issues/149))
20
+ - Rudimentary support for Thermostats ([#145](https://github.com/mpatfield/homebridge-dummy/issues/145))
21
+ - Manual control only, no scheduling or auto-reset functionality
22
+ - Allow `sensor` to be attached to all accessory types (excluding Thermostat)
17
23
 
18
24
  ### Changed
19
- - Reorganized plugin config UI and renamed "Timer" to "Auto-Reset"
25
+ - Reorganized plugin config UI and renamed "Timer" to "Auto-Reset Timer"
26
+ - `sensor` is now an object rather than a primitive string (backwards compatible)
27
+ - Updated dependencies
20
28
 
21
29
  ### Fixed
22
- - Timers over 1 hour were logging incorrectly ([#143](https://github.com/mpatfield/homebridge-dummy/issues/143))
30
+ - Timer logging issues ([#143](https://github.com/mpatfield/homebridge-dummy/issues/143), [#148](https://github.com/mpatfield/homebridge-dummy/issues/148))
31
+ - Better support for custom configuration with multiple plugin instances and child bridges ([#152](https://github.com/mpatfield/homebridge-dummy/issues/152))
32
+ - Broken header image in config UI
23
33
 
24
34
  ## 1.0.0 (2025-07-23)
25
35
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  <p align="center">
3
- <img src="https://github.com/mpatfield/homebridge-dummy/blob/latest/img/banner.png?raw=true" width="600">
3
+ <img src="https://raw.githubusercontent.com/mpatfield/homebridge-dummy/refs/heads/latest/img/banner.png" width="600">
4
4
  </p>
5
5
 
6
6
  <span align="center">
@@ -70,9 +70,9 @@ The first thing the flow does is create a backup called `config.json.bak` in you
70
70
 
71
71
  ## About
72
72
 
73
- With this plugin, you can create any number of fake accessories that will do nothing when triggered. This can be very useful for advanced automation with HomeKit scenes.
73
+ With this plugin, you can create any number of fake accessories which are useful for advanced automation with HomeKit scenes. Features include scheduling to trigger at a specific interval or times, resetting automatically after a delay, activating sensors such as motion or occupancy, running arbitrary commands such as cron, and more.
74
74
 
75
- Currently, only Lightbulbs, Locks, Outlets, and Switches are supported. If there is a particular device you'd like to see supported, please [create an issue](https://github.com/mpatfield/homebridge-dummy/issues/new?template=new-issue.md).
75
+ Currently, Doors, Lightbulbs, Locks, Outlets, Switches, Thermostats, Windows, and Blinds are supported. If there is a particular device or feature you'd like to see, please [create an issue](https://github.com/mpatfield/homebridge-dummy/issues/new?template=new-issue.md).
76
76
 
77
77
  ## Configuration
78
78
 
@@ -85,29 +85,38 @@ Using the Homebridge Config UI is the easiest way to set up this plugin. However
85
85
  {
86
86
  "id": "string",
87
87
  "name": "string",
88
+ "type": "Door | Lightbulb | LockMechanism | Outlet | Switch | Thermostat | Window | WindoCovering",
88
89
  "groupName": "string",
89
- "type": "Door | Lightbulb | LockMechanism | Outlet | Switch | Window | WindoCovering",
90
90
  "timer": {
91
91
  "delay": number,
92
- "units": "SECONDS | MINUTES | HOURS",
92
+ "units": "MILLISECONDS | SECONDS | MINUTES | HOURS",
93
93
  "random": true | false
94
94
  },
95
- "trigger": {
95
+ "schedule": {
96
96
  "type": "INTERVAL" | "CRON",
97
97
  "interval": number,
98
- "units": "SECONDS | MINUTES | HOURS",
98
+ "units": "MILLISECONDS | SECONDS | MINUTES | HOURS",
99
99
  "random": true | false,
100
100
  "cron": "string"
101
101
  },
102
- "sensor": "CarbonDioxideSensor | CarbonMonoxideSensor | ContactSensor | LeakSensor | MotionSensor | OccupancySensor | SmokeSensor",
102
+ "sensor": {
103
+ "type": "CarbonDioxideSensor | CarbonMonoxideSensor | ContactSensor | LeakSensor | MotionSensor | OccupancySensor | SmokeSensor",
104
+ "timerControlled": true | false
105
+ }
106
+ "temperatureUnits": "C" | "F",
103
107
  "defaultOn": true | false,
104
108
  "defaultBrightness": 0-100,
105
109
  "defaultLockState": "locked" | "unlocked",
106
110
  "defaultPosition": "open" | "closed",
107
- "onCommand": "string",
108
- "offCommand": "string",
109
- "lockCommand": "string",
110
- "unlockCommand": "string",
111
+ "defaultThermostatState": "auto" | "heat" | "cool" | "off",
112
+ "defaultTemperature": number,
113
+ "commandOn": "string",
114
+ "commandOff": "string",
115
+ "commandLock": "string",
116
+ "commandUnlock": "string",
117
+ "commandOpen": "string",
118
+ "commandClose": "string",
119
+ "commandTemperature": "string",
111
120
  "resetOnRestart": true | false,
112
121
  "disableLogging": true | false
113
122
  }
@@ -122,25 +131,27 @@ All fields are optional unless noted with an asterisk (*)
122
131
  - `id`* - A unique identifier for the accessory. Changing this value will create a new accessory.
123
132
 
124
133
  - `name`* - The display name for the accessory in HomeKit
125
- - `type`* - The type of accessory: `Door`, `Lightbulb`, `LockMechanism`, `Outlet`, `Switch`, `Window`, or `WindowCovering`
134
+ - `type`* - The type of accessory: `Door`, `Lightbulb`, `LockMechanism`, `Outlet`, `Switch`, `Thermostat`, `Window`, or `WindowCovering`
126
135
 
127
136
  - `groupName` - (Beta) Items sharing the same group name will be collected together in the Home app UI
128
137
  - ⚠️ Adding/removing/changing the group name will require you to reconfigure any HomeKit scenes or automations
129
138
 
130
- - `timer.delay` — If defined, the switch will automatically toggle after this many seconds/minutes/hours
131
- - `timer.units` — The units to use for delay above (`SECONDS`, `MINUTES`, or `HOURS`). *Required if delay is set.
139
+ - `timer.delay` — If defined, the switch will automatically toggle after this many milliseconds/seconds/minutes/hours
140
+ - `timer.units` — The units to use for delay above (`MILLISECONDS`, `SECONDS`, `MINUTES`, or `HOURS`). *Required if delay is set.
132
141
  - `timer.random` — If true, the delay will be randomized with a maximum value of `timer.delay`
133
142
 
134
- - `trigger.type` — Automatically set the accessory to it's non-default value
135
- - `trigger.interval` — Trigger the accessory after this many seconds/minutes/hours. *Required if `trigger.type` = `INTERVAL`
136
- - `trigger.units` — The units to use for the interval (`SECONDS`, `MINUTES`, or `HOURS`) *Required if `trigger.type` = `INTERVAL`
137
- - `trigger.random` — If true, the interval will be randomized with a maximum value of `trigger.interval`
138
- - `trigger.cron` — The cron string for triggering the accessory. *Required if `trigger.type` = `CRON`
143
+ - `schedule.type` — Automatically set the accessory to it's non-default value
144
+ - `schedule.interval` — Trigger the accessory after this many milliseconds/seconds/minutes/hours. *Required if `schedule.type` = `INTERVAL`
145
+ - `schedule.units` — The units to use for the interval (`MILLISECONDS`, `SECONDS`, `MINUTES`, or `HOURS`) *Required if `schedule.type` = `INTERVAL`
146
+ - `schedule.random` — If true, the interval will be randomized with a maximum value of `schedule.interval`
147
+ - `schedule.cron` — The cron string for triggering the accessory. *Required if `schedule.type` = `CRON`
139
148
  - See [crontab.guru](http://crontab.guru) for help
140
149
 
141
- - `sensor` - Optionally attach a sensor that mirrors the state of the parent accessory
142
- - Only works with `Lightbulb`, `Outlet`, and `Switch`
150
+ - `sensor.type` - Optionally attach a sensor that mirrors the state of the parent accessory
143
151
  - Valid values are `CarbonDioxideSensor`, `CarbonMonoxideSensor`, `ContactSensor`, `LeakSensor`, `MotionSensor`, `OccupancySensor`, or `SmokeSensor`
152
+ - `sensor.timerControlled` - If true, sensor will be activated if accessory is reset by timer but not if it is reset manually
153
+
154
+ - `temperatureUnits` - Units to use for thermostats, either 'C' or 'F'
144
155
 
145
156
  - `defaultOn` — Initial value. Default _ON_ = true, default _OFF_ = false
146
157
 
@@ -150,12 +161,18 @@ All fields are optional unless noted with an asterisk (*)
150
161
 
151
162
  - `defaultPosition` — Initial position for the door/window/blinds, "open" or "closed"
152
163
 
153
- - `onCommand` - Arbitraty command to execute when lightbulb/outlet/switch turns on
154
- - `offCommand` - Arbitraty command to execute when lightbulb/outlet/switch turns off
164
+ - `defaultThermostatState` - The initial state for the thermostat, "auto", "heat", "cool", or "off"
165
+
166
+ - `defaultTemperature` - The default temperature for the thermostat in `temperatureUnits` defined above
167
+
168
+ - `onCommand` - Arbitraty command to execute when lightbulb/outlet/switch/thermostat turns on
169
+ - `offCommand` - Arbitraty command to execute when lightbulb/outlet/switch/thermostat turns off
155
170
 
156
171
  - `lockCommand` - Arbitraty command to execute when lock mechanism is locked
157
172
  - `unlockCommand` - Arbitraty command to execute when lock mechanism is unlocked
158
173
 
174
+ - `commandTemperature` - Arbitrary command to execute when temperature changes
175
+
159
176
  - `resetOnRestart` _ If true, accessory will return to default state when Homebridge restarts
160
177
 
161
178
  - `disableLogging` — If true, state changes will not be logged
@@ -287,7 +304,7 @@ All fields are optional unless noted with an asterisk (*)
287
304
  }
288
305
  ```
289
306
 
290
- ### Hourly Trigger Switch
307
+ ### Hourly Schedule Switch
291
308
  ```json
292
309
  {
293
310
  "name": "Hourly",
@@ -296,7 +313,7 @@ All fields are optional unless noted with an asterisk (*)
296
313
  "delay": 1,
297
314
  "units": "SECONDS"
298
315
  },
299
- "trigger": {
316
+ "schedule": {
300
317
  "type": "INTERVAL",
301
318
  "interval": 1,
302
319
  "units": "HOURS"
@@ -304,12 +321,27 @@ All fields are optional unless noted with an asterisk (*)
304
321
  }
305
322
  ```
306
323
 
324
+ ### Thermostat
325
+ ```json
326
+ {
327
+ "name": "Thermostat",
328
+ "type": "Thermostat",
329
+ "temperatureUnits": "F",
330
+ "defaultThermostatState": "heat",
331
+ "defaultTemperature": 78
332
+ }
333
+ ```
334
+
307
335
  ## Credits
308
336
 
309
337
  Special thanks to [@nfarina](https://github.com/sponsors/nfarina) for creating the original version of this plugin and maintaining it for almost 10 (!!!) years
310
338
 
311
339
  [Keryan Belahcene](https://www.instagram.com/keryan.me) for creating the [Flume](https://github.com/homebridge-plugins/homebridge-flume) banner image which was adapted for use with this plugin
312
340
 
313
- Auto-Trigger feature inspired by [Homebridge Schedule](https://github.com/kbrashears5/typescript-homebridge-schedule) by [@kbrashears5](https://github.com/sponsors/kbrashears5)
341
+ Schedule feature inspired by [Homebridge Schedule](https://github.com/kbrashears5/typescript-homebridge-schedule) by [@kbrashears5](https://github.com/sponsors/kbrashears5)
342
+
343
+ Sensor feature inspired by [Homebridge-Delay-Switch](https://github.com/nitaybz/homebridge-delay-switch#readme) by [@nitaybz](https://github.com/sponsors/nitaybz)
344
+
345
+ Command feature inspired by [homebridge-cmdtrigger](https://github.com/hallos/homebridge-cmdtrigger) by [@hallos](https://github.com/sponsors/hallos)
314
346
 
315
347
  And to the amazing creators/contributors of [Homebridge](https://homebridge.io) who made this plugin possible!