Skip to content

deCONZ Binding ​

The Zigbee binding currently does not support the Dresden Elektronik Raspbee and ConBee Zigbee dongles. The manufacturer provides a companion app called deCONZ together with the mentioned hardware. deCONZ offers a documented real-time channel that this binding makes use of to bring support for all paired Zigbee devices.

Supported Things ​

There is one bridge (deconz) that manages the connection to the deCONZ software instance. These sensors are supported:

Device typeResource TypeThing type
Presence SensorZHAPresence, CLIPPresencepresencesensor
Power SensorZHAPower, CLIPPowerpowersensor
Consumption SensorZHAConsumptionconsumptionsensor
SwitchZHASwitchswitch
Light SensorZHALightLevellightsensor
Temperature SensorZHATemperaturetemperaturesensor
Humidity SensorZHAHumidityhumiditysensor
Pressure SensorZHAPressurepressuresensor
Open/Close SensorZHAOpenCloseopenclosesensor
Water Leakage SensorZHAWaterwaterleakagesensor
Alarm SensorZHAAlarmalarmsensor
Fire SensorZHAFirefiresensor
Vibration SensorZHAVibrationvibrationsensor
deCONZ Artificial Daylight SensordeCONZ specific: simulated sensordaylightsensor
Carbon-Monoxide SensorZHACarbonmonoxidecarbonmonoxidesensor
Airquality SensorZHAAirqualityairqualitysensor
Particulate Matter SensorZHAParticulateMatterparticulatemattersensor
Moisture SensorZHAMoisturemoisturesensor
Color ControllerZBT-Remote-ALL-RGBWcolorcontrol

Additionally, lights, window coverings (blinds), door locks and thermostats are supported:

Device typeResource TypeThing type
Dimmable LightDimmable light, Dimmable plug-in unitdimmablelight
On/Off LightOn/Off light, On/Off plug-in unit, Smart plugonofflight
Color Temperature LightColor temperature lightcolortemperaturelight
Color Light (w/o temperature)Color dimmable lightcolorlight
Extended Color Light (w/temperature)Extended color lightextendedcolorlight
Blind / Window CoveringWindow covering devicewindowcovering
ThermostatZHAThermostatthermostat
Warning Device (Siren)Warning devicewarningdevice
Door LockA remotely operatable door lockdoorlock

Note: windowcovering might require updating your deCONZ software since the support changed.

Currently only light-groups are supported via the thing-type lightgroup.

Discovery ​

deCONZ software instances are discovered automatically in the same subnet. Sensors, switches, groups, lights and blinds are discovered as soon as a deconz bridge thing comes online. If your device is not discovered, please check the DEBUG log for unknown devices and report your findings.

Thing Configuration ​

Bridge ​

These configuration parameters are available:

ParameterDescriptionTypeDefault
hostHost address (hostname / ip) of deCONZ interfacestringn/a
httpPortPort of deCONZ HTTP interfacestring80
portPort of deCONZ Websocket (optional, can be filled automatically) (Advanced)stringn/a
apikeyAuthorization API key (optional, can be filled automatically)stringn/a
timeoutTimeout for asynchronous HTTP requests (in milliseconds)integer2000
websocketTimeoutTimeout for the websocket connection (in s). After this time, the connection is considered dead and tries to re-connectinteger120

The deCONZ bridge requires the IP address or hostname as a configuration value in order for the binding to know where to access it. If needed you can specify an optional port for the HTTP interface or the Websocket. The Websocket port can be filled automatically by requesting it via the HTTP interface - you only need to specify it if your deCONZ instance is running containerized.

The API key is an optional value. If a deCONZ API key is available because it has already been created manually, it can also be entered as a configuration value. Otherwise the field can be left empty and the binding will generate the key automatically. For this process the deCONZ bridge must be unlocked in the deCONZ software so that third party applications can register (see deCONZ documentation).

Things ​

All non-bridge things share the mandatory id parameter, an integer assigned to the device while pairing to deconz. Auto-discovered things do not need to be configured.

All sensor-things have an additional lastSeenPolling parameter. Due to limitations in the API of deCONZ, the lastSeen channel (available some sensors) is only available when using polling. Allowed values are all positive integers, the unit is minutes. The default-value is 1440, which means "once a day".

dimmablelight, extendedcolorlight, colorlight and colortemperaturelight have an additional optional parameter transitiontime. The transition time is the time to move between two states and is configured in seconds. The resolution provided is 1/10s. If no value is provided, the default value of the device is used.

extendedcolorlight, colorlight and lightgroup have different modes for setting the color. Some devices accept only XY, others HSB, others both modes and the binding tries to autodetect the correct mode. If this fails, the advanced colormode parameter can be set to xy or hs.

Textual Thing Configuration - Retrieving an API Key ​

If you use the textual configuration, the thing file without an API key will look like this, for example:

dsl
Bridge deconz:deconz:homeserver [ host="192.168.0.10" ]

In this case, the API key is generated automatically as described above (the deCONZ bridge has to be unlocked). Please note that the generated key cannot be written automatically to the .thing file, and has to be set manually. The generated key can be queried from the configuration using the openHAB console. To do this log into the console and use the command things show to display the configuration parameters, e.g:

bash
things show deconz:deconz:homeserver

Afterwards the API key has to be inserted in the .thing file as apikey configuration value, e.g.:

dsl
Bridge deconz:deconz:homeserver [ host="192.168.0.10", apikey="ABCDEFGHIJ" ]

Channels ​

The sensor devices support some of the following channels:

Channel Type IDItem TypeAccess ModeDescriptionThing types
airqualityStringRAirquality as stringairqualitysensor
airqualityppbNumber:DimensionlessRAirquality (in parts-per-billion)airqualitysensor
alarmSwitchRStatus of an alarm: ON = alarm was triggered; OFF = no alarmalarmsensor
battery_levelNumberRBattery level (in %)any battery-powered sensor
battery_lowSwitchRBattery level low: ON; OFFany battery-powered sensor
buttonNumberRLast pressed button id on a switchswitch, colorcontrol
carbonmonoxideSwitchRON = carbon monoxide detectedcarbonmonoxide
colorColorRColor set by remotecolorcontrol
consumptionNumber:EnergyREnergy in Watt*Hourconsumptionsensor
currentNumber:ElectricCurrentRCurrent in mAsome powersensors
darkSwitchRLight level is below the darkness thresholdlightsensor, sometimes for presencesensor
daylightSwitchRLight level is above the daylight thresholdlightsensor
enabledSwitchR/WThis channel activates or deactivates the sensorpresencesensor
externalwindowopenSwitchR/WForward a window status to a thermostat: ON for open, OFF for closed (some devices)thermostat
fireSwitchRStatus of a fire: ON = fire was detected; OFF = no fire detectedfiresensor
gestureNumberRA gesture that was performed with the switchswitch
humidityNumber:DimensionlessRHumidity in %humiditysensor
last_updatedDateTimeRTimestamp when the sensor was last updatedall, except daylightsensor
last_seenDateTimeRTimestamp when the sensor was last seenall, except daylightsensor
lightStringRLight level: Daylight; Sunset; Darkdaylightsensor
lightluxNumber:IlluminanceRLight illuminance in Luxlightsensor
light_levelNumberRLight levellightsensor
lockedSwitchR/WReports/sets the child lock on some thermostatsthermostat
moistureNumber:DimensionlessRMoisturemoisturesensor
onSwitchRSome thermostats report their output state as switchthermostat
openContactRStatus of contacts: OPEN; CLOSEDopenclosesensor
orientation_x, y, zNumberROrientation of vibration sensorvibrationsensor
pm25Number:DensityRParticulate matter (PM2.5) concentration in µg/m³particulatemattersensor
powerNumber:PowerRPower usage in Wattspowersensor, sometimes for consumptionsensor
presenceSwitchRStatus of presence: ON = presence; OFF = no-presencepresencesensor
pressureNumber:PressureRPressure in hPapressuresensor
tamperedSwitchRStatus of a zone: ON = zone is being tampered; OFF = zone is not tamperedany IAS sensor
temperatureNumber:TemperatureRTemperature in ˚Ctemperaturesensor, some Xiaomi sensors,thermostat
tiltangleNumber:AngleRTilt angle of vibration sensorvibrationsensor
valueNumberRSun position: 130 = dawn; 140 = sunrise; 190 = sunset; 210 = duskdaylightsensor
vibrationSwitchRVibration detectedvibrationsensor
vibrationstrengthNumberRStrength of detected vibration (value is device-dependent)vibrationsensor
voltageNumber:ElectricPotentialRVoltage in Vsome powersensors
waterleakageSwitchRStatus of water leakage: ON = water leakage detected; OFF = no water leakage detectedwaterleakagesensor
windowopenContactRwindowopen status is reported by some thermostatsthermostat

NOTE: Beside other non-mandatory channels, the battery_level and battery_low channels will be added to the Thing during runtime if the sensor is battery-powered. The specification of your sensor depends on the deCONZ capabilities. Have a detailed look for supported devices.

The last_seen channel is added when it is available AND the lastSeenPolling parameter of this sensor is used to enable polling.

When upgrading from a version where externalwindowopen used a Contact Item, replace that Item with a Switch Item and update rules to send ON for an open window and OFF for a closed window.

Other devices support

Channel Type IDItem TypeAccess ModeDescriptionThing types
brightnessDimmerR/WBrightness of the lightdimmablelight, colortemperaturelight
switchSwitchR/WState of a ON/OFF deviceonofflight
colorColorR/WColor of an multi-color lightcolorlight, extendedcolorlight, lightgroup
color_temperatureNumber:TemperatureR/WColor temperature in Kelvin. The value range is determined by each individual lightcolortemperaturelight, extendedcolorlight, lightgroup
effectStringR/WEffect selection. Allowed commands are set dynamicallycolorlight
effectSpeedNumberWEffect Speedcolorlight
lockSwitchR/WLock (ON) or unlock (OFF) the doorlockdoorlock
ontimeNumber:TimeWTimespan for which the light is turned onall lights
positionRollershutterR/WPosition of the blindwindowcovering
heatsetpointNumber:TemperatureR/WTarget Temperature in °Cthermostat
valveNumber:DimensionlessRValve position in %thermostat
modeStringR/WMode: "auto", "heat" and "off"thermostat
offsetNumberRTemperature offset for sensorthermostat
alertStringWTurn alerts on. Allowed commands are none, select (short blinking), lselect (long blinking)warningdevice, lightgroup, dimmablelight, colorlight, extendedcolorlight, colortemperaturelight
all_onSwitchRAll lights in group are onlightgroup
any_onSwitchRAny light in group is onlightgroup
sceneStringWRecall a scene. Allowed commands are set dynamicallylightgroup

NOTE: For groups color and color_temperature are used for sending commands to the group. Their state represents the last command send to the group, not necessarily the actual state of the group.

Trigger Channels ​

The dimmer switch additionally supports trigger channels.

Channel Type IDDescriptionThing types
buttoneventEvent for switch pressedswitch, colorcontrol
gestureeventEvent for gesturesswitch

NOTE: The gestureevent trigger channel is only available if the optional channel gesture is present. Both will be added during runtime if supported by the switch. gestureevent can trigger one of the following events:

GestureEvent
GESTURE_NONE0
GESTURE_SHAKE1
GESTURE_DROP2
GESTURE_FLIP_903
GESTURE_FLIP_1804
GESTURE_PUSH5
GESTURE_DOUBLE_TAP6
GESTURE_ROTATE_CLOCKWISE7
GESTURE_ROTATE_COUNTER_CLOCKWISE8

Thing Actions ​

Thing actions can be used to manage the network and its content.

The deconz thing supports a thing action to allow new devices to join the network:

Action nameInput ValueReturn ValueDescription
permitJoin(duration)duration (Integer)-allows new devices to join for duration seconds. Allowed values are 1-240, default is 120 if no value given.

The lightgroup thing supports thing actions for managing scenes:

Action nameInput ValueReturn ValueDescription
createScene(name)name (String)newSceneIdCreates a new scene with the name name and returns the new scene's id (if successfull).
deleteScene(id)id (Integer)-Deletes the scene with the given id.
storeScene(id)id (Integer)-Store the current group's state as scene with the given id.

The return value refers to a key of the given name within the returned Map. See example.

Full Example ​

Things file ​

dsl
Bridge deconz:deconz:homeserver [ host="192.168.0.10", apikey="ABCDEFGHIJ" ] {
    presencesensor      livingroom-presence     "Livingroom Presence"       [ id="1" ]
    temperaturesensor   livingroom-temperature  "Livingroom Temperature"    [ id="2" ]
    humiditysensor      livingroom-humidity     "Livingroom Humidity"       [ id="3" ]
    airqualitysensor    livingroom-voc          "Livingroom Voc"            [ id="9" ]
    particulatemattersensor livingroom-pm25    "Livingroom PM2.5"          [ id="22" ]
    pressuresensor      livingroom-pressure     "Livingroom Pressure"       [ id="4" ]
    openclosesensor     livingroom-window       "Livingroom Window"         [ id="5" ]
    switch              livingroom-hue-tap      "Livingroom Hue Tap"        [ id="6" ]
    waterleakagesensor  basement-water-leakage  "Basement Water Leakage"    [ id="7" ]
    alarmsensor         basement-alarm          "Basement Alarm Sensor"     [ id="8", lastSeenPolling=5 ]
    moisturesensor      livingroom-chili        "Livingroom Chili Plant"    [ id="9" ]
    firesensor          livingroom-fire         "Livingroom Fire"           [ id="10" ]
    thermostat          livingroom-thermostat   "Livingroom Thermostat"     [ id="11" ]
    dimmablelight       livingroom-ceiling      "Livingroom Ceiling"        [ id="1" ]
    lightgroup          livingroom              "Livingroom"                [ id="1" ]
    doorlock            entrance-door           "Door Lock"                 [ id="20" ]
    warningdevice       entrance-siren          "Entrance Siren"            [ id="21" ]
}

Items file ​

dsl
Switch                  Livingroom_Presence                      "Presence Livingroom [%s]"           <motion>        { channel="deconz:presencesensor:homeserver:livingroom-presence:presence" }
Number:Temperature      Livingroom_Temperature                   "Temperature Livingroom [%.1f °C]"   <temperature>   { channel="deconz:temperaturesensor:homeserver:livingroom-temperature:temperature" }
Number:Dimensionless    Livingroom_Humidity                      "Humidity Livingroom [%.1f %%]"      <humidity>      { channel="deconz:humiditysensor:homeserver:livingroom-humidity:humidity" }
String                  Livingroom_voc_label                     "Air quality Livingroom [%s]"                        { channel="deconz:airqualitysensor:homeserver:livingroom-voc:airquality" }
Number:Dimensionless    Livingroom_voc                           "Air quality [%d ppb]"                               { channel="deconz:airqualitysensor:homeserver:livingroom-voc:airqualityppb" }
Number:Density          Livingroom_PM25                          "PM2.5 [%d %unit%]"                                  { channel="deconz:particulatemattersensor:homeserver:livingroom-pm25:pm25" }
Number:Pressure         Livingroom_Pressure                      "Pressure Livingroom [%.1f hPa]"     <pressure>      { channel="deconz:pressuresensor:homeserver:livingroom-pressure:pressure" }
Contact                 Livingroom_Window                        "Window Livingroom [%s]"             <door>          { channel="deconz:openclosesensor:homeserver:livingroom-window:open" }
Switch                  Basement_Water_Leakage                   "Basement Water Leakage [%s]"                        { channel="deconz:waterleakagesensor:homeserver:basement-water-leakage:waterleakage" }
Switch                  Basement_Alarm                           "Basement Alarm Triggered [%s]"                      { channel="deconz:alarmsensor:homeserver:basement-alarm:alarm" }
Number:Dimensionless    Livingroom_Chili_Moisture                "Chili Plant Moisture [%.1f %%]"                     { channel="deconz:moisturesensor:homeserver:livingroom-chili:moisture" }
Switch                  Livingroom_Fire                          "Fire [%s]"                          <smoke>         { channel="deconz:firesensor:homeserver:livingroom-fire:fire" }
Number:Temperature      Livingroom_Thermostat_CurrentTemperature "Thermostat Temperature [%.1f °C]"   <temperature>   { channel="deconz:thermostat:homeserver:livingroom-thermostat:temperature" }
Number:Temperature      Livingroom_Thermostat_TargetTemperature  "Thermostat Setpoint [%.1f °C]"      <temperature>   { channel="deconz:thermostat:homeserver:livingroom-thermostat:heatsetpoint" }
Number:Temperature      Livingroom_Thermostat_Offset             "Thermostat Offset [%.1f °C]"        <temperature>   { channel="deconz:thermostat:homeserver:livingroom-thermostat:offset" }
Number:Dimensionless    Livingroom_Thermostat_ValvePosition      "Thermostat Valve Position [%.1f %%]"                { channel="deconz:thermostat:homeserver:livingroom-thermostat:valve" }
Contact                 Livingroom_Thermostat_WindowOpen         "Thermostat Window Open [%s]"                        { channel="deconz:thermostat:homeserver:livingroom-thermostat:windowopen" }
Switch                  Livingroom_Thermostat_Locked             "Thermostat Locked [%s]"                             { channel="deconz:thermostat:homeserver:livingroom-thermostat:locked" }
String                  Livingroom_Thermostat_Mode               "Thermostat Mode [%s]"                               { channel="deconz:thermostat:homeserver:livingroom-thermostat:mode" }
Dimmer                  Livingroom_Ceiling                       "Livingroom Ceiling [%d]"            <light>         { channel="deconz:dimmablelight:homeserver:livingroom-ceiling:brightness" }
Color                   Livingroom                               "Livingroom Light Control"                           { channel="deconz:lightgroup:homeserver:livingroom:color" }
Switch                  Entrance_Door                            "Doorlock"                                           { channel="deconz:doorlock:homeserver:entrance-door:lock" }
String                  Entrance_Siren                           "Siren [%s]"                         <alarm>         { channel="deconz:warningdevice:homeserver:entrance-siren:alert" }

Events ​

rules
rule "example trigger rule"
when
    Channel "deconz:switch:homeserver:livingroom-hue-tap:buttonevent" triggered 34   // Hue Tap Button 1 pressed
then
    ...
end

Thing Actions Example ​

rules
val deconzActions = getActions("deconz", "deconz:lightgroup:00212E040ED9:5");
var retVal = deconzActions.createScene("TestScene");
deconzActions.storeScene(retVal.get("newSceneId"));

Troubleshooting ​

By default, state updates are ignored for 250ms after a command. If your light takes more than that to change from one state to another, you might experience a problem with jumping sliders/color pickers. In that case the transitiontime parameter should be changed to the desired time.