Skip to content

1 Garage Door (with multi channel device)

Ben edited this page Jun 11, 2021 · 12 revisions

⚠️ It is important to have:

  • channel 0 connected to the 'up' motor and channel 1 connected to the 'down' motor, and
  • both channels 'inched' via the eWeLink app (I would recommend 0.5 seconds).

Your garage door must be able to respond to this 'pulse' by starting to move up/down and then stopping with another 'pulse'. The plugin will send an initial request to turn the switch ON (and then be turned off by the eWeLink 'inching' setting) and the garage door will start moving. The plugin will then send another request to turn the switch ON (and then be turned off by the eWeLink 'inching' setting) after the operationTime configuration setting to stop the garage door moving after the appropriate time.

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

It is possible to use a Sonoff DW2 sensor or Zigbee contact sensor to determine the correct position of the garage door, using the sensorId option.

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

It is also possible to use an existing Sonoff single-channel device (BASIC, MINI, etc) as a DIY method to set the 'Obstruction Detected' property of the garage. If the switch is ON then 'Obstruction Detected' will be set to 'Yes'. This can be configured using the obstructId option.

An simple configuration example without a sensor or switch for 'Obstruction Detected':

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

A more complex example with both a sensor and a switch for 'Obstruction Detected':

[
   {
      "deviceId": "10009553c8",
      "type": "garage",
      "operationTime": 120,
      "sensorId": "10009553c9",
      "obstructId": "10009553c0"
   }
]
  • If using the Homebridge UI, it's easier to use the plugin settings screen to configure the simulation
  • If using the HOOBS UI, copy and paste the example above into the 'Groups' box on the plugin settings screen
  • If manually editing the config JSON, don't forget to change the first line to "groups": [

Available Options

Entry Type Required Default Explanation
deviceId string Yes "" eWeLink Device ID.
label string No "" This setting has no effect except to be a helpful label for identifying which device this is when editing the configuration.
type string Yes "" In this case this must be set to "garage".
operationTime int Yes 100 The time in deciseconds that the garage door takes to open/close. Must be 20 or more.
operationTimeDown int No 100 If the garage door has a different operation time for up and down, use this setting to specify the operation time DOWN (in deciseconds) and the other setting to specify the operation time UP. Must be 20 or more.
sensorId string No "" eWeLink Device ID of a DW2 sensor that can be used to determine the current state of the garage.
hideSensor bool No false Hide this contact sensor accessory from HomeKit.
obstructId string No "" eWeLink Device ID of a single-channel device used for the obstruction detection.
ipAddress string No "" You can manually set the IP address for this device if it cannot be discovered by the plugin.
overrideDisabledLogging bool No false If true, updates for this device will be added to the log, even if the general 'Disable Device Logging' setting is true.