Sensor Devices - homebridge-plugins/homebridge-ewelink GitHub Wiki

Use the 'Sensor Devices' (sensorDevices[]) configuration section to customise how your DW2 and Zigbee sensor devices are exposed to HomeKit.

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

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 No ""

Set the model for this device.

  • "dw" - Sonoff DW2-Wifi
  • "snzb01" - Sonoff SNZB-01 Button
  • "snzb02" - Sonoff SNZB-02 Temp/Humidity
  • "snzb03" - Sonoff SNZB-03 Motion
  • "snzb04" - Sonoff SNZB-04 Door/Window
  • "leak" - Zigbee Leak Sensor
showAs str No "default"

Only has effect if deviceModel is "dw".

Expose this device as a different HomeKit accessory type.

  • "default" - 1 Contact Sensor (Default)
  • "sensor_leak" - 1 Leak Sensor
lowBattThreshold int No 25 5

HomeKit will set the low battery status for this device when the battery (if it has one) reaches this percentage level.

offset num No 0

Only has effect if deviceModel is "snzb02".

You can offset the temperature that the SNZB-02 sensor reads. An offset of 2 means 2 degrees will be added to the recorded temperature. Can be positive or negative and can include a decimal point '.'.

humidityOffset num No 0

Only has effect if deviceModel is "snzb02".

You can offset the humidity that the SNZB-02 sensor reads. An offset of 2 means 2% will be added to the recorded relative humidity. Can be positive or negative.

hideLongDouble bool No false

Only has effect if deviceModel is "snzb01".

If true, double and long press options will be hidden for this Zigbee Button.

scaleBattery bool No false

Only has effect if deviceModel is "snzb04".

If true, the battery reading for this Zigbee Contact Sensor will be multiplied by 10.

sensorTimeDifference int No 60 5

Only has effect if deviceModel is "snzb01", "snzb03" or "leak".

An offset in seconds to ignore notifications if the delay between this Zigbee Motion/Leak activating or Zigbee Button press and the plugin receiving the notification is greater than this number.

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 add a temperature offset of 6.5 and a humidity offset of -3 for a Sonoff SNZB-02 Temp/Humidity sensor:

"sensorDevices": [
   {
      "deviceId": "a0009553c8",
      "deviceModel": "snzb02",
      "offset": 6.5,
      "humidityOffset": -3
   }
]

Accessory Simulations

Documentation Pending

  • 1 Leak Sensor (with Sonoff DW2) (see video)
⚠️ **GitHub.com Fallback** ⚠️