Skip to content

Accessory Simulations

Ben edited this page Mar 4, 2021 · 80 revisions

An accessory simulation can be used to create a custom accessory in Homebridge/HomeKit from a generic single/multi-channel device.

For example, a Sonoff Dual would, by default, appear in Homebridge as two switches. If this device were wired to a garage door then you could use an accessory simulation to make the device appear as a garage door accessory in Homebridge rather than two switches.

Please do take note as these accessory simulations require specific setup and configuration.

  • For any of these setups, you can use the label option within the json config block which has no effect except to be a helpful label for identifying which device this is when editing the configuration.

  • For any of these setups, you can use the overrideDisabledLogging option within the json config block to enable logging for your accessory if you have the general disableDeviceLogging set to true.

  • For any of these setups which use a LAN mode compatible device (for example Sonoff BASIC, MINI) you can use the ipAddress option within the json config block to manually set the IP for this device if the plugin cannot obtain the IP automatically.

⚠️ After setting up any Accessory Simulation in the configuration, you may need to remove the existing accessory from the cache so that it removes any existing switch services (otherwise the accessory will appear duplicated in HomeKit)

Available Simulations

Separate Wiki Articles

On This Page

Available (Documentation Pending)

  • 1 Lock (with single channel device)
  • 1 Lock (with multi channel device)
  • 1 Tap/Faucet (with single channel device)
  • 1 Tap/Faucet (with multi channel device)
  • 2 Taps/Faucets (with multi channel device)
  • 1 Irrigation Valve (with single channel device)
  • 1 Irrigation Valve (with multi channel device)
  • 2 Irrigation Valves (with multi channel device)
  • 4 Irrigation Valves (with multi channel device)
  • 1 Switch + 1 Irrigation Valve (with multi channel device)

1 Window Blind (w/ multi-channel device)

It is important to have:

  • channel 0 connected to the "up" motor and channel 1 connected to the "down" motor

When fully opening/closing the blind, the plugin will turn the appropriate channel ON for the duration of the specified operationTime and then turn the channel OFF. When opening/closing the blinds to a custom position (e.g. 50% open) then the plugin will calculate the time that the channels need to be ON based on the operationTime.

The operationTime is defined in deciseconds so time how long it takes to open/close the window blind and multiply this by ten.

Since it is impossible for the device to report the correct position of the window blind to Homebridge, the plugin relies on a cached state which changes each time the blind is opened/closed. There may be times when this becomes out of sync. If this happens, please make sure the blind is fully closed, then remove the accessory from the Homebridge cache using this guide. The accessory will be added again with a CLOSED status which will match the blind.

A configuration example:

[
   {
      "deviceId": "10009553c8",
      "type": "blind",
      "operationTime": 80
   }
]

1 Door (w/ multi-channel device)

It is important to have:

  • channel 0 connected to the "open" motor and channel 1 connected to the "close" motor

When fully opening/closing the door, the plugin will turn the appropriate channel ON for the duration of the specified operationTime and then turn the channel OFF. When opening/closing the door to a custom position (e.g. 50% open) then the plugin will calculate the time that the channels need to be ON based on the operationTime.

The operationTime is defined in deciseconds so time how long it takes to open/close the door and multiply this by ten.

Since it is impossible for the device to report the correct position of the door to Homebridge, the plugin relies on a cached state which changes each time the door is opened/closed. There may be times when this becomes out of sync. If this happens, please make sure the door is fully closed, then remove the accessory from the Homebridge cache using this guide. The accessory will be added again with a CLOSED status which will match the door.

A configuration example:

[
   {
      "deviceId": "10009553c8",
      "type": "door",
      "operationTime": 50
   }
]

1 Window (w/ multi-channel device)

It is important to have:

  • channel 0 connected to the "open" motor and channel 1 connected to the "close" motor

When fully opening/closing the window, the plugin will turn the appropriate channel ON for the duration of the specified operationTime and then turn the channel OFF. When opening/closing the window to a custom position (e.g. 50% open) then the plugin will calculate the time that the channels need to be ON based on the operationTime.

The operationTime is defined in deciseconds so time how long it takes to open/close the window and multiply this by ten.

Since it is impossible for the device to report the correct position of the window to Homebridge, the plugin relies on a cached state which changes each time the window is opened/closed. There may be times when this becomes out of sync. If this happens, please make sure the window is fully closed, then remove the accessory from the Homebridge cache using this guide. The accessory will be added again with a CLOSED status which will match the window.

A configuration example:

[
   {
      "deviceId": "10009553c8",
      "type": "window",
      "operationTime": 100
   }
]