Skip to content

Multi Channel Devices

Ben edited this page Jul 25, 2021 · 19 revisions

Use the 'Multi Channel Devices' (multiDevices[]) configuration section to customise how your multi-channel switch, outlet and light switch devices are exposed to HomeKit.

See Supported Devices to see which devices can be customised using this section.

By default, each channel of a multi-channel device will appear in Homebridge as a single switch. You can use the Home app to change how this accessory appears:

  • a switch (by default, useful for devices like the Sonoff 4CH)
  • a light (useful for devices like the T1-2C/3C, TX-2C/3C)
  • a fan

All ON/OFF Accessory

An extra accessory will also be added to Homebridge which acts as an "All On/Off", similar to the functionality of the eWeLink app. Some users may know this accessory as the 'SW0' accessory. This accessory will show as

  • ON if any of it's channels are on, and turning it off will turn all of it's channels off
  • OFF if all it's channels are off, and turning it on will turn all of it's channels on

Hiding Channels

It is possible to hide both the "All On/Off" accessory and any other channel accessory from Homebridge. You can do this using the hideChannels option. If you hide any channel using the above method then it will not be available to be used in any HomeKit automation.

Configuration

The easiest way to customise these devices is via the Homebridge/HOOBS UI. However, if you prefer to edit your Homebridge config file manually then here is a list of the options and and examples:

Entry Type Required Default Min Explanation
label str No "" This setting has no effect except to help identify this device.
deviceId str Yes "" eWeLink Device ID (10 characters e.g. "10000abcde".
ignoreDevice bool No false If true, this accessory will be removed and ignored from HomeKit.
deviceModel str See 1 ""

Set the model for this device.

  • "dual_dualr2" - Sonoff DUAL/R2
  • "dualr3_switch" - Sonoff DUALR3 (Switch Mode)
  • "dualr3_motor" - Sonoff DUALR3 (Motor Mode)
  • "4ch" - Sonoff 4CH/PRO/R2/R3
  • "t" - Sonoff T1/T2/T3/TX-2C/3C/4C
  • "zb" - Zigbee Multi Channel
showAs str No "default"

Expose this device as a different HomeKit accessory type.

  • "default" - Switches (Default)
  • "outlet" - Outlets
  • "purifier" - 1 Air Purifier
  • "door" - 1 Door
  • "doorbell" - 1 Doorbell
  • "garage" - 1 Garage Door
  • "garage_two" - 2 Garage Doors
  • "garage_four" - 4 Garage Doors
  • "valve" - 1 Irrigation Valve
  • "valve_two" - 2 Irrigation Valves
  • "valve_four" - 4 Irrigation Valves
  • "lock" - 1 Lock
  • "p_button" - 1 Programmable Button
  • "sensor" - 1 Sensor
  • "switch_valve" - 1 Switch & 1 Valve
  • "tap" - 1 Tap/Faucet
  • "tap_two" - 2 Taps/Faucets
  • "window" - 1 Window
  • "blind" - 1 Window Blind/Covering
showAsMotor str No "blind"

Only has effect if deviceModel is "dualr3_motor".

The accessory type to show in HomeKit:

  • "blind" - Window Blind/Covering (default)
  • "door" - Door
  • "garage" - Garage Door
  • "window" - Window
hideChannels str No ""

Only has effect when deviceModel is not "dualr3_motor" and showAs is "default" or "outlet".

A comma separated list of channels to hide for this device. For example "0" or "0,1,2".

inUsePowerThreshold int No 0 0

Only has effect when deviceModel is "dualr3_switch" and showAs is "outlet".

HomeKit will set the 'In Use' status of outlet devices to true when the wattage is above this number.

sensorType str No "motion"

The type of sensor to show in HomeKit if showAs is "sensor".

  • "motion" - Motion Sensor (Default)
  • "smoke" - Smoke/Fire Sensor
  • "water" - Water/Leak Sensor
  • "co" - Carbon Monoxide Sensor
  • "co2" - Carbon Dioxide Sensor
  • "occupancy" - Occupancy Sensor
  • "contact" - Contact Sensor
operationTime int See 2 100 20

2 Required if showAs is "garage", "garage_two", "garage_four", "blind", "door", "window" or "lock".

  • Blind - the time to open/close the blind
  • Garage Door - the time to open/close the door
  • Door - the time to open/close the door
  • Window - the time to open/close the window
  • Lock - the time to show as unlocked

This setting is in deciseconds - count the time in seconds and multiply by 10, for example 75 for 7.5 seconds.

operationTimeDown int No - 20

Only has effect if showAs is "garage", "garage_two", "garage_four", "blind", "door", or "window".

If your device 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.

This setting is in deciseconds - count the time in seconds and multiply by 10, for example 75 for 7.5 seconds.

sensorId str No ""

Only has effect if showAs is "garage" or "lock".

Enter the 10 digit eWeLink Device ID for a DW2 or Zigbee contact sensor that can be used to determine the current state of the garage door or lock.

hideSensor bool No false

Only has effect if showAs is "garage" or "lock".

Hide the contact sensor (defined above in sensorId) from showing in HomeKit.

obstructId str No ""

Only has effect if showAs is "garage".

An optional switch that will trigger the Obstruction Detected feature depending on its value.

ipAddress str No ""

Has no effect if deviceModel is "zb".

You can manually set the IP address for this device if it cannot be discovered by the plugin.

overrideLogging str No "default"

Override global logging setting for this device.

  • "default" - follows global setting
  • "standard" for standard logging
  • "debug" for debug logging
  • "disable" to disable all accessory logging

Examples

An example to set a custom IP and no disabling all accessory logging for a Sonoff 4CHPROR3:

"multiDevices": [
   {
      "deviceId": "10009553c8",
      "deviceModel": "4ch",
      "ipAddress": "192.168.1.13",
      "overrideLogging": "disable"
      
   }
]

An example for a DUALR3 in switch mode to set the OutletInUse state to true only when the when power is over 10W:

"multiDevices": [
   {
      "deviceId": "10009553c8",
      "deviceModel": "dualr3_switch",
      "inUsePowerThreshold": 10
   }
]

An example for a DUALR3 in motor mode to show as a window accessory type:

"multiDevices": [
   {
      "deviceId": "10009553c8",
      "deviceModel": "dualr3_motor",
      "showAsMotor": "window"
   }
]

Accessory Simulations

Documentation Pending

  • 1 Lock (with single or multi channel device)
  • 1 Tap/Faucet (with single or multi channel device)
  • 2 Taps/Faucets (with multi channel device)
  • 1 Irrigation Valve (with single or 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 Sensor (with single or multi channel device)
  • 1 Programmable Button (with single or multi channel device)
  • 1 Doorbell (with single or multi channel device)