Dresden Elektronik deCONZ Binding RaspBee

Hi Patrik,

I´m using Openhab 2.5M1. The inbox is still broken with deconz.
So you have still configure the things File manually.

Here is a full example of my Window/Door-Sensors (Xiaomi) with Deconz.
In the Things-File you can see how I add other Xiaomi Sensors.
Maybe it helps.

Rest API http://phoscon/api/API-KEY-INSERT-HERE/sensors:

THINGS-File deconz.things

 Bridge deconz:deconz:homeserver [ host="", apikey="YOUR-API-KEY-INSERT-HERE" ] 

     // Switch Hue

     switch              BathSwitchSonos01             "Bath_Switch_Sonos_01" [ id="9" ]
     switch              KitchenSwitchSonos01         "Kitchen_Switch_Sonos_01"     [ id="2" ]
     switch              LivingroomSwitchSonos01      "Livingroom_Switch_Sonos_01"  [ id="24" ]
     switch              LivingroomSwitchLamps01      "Livingroom_Switch_Lamps_01"  [ id="22" ]
     switch              BedroomSwitchLamps01         "Bedroom_Switch_Lamps_01"     [ id="30" ]
     switch              BedroomSwitchLamps02         "Bedroom_Switch_Lamps_02"     [ id="31" ]
     switch              KitchenSwitchLamps01         "Kitchen_Switch_Lamps_01"     [ id="32" ]

     // Roomsensor Xiaomi Temperature / Humidity / Pressure
     temperaturesensor   LivingRoomTempsensorTemperature01  "LivingRoom_Tempsensor_01" [ id="3" ]
     humiditysensor      LivingRoomTempsensorHumidity01     "LivingRoom_Tempsensor_01" [ id="4" ]
     pressuresensor      LivingRoomTempsensorPressure01     "LivingRoom_Tempsensor_01" [ id="5" ]

     temperaturesensor   BathTempsensorTemperature01  "Bath_Tempsensor_01" [ id="10" ]
     humiditysensor      BathTempsensorHumidity01     "Bath_Tempsensor_01" [ id="11" ]
     //pressuresensor      BathTempsensorPressure01     "Bath_Tempsensor_01" [ id="5" ]

     temperaturesensor   BasementTempsensorTemperature01  "Basement_Tempsensor_01" [ id="12" ]
     humiditysensor      BasementTempsensorHumidity01     "Basement_Tempsensor_01" [ id="13" ]
     pressuresensor      BasementTempsensorPressure01     "Basement_Tempsensor_01" [ id="14" ]

     temperaturesensor   WashroomTempsensorTemperature01  "Washroom_Tempsensor_01" [ id="15" ]
     humiditysensor      WashroomTempsensorHumidity01     "Washroom_Tempsensor_01" [ id="16" ]
     pressuresensor      WashroomTempsensorPressure01     "Washroom_Tempsensor_01" [ id="17" ]

     temperaturesensor   OutdoorTempsensorTemperature01  "Outdoor_Tempsensor_01" [ id="18" ]
     humiditysensor      OutdoorTempsensorHumidity01     "Outdoor_Tempsensor_01" [ id="19" ]
     pressuresensor      OutdoorTempsensorPressure01     "Outdoor_Tempsensor_01" [ id="20" ]

     // Watersensor Xiaomi 

     waterleakagesensor  KitchenWatersensor01               "Kitchen_Watersensor_01"   [ id="6" ]      
     waterleakagesensor  BasementWatersensor01              "Basement_Watersensor_01"  [ id="7" ]      
     waterleakagesensor  ToolroomWatersensor01              "Toolroom_Watersensor_01"  [ id="21" ]      

     // Windowsensor Xiami

     openclosesensor     EntrancePostsensor01       "Entrance_Postsensor_01"           [ id="8" ]  

     // PresenceSensor

     presencesensor      HallwayPresenceSensor01     "Hallway_Presence_Sensor_01"       [ id="25" ]

//     presencesensor      livingroom-presence     "Livingroom Presence"       [ id="1" ]
//     openclosesensor     livingroom-window       "Livingroom Window"         [ id="5" ]  
//     alarmsensor         basement-alarm          "Basement Alarm Sensor"     [ id="8" ]



// Windowsensor Xiami

Contact              EntrancePostsensor01Open           "Open/close"     (OU_Entrance) {channel="deconz:openclosesensor:homeserver:EntrancePostsensor01:open"}
DateTime             EntrancePostsensor01LastUpdated    "Last updated"    {channel="deconz:openclosesensor:homeserver:EntrancePostsensor01:last_updated"}
Number               EntrancePostsensor01BatteryLevel   "Battery level"   {channel="deconz:openclosesensor:homeserver:EntrancePostsensor01:battery_level"}
Switch               EntrancePostsensor01BatteryLow     "Low battery"     {channel="deconz:openclosesensor:homeserver:EntrancePostsensor01:battery_low"}
Number:Temperature   EntrancePostsensor01Temperature    "Temperature"     {channel="deconz:openclosesensor:homeserver:EntrancePostsensor01:temperature"}

1 Like

Regarding the *100 you might have been hit by this.

Also, mixing 2.5M1 core with a deCONZ snapshot addon is a no-no.

1 Like

Thanks! Now i get some my Sensors working. But only the Battery level shows trash ( Battery level -NaN %). And i have a lot of messages in the log!

==> /var/log/openhab2/openhab.log <==

2019-07-28 20:47:11.852 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler DeconzBridgeHandler tried updating the thing status although the handler was already disposed.

2019-07-28 20:47:21.852 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler DeconzBridgeHandler tried updating the thing status although the handler was already disposed.

2019-07-28 20:47:31.852 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler DeconzBridgeHandler tried updating the thing status although the handler was already disposed.

every 10 seconds.

Also i have problems with my 3 Door/Windows Sensors. They can not be added. They are just not found. There are no problems with the Xiaomi Gateway. I keep the button for> 5 seconds and then hear the message that they are no longer logged in (xiaomi) then it flashes again on the sensor. however, he is not logged in afterwards.

The battery value is not transmitted so often, so wait at least a day or so.

Regarding log entries: I have had the same. Just restart everything and it should go away.

1 Like

If you want to pair the sensor in phoscon.
Start the sensor search in phoscon.
Hold the button on the xiaomi sensor till flashes three times.
THen the button only once in a responding time of 5 seconds (to keep the search alive).

1 Like

Can i configure the duration of the Precense Sensor? Thats the last question :wink:

See here.

I would opt for the OH expire binding for deterministic behaviour between vendors.

1 Like

Thanks for your help. I need some repeater to cover the whole house.
The binding works very well, but with autodiscover it should be better enough and easier. :wink:

You’re welcome. When M2 arrives all will be better.
Do you randomly lose nodes?
I set up a Pi4 here the other day and had some trouble. Had to use a powered hub with the ConBee stick. Not an option with Raspbee though…

Yes i lose some nodes randomly. So i bought a osram smart plug and i hope he will repeat the zigBee signa and creates a mesh. do you have a date for M2? The location of my Raspberry with Raspbee isnt very good, buth the only place with LAN and power cable :wink: So i hope that the repeater works very well :slight_smile:

M2 status here.
See my Pi4 encounter here.

Hope your network status becomes stable :slight_smile:

today my Osram Smart Plug + received. How can i configure it as repeater? I have the feeling that he does not work as a repeater. the plug is connected and works very well, but the thing in his radius doesnt work. i use the openhabian image with headless deconz installation. do you know a way to visual the zigbee network in headless mode? sorry for all the noob questions :confused:

You dont need to.:wink: As a mains powered device it will automatically act as repeater.

I have the Raspbee, 5 meters further the repeater and another 2 meters the sensor. the sensor is offline, the repeater is online.

You have Xiaomi sensors - right? I remember, that they have been problematic if not in direct reach of the Zigbee coordinator (not participating in the mesh routing correctly?)

I do have some Xiaomi Aqara temp/hum/pressure sensors. I stopped trying to get them working with the native Zigbee binding. They always went offline after a while :frowning:

Not sure, if the former issue still exist with the current Xiaomi firmware…

Btw.: Have you already tried resetting and re-including the sensors after adding the Osram plug?

The deCONZ software can do this, but yes - requires some desktop output. Is’nt VNC or rdp an option?

Yes, i only have Xiaomi Sensors and the Osram Plug

Now i re-include the critical sensors and they will be online. i hope that the connection is stable now :slight_smile:

that were a dream, VNC is enough :wink: but i’m to stupid :confused: i have tried to install VNC on the Raspberry and connect via VNCViewer from windows. I can Connect, but only become a message: “Der Desktop kann dezeit nicht angezeigt werden.” ( “The descktop is currently not available”). I dont know why.

Now i have a Desktop, but the deCONZ software wont start.I have stop the deconz service and start the deconz-gui service. after i loged in via mstsc i see a deconz application on the desktop. if i double-click nothing will be happen.

@fanavity I am curious how did you get vnc to work? Can you post that solution?

On deconz running if you have a desktop can you get a terminal? If so typing deconz or deCONZ I would believe should work.

I’m having trouble adding sensors to my openhab2.5 setup (on raspberry pi)
The deCONZ app is running and connected to openhab.
I can find the phoscon app at server/pwa and manage to go to the add Sensors page, but nothing happens when I push the ‘pair’ buttons on the sensors, I get Failed to connect after a couple of minutes.
I’m trying to add a number of different Xiaomi Aqara sensors which I was able to pair with deCONZ on my Windows PC before setting up everything on the Raspberry Pi.

Any tips on how the proceed/debug further ?

openhab login

20:47:46.801 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'deconz:deconz:homeserver' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
20:47:46.835 [DEBUG] [.internal.handler.DeconzBridgeHandler] - Start initializing!
20:47:46.917 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'deconz:deconz:homeserver' has been updated.
20:47:46.946 [DEBUG] [internal.netutils.WebSocketConnection] - Trying to connect ESH-httpClient-nz-deconz-homeserver$11615369 to ws://
20:47:46.992 [DEBUG] [internal.netutils.WebSocketConnection] - org.openhab.binding.deconz.internal.netutils.WebSocketConnection@b13c89 successfully connected to /

This is the output of the api/.../sensors page

  1: {
    config: {
      configured: false,
      on: true,
      sunriseoffset: 30,
      sunsetoffset: -30
    etag: null,
    manufacturername: "Philips",
    modelid: "PHDL00",
    name: "Daylight",
    state: {
      dark: null,
      daylight: null,
      lastupdated: "none",
      status: null
    swversion: "1.0",
    type: "Daylight",
    uniqueid: "00:21:2e:ff:ff:06:98:39-01"

This is not an openHAB issue, but a deconz issue.
If you cannot see the sensor in PWA, openHAB is not able to see it either.

  • Which sensor type are you trying to add? Think you need to use ‘Other’
  • How far away from the RaspBee is the sensor your are pairing? You might consider moving it closer for the pairing process.