1 Garage Door (with single channel device) - homebridge-plugins/homebridge-ewelink GitHub Wiki

This simulation can be setup via the Homebridge/HOOBS UI, adding an entry in the 'Single Channel Devices' section and setting the Device ID and the 'Show As' to '1 Garage Door'.

Or if you prefer to edit the configuration directly, set the deviceId and choose the showAs option to "garage". For example:

"singleDevices": [
   {
      "deviceId": "10009553c8",
      "deviceModel": "single",
      "showAs": "garage",
      "operationTime": 100
   }
]

⚠️ It is important to have the device '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.

Operation Time

The operationTime is defined in deciseconds so time how long it takes to open/close the garage and multiply this by ten. If the garage door has a different UP and DOWN time then you can set operationTime for the time UP and operationTimeDown for the time DOWN.

UP/DOWN Position (+ Optional Sensor)

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 possible to use a Sonoff DW2 sensor or Zigbee contact sensor to determine the correct position of the garage door, using the sensorId option. This sensor will show as a contact sensor in HomeKit, but can be hidden by setting hideSensor to true.

Obstruction Detection

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.

Examples

A simple configuration example without a sensor:

"singleDevices": [
   {
      "deviceId": "10009553c8",
      "deviceModel": "single",
      "showAs": "garage",
      "operationTime": 100
   }
]

Another example with a different operation times for UP and DOWN:

"singleDevices": [
   {
      "deviceId": "10009553c8",
      "deviceModel": "single",
      "showAs": "garage",
      "operationTime": 150,
      "operationTimeDown": 120,
   }
]

Another example with a sensor which should be hidden in HomeKit:

"singleDevices": [
   {
      "deviceId": "10009553c8",
      "showAs": "garage",
      "operationTime": 75,
      "sensorId": "10009553c9",
      "hideSensor": true
   }
]

A more complex example with a custom IP address for the device, a sensor, and a switch for 'Obstruction Detected':

"singleDevices": [
   {
      "deviceId": "10009553c8",
      "showAs": "garage",
      "operationTime": 75,
      "sensorId": "10009553c9",
      "obstructId": "10009553c0",
      "ipAddress": "192.168.2.34"
   }
]