homebridge-virtual-device
is a dynamic platform plugin for Homebridge which provides HomeKit support for virtual devices.
- Create virtual device (like switch, dimmer, blind, garage, leak, security, thermostat, etc.).
- For each device you can add timer to automatically turn off or turn on device after setted time.
- For dimmer and blind you can add dynamic timer - time depends of value setted in HomeKit.
- For each device you can add sensor (motion, contact, occupancy, leak) to activate for 3 sec. when main device is turned on or turned off (you can choose) - useful for notifications.
- All of that is useful in HomeKit / Apple Home automations.
This plugin can be easily installed through Homebridge UI or via NPM "globally" by typing:
npm install -g homebridge-virtual-device
Configure the plugin through the settings UI or directly in the JSON editor.
Example config.json:
{
"platforms": [
{
"platform": "Homebridge Virtual Plugin",
"devices": [
{
"name": "Device 1",
"type": "switch",
"timerType": "whenOn"
"timerTime": 60,
"sensor": "whenOff",
"sensorType": "motion"
},
{
"name": "Device 2",
"type": "dimmer",
"timerType": "disabled",
"sensor": "disabled"
}
]
}
]
}
platform
(string): Tells Homebridge which platform this config belongs to. Leave as is.name
(string): Name of device, as it will display in HomeKit.type
(string): Type of the device: switch, dimmer, blind, lock, security, thermostat, etc.startupValue
(string): Select device state after startup / restart.timerType
(string): Timer type: disabled, activated when device is on, activated when device is off.timerTime
(integer): Set time for timer.timerUnit
(string): Timer unit: miliseconds, seconds, minutes, hours, days.timerReset
(boolean): Reset timer on each activity. When this option is enabled, each activity of the device will reset the timer (e.g. re-enabling the device even though it is already turned on).timerDynamic
(booleand): Only for dimmer and blind. When this option is enabled, the timer will change the device value by 1, up to 0 or 100 (depending on the option selected in Timer). Example: if you set 5 minutes in Timer Time and the device is set to 3, then after the timer will be 15 minutes.timerStartup
(integer): Set different time for timer on startup.sensor
(string): Add additional sensor to device. It will actvate for 3 seconds. This is useful for automations.sensorType
(string): Sensor type: motion, contact, occupancy, leak.
General issues
Try:
- restart Homebridge / plugin bridge
- restart Apple hub
- remove device from cache (in Homebridge settings)
Child bridge
- It's recommended you run this plugin as a child bridge.
- Test/use the plugin and report issues and share feedback.
- Contribute with your own bug fixes, code clean-ups, or additional features - Pull Request.
Thanks to the team behind Homebridge, your efforts do not go unnoticed.
Despite the efforts made, the operation of the plugin is without any guarantees and at your own risk.