Skip to content

homebridge-plugins/homebridge-virtual-device

Repository files navigation

Homebridge Virtual Device

Downloads GitHub version npm version

homebridge-virtual-device is a dynamic platform plugin for Homebridge which provides HomeKit support for virtual devices.

How it works

  • 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.

Install plugin

This plugin can be easily installed through Homebridge UI or via NPM "globally" by typing:

npm install -g homebridge-virtual-device

Configure plugin

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.

Troubleshooting

General issues

Try:

  • restart Homebridge / plugin bridge
  • restart Apple hub
  • remove device from cache (in Homebridge settings)
Child bridge

Contributing and support

Acknowledgements

Thanks to the team behind Homebridge, your efforts do not go unnoticed.

Disclaimer

Despite the efforts made, the operation of the plugin is without any guarantees and at your own risk.

About

Homebridge plugin which provides HomeKit support for virtual devices.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published