homebridge-dummy 1.1.0-beta.0 → 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 (61) hide show
  1. package/CHANGELOG.md +24 -14
  2. package/README.md +84 -19
  3. package/config.schema.json +263 -98
  4. package/dist/accessory/base.d.ts +8 -4
  5. package/dist/accessory/base.js +26 -18
  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 +2 -1
  10. package/dist/accessory/lock.js +23 -5
  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 +4 -4
  16. package/dist/accessory/onoff/onoff.js +24 -8
  17. package/dist/accessory/onoff/onoff.js.map +1 -1
  18. package/dist/accessory/position/position.d.ts +2 -1
  19. package/dist/accessory/position/position.js +22 -4
  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 +37 -2
  30. package/dist/i18n/en.js +44 -9
  31. package/dist/i18n/en.js.map +1 -1
  32. package/dist/i18n/i18n.d.ts +37 -2
  33. package/dist/i18n/template.d.ts +37 -2
  34. package/dist/i18n/zz.d.ts +37 -2
  35. package/dist/model/types.d.ts +37 -1
  36. package/dist/model/types.js +19 -0
  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 +21 -3
  59. package/dist/model/timer.d.ts +0 -12
  60. package/dist/model/timer.js +0 -62
  61. package/dist/model/timer.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,25 +1,35 @@
1
- ## ‼️ WARNING - READ BEFORE CONTINUING ‼️
2
-
3
- If upgrading from v0.9.2 or earlier, automations and scenes using Homebridge Dummy accessories will need to be reconfigured.
4
-
5
- ## ⚠️ IMPORTANT ⚠️
6
-
7
- After installing v1.0, you must **RESTART HOMEBRIDGE SERVICE & UI** (not just *RESTART HOMEBRIDGE*) before continuing or you will experience issues with Homebridge Dummy configuration.
1
+ # Change Log
8
2
 
9
- Once you have restarted both Homebridge and the UI, you will need to open the Homebridge Dummy plugin settings to run the accessory migration helper.
3
+ All notable changes to homebridge-dummy will be documented in this file.
10
4
 
11
- Full details [here](https://github.com/mpatfield/homebridge-dummy?tab=readme-ov-file#v10-migration).
5
+ ## 1.1.0 (2025-08-13)
12
6
 
13
- # Change Log
7
+ ### ‼️ WARNING — Read this if upgrading from v0.9.2 or earlier…
14
8
 
15
- All notable changes to homebridge-dummy will be documented in this file.
9
+ Automations and scenes using Homebridge Dummy accessories will need to be reconfigured. After upgrading, you must **RESTART HOMEBRIDGE SERVICE & UI** (not just *RESTART HOMEBRIDGE*). After restarting, open the Homebridge Dummy plugin settings to run the accessory migration helper. Full details [here](https://github.com/mpatfield/homebridge-dummy?tab=readme-ov-file#v10-migration).
16
10
 
17
- ## 1.1.0-beta.X (XXXX-XX-XX)
11
+ ---
18
12
 
19
13
  ### Added
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
+ - ⚠️ Adding/removing/changing the group name for an accessory will require you to reconfigure any HomeKit scenes or automations
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)
20
23
 
21
- - Groups (Beta) - Items sharing the same group name will be collected together in the Home app UI
22
- - ⚠️ Adding/removing/changing the group name will require you to reconfigure any HomeKit scenes or automations
24
+ ### Changed
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
28
+
29
+ ### Fixed
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,22 +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
- "sensor": "CarbonDioxideSensor | CarbonMonoxideSensor | ContactSensor | LeakSensor | MotionSensor | OccupancySensor | SmokeSensor",
95
+ "schedule": {
96
+ "type": "INTERVAL" | "CRON",
97
+ "interval": number,
98
+ "units": "MILLISECONDS | SECONDS | MINUTES | HOURS",
99
+ "random": true | false,
100
+ "cron": "string"
101
+ },
102
+ "sensor": {
103
+ "type": "CarbonDioxideSensor | CarbonMonoxideSensor | ContactSensor | LeakSensor | MotionSensor | OccupancySensor | SmokeSensor",
104
+ "timerControlled": true | false
105
+ }
106
+ "temperatureUnits": "C" | "F",
96
107
  "defaultOn": true | false,
97
108
  "defaultBrightness": 0-100,
98
109
  "defaultLockState": "locked" | "unlocked",
99
110
  "defaultPosition": "open" | "closed",
100
- "onCommand": "string",
101
- "offCommand": "string",
102
- "lockCommand": "string",
103
- "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",
104
120
  "resetOnRestart": true | false,
105
121
  "disableLogging": true | false
106
122
  }
@@ -115,18 +131,27 @@ All fields are optional unless noted with an asterisk (*)
115
131
  - `id`* - A unique identifier for the accessory. Changing this value will create a new accessory.
116
132
 
117
133
  - `name`* - The display name for the accessory in HomeKit
118
- - `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`
119
135
 
120
136
  - `groupName` - (Beta) Items sharing the same group name will be collected together in the Home app UI
121
137
  - ⚠️ Adding/removing/changing the group name will require you to reconfigure any HomeKit scenes or automations
122
138
 
123
- - `timer.delay` — If defined, the switch will automatically toggle after this many seconds/minutes/hours
124
- - `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.
125
141
  - `timer.random` — If true, the delay will be randomized with a maximum value of `timer.delay`
126
142
 
127
- - `sensor` - Optionally attach a sensor that mirrors the state of the parent accessory
128
- - Only works with `Lightbulb`, `Outlet`, and `Switch`
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`
148
+ - See [crontab.guru](http://crontab.guru) for help
149
+
150
+ - `sensor.type` - Optionally attach a sensor that mirrors the state of the parent accessory
129
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'
130
155
 
131
156
  - `defaultOn` — Initial value. Default _ON_ = true, default _OFF_ = false
132
157
 
@@ -136,13 +161,19 @@ All fields are optional unless noted with an asterisk (*)
136
161
 
137
162
  - `defaultPosition` — Initial position for the door/window/blinds, "open" or "closed"
138
163
 
139
- - `onCommand` - Arbitraty command to execute when lightbulb/outlet/switch turns on
140
- - `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
141
170
 
142
171
  - `lockCommand` - Arbitraty command to execute when lock mechanism is locked
143
172
  - `unlockCommand` - Arbitraty command to execute when lock mechanism is unlocked
144
173
 
145
- - `resetOnRestart` _ If true, all values return to defaults when Homebridge restarts. Ignored when timer is defined.
174
+ - `commandTemperature` - Arbitrary command to execute when temperature changes
175
+
176
+ - `resetOnRestart` _ If true, accessory will return to default state when Homebridge restarts
146
177
 
147
178
  - `disableLogging` — If true, state changes will not be logged
148
179
 
@@ -273,10 +304,44 @@ All fields are optional unless noted with an asterisk (*)
273
304
  }
274
305
  ```
275
306
 
307
+ ### Hourly Schedule Switch
308
+ ```json
309
+ {
310
+ "name": "Hourly",
311
+ "type": "Switch",
312
+ "timer": {
313
+ "delay": 1,
314
+ "units": "SECONDS"
315
+ },
316
+ "schedule": {
317
+ "type": "INTERVAL",
318
+ "interval": 1,
319
+ "units": "HOURS"
320
+ }
321
+ }
322
+ ```
323
+
324
+ ### Thermostat
325
+ ```json
326
+ {
327
+ "name": "Thermostat",
328
+ "type": "Thermostat",
329
+ "temperatureUnits": "F",
330
+ "defaultThermostatState": "heat",
331
+ "defaultTemperature": 78
332
+ }
333
+ ```
334
+
276
335
  ## Credits
277
336
 
278
- Special thanks to [@nfarina](https://github.com/nfarina) for creating the original version of this plugin and maintaining it for almost 10 (!!!) years
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
279
338
 
280
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
281
340
 
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)
346
+
282
347
  And to the amazing creators/contributors of [Homebridge](https://homebridge.io) who made this plugin possible!