Homebridge plugin to create fake accessories for assisting with advanced Apple HomeKit automations
Any issues or damage resulting from use of this plugin are not the fault of the developer. Use at your own risk.
The original HomebridgeDummy was written almost 10 years ago and uses the now deprecated Accessory Plugin architecture.
While this still works okay for now, migrating the code to use Platform Plugins will future-proof Homebridge Dummy and allow for more modern and robust design patterns.
The architecture used in v1.0 will make it much easier to improve and extend this plugin going forward and already includes several new features.
Unfortunately, there is no built-in way to migrate existing accessory plugins to platform plugins. This means that all accessories will be considered "new" by HomeKit, so any existing automations or room setups will be lost.
However, Homebridge Dummy will try to help migrate the accessory configurations to the new system to prevent you having to set them all up again in Homebridge.
Once you have installed v1.0, click on the icon to configure the Homebridge Dummy plugin in the Homebridge UI and it will walk you through the necessary questionnaire.
Alternatively, you can add the following to "platforms" in your config.json
{
"name": "Homebridge Dummy",
"platform": "HomebridgeDummy",
"migrationNeeded": true
}
You will need to restart Homebridge after completing the flow for changes to take effect.
You may safely ignore any "No plugin was found…" errors you see in the Homebridge logs. These should go away after a few Homebridge restarts.
This is an experimental flow and may not work as intended. If you see "Sorry, something went wrong with the accessory migration" or encounter other issues, please create an issue.
The first thing the flow does is create a backup called config.json.bak
in your Homebridge directory. If all else fails, you can replace your config.json
with the backup and downgrade to Homebridge Dummy v0.9 to restore your previous accessories.
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.
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.
Using the Homebridge Config UI is the easiest way to set up this plugin. However, if you wish to do things manually then you will need to add the following to your Homebridge config.json
:
{
"name": "Homebridge Dummy",
"accessories": [
{
"id": "string",
"name": "string",
"groupName": "string",
"type": "Door | Lightbulb | LockMechanism | Outlet | Switch | Window | WindoCovering",
"timer": {
"delay": number,
"units": "SECONDS | MINUTES | HOURS",
"random": true | false
},
"sensor": "CarbonDioxideSensor | CarbonMonoxideSensor | ContactSensor | LeakSensor | MotionSensor | OccupancySensor | SmokeSensor",
"defaultOn": true | false,
"defaultBrightness": 0-100,
"defaultLockState": "locked" | "unlocked",
"defaultPosition": "open" | "closed",
"onCommand": "string",
"offCommand": "string",
"lockCommand": "string",
"unlockCommand": "string",
"resetOnRestart": true | false,
"disableLogging": true | false
}
// ...additional accessories...
],
"platform": "HomebridgeDummy"
}
All fields are optional unless noted with an asterisk (*)
-
id
* - A unique identifier for the accessory. Changing this value will create a new accessory. -
name
* - The display name for the accessory in HomeKit -
type
* - The type of accessory:Door
,Lightbulb
,LockMechanism
,Outlet
,Switch
,Window
, orWindowCovering
-
groupName
- (Beta) Items sharing the same group name will be collected together in the Home app UI⚠️ Adding/removing/changing the group name will require you to reconfigure any HomeKit scenes or automations
-
timer.delay
— If defined, the switch will automatically toggle after this many seconds/minutes/hours -
timer.units
— The units to use for delay above (SECONDS
,MINUTES
, orHOURS
). *Required if delay is set. -
timer.random
— If true, the delay will be randomized with a maximum value oftimer.delay
-
sensor
- Optionally attach a sensor that mirrors the state of the parent accessory- Only works with
Lightbulb
,Outlet
, andSwitch
- Valid values are
CarbonDioxideSensor
,CarbonMonoxideSensor
,ContactSensor
,LeakSensor
,MotionSensor
,OccupancySensor
, orSmokeSensor
- Only works with
-
defaultOn
— Initial value. Default ON = true, default OFF = false -
defaultBrightness
— If set, lightbulb will have additional dimmer settings with this default brightness percentage -
defaultLockState
- The initial value for the lock, "locked" or "unlocked" -
defaultPosition
— Initial position for the door/window/blinds, "open" or "closed" -
onCommand
- Arbitraty command to execute when lightbulb/outlet/switch turns on -
offCommand
- Arbitraty command to execute when lightbulb/outlet/switch turns off -
lockCommand
- Arbitraty command to execute when lock mechanism is locked -
unlockCommand
- Arbitraty command to execute when lock mechanism is unlocked -
resetOnRestart
_ If true, all values return to defaults when Homebridge restarts. Ignored when timer is defined. -
disableLogging
— If true, state changes will not be logged
{
"name": "Stateful",
"type": "Switch"
}
{
"name": "Timer",
"type": "Switch",
"timer": {
"delay": 10,
"units": "SECONDS"
}
}
{
"name": "Default On",
"type": "Switch",
"timer": {
"delay": 5,
"units": "SECONDS"
},
"defaultOn": true
}
{
"name": "Lightbulb",
"type": "Lightbulb",
"timer": {
"delay": 5,
"units": "SECONDS"
}
}
{
"name": "Dimmer",
"type": "Lightbulb",
"defaultBrightness": 42
}
{
"name": "Random",
"type": "Switch",
"timer": {
"delay": 2,
"units": "MINUTES",
"random": true
}
}
{
"name": "Lock",
"type": "LockMechanism",
"timer": {
"delay": 10,
"units": "MINUTES"
},
"defaultLockState": "locked"
}
{
"name": "Motion Switch",
"type": "Switch",
"timer": {
"delay": 3,
"units": "MINUTES"
},
"sensor": "MotionSensor"
}
{
"name": "Door",
"type": "Door",
"timer": {
"delay": 20,
"units": "SECONDS"
},
"defaultPosition": "closed"
}
{
"name": "Outlet 1",
"type": "Outlet",
"groupName": "Powerstrip"
},
{
"name": "Outlet 2",
"type": "Outlet",
"groupName": "Powerstrip"
}
{
"name": "Outlet 3",
"type": "Outlet",
"groupName": "Powerstrip"
}
Special thanks to @nfarina for creating the original version of this plugin and maintaining it for almost 10 (!!!) years
Keryan Belahcene for creating the Flume banner image which was adapted for use with this plugin
And to the amazing creators/contributors of Homebridge who made this plugin possible!