[deconz] Issues with automatic discovery of bridge and sensors and timeouts (all things go OFFLINE and ONLINE again)

öhm, next update … i have time to test atm, so no worries, you can read up any time you want … for the time being this is with 2.5.0 snapshot, hue disabled, deconz enabled

i just keep editing this post with new info while i am testing.

here i am only working in paper ui…

2019-01-07 12:29:39.320 [hingStatusInfoChangedEvent] - 'deconz:deconz:41864904' changed from UNINITIALIZED to INITIALIZING
2019-01-07 12:29:39.995 [hingStatusInfoChangedEvent] - 'deconz:deconz:41864904' changed from INITIALIZING to ONLINE
2019-01-07 12:34:44.884 [me.event.ThingUpdatedEvent] - Thing 'deconz:temperaturesensor:a5d28718' has been updated.
2019-01-07 12:34:44.892 [hingStatusInfoChangedEvent] - 'deconz:temperaturesensor:a5d28718' changed from OFFLINE (CONFIGURATION_PENDING) to ONLINE
2019-01-07 12:36:59.202 [vent.ItemStateChangedEvent] - Temperature changed from NULL to 20.23 °C
2019-01-07 12:37:26.744 [vent.ItemStateChangedEvent] - Temperature changed from 30.64 °C to 25.22 °C
Switch_Magic_Cube_2 changed from 6002 to 5006
2019-01-07 14:18:45.469 [vent.ChannelTriggeredEvent] - deconz:switch:20bf314b:buttonevent triggered 1005
Humidity_1 changed from NULL to UNDEF
2019-01-07 14:40:54.678 [vent.ItemStateChangedEvent] - Open_1 changed from CLOSED to OPEN
2019-01-07 14:44:23.726 [vent.ChannelTriggeredEvent] - deconz:switch:1a9d8cb4:buttonevent triggered 1004
2019-01-07 14:50:25.925 [vent.ChannelTriggeredEvent] - deconz:switch:c014c246:buttonevent triggered 1002
  • auto discovery of bridge or temperature item or switches didnt work for me
  • when i added the bridge data it was able to retrieve an apikey by itself in the paper ui.
  • deconz now works together with hue binding (at least for me)
  • manually adding things worked in the paper ui, i retrieved the ids from deconz rest API
  • defining things and items in the things and items files works alright (you might need to clear the cache)
  • aqara temperature working (temperature)
  • aqara humidity not working for me atm, state went from NULL to UNDEF, after that no more changes (humidity)
  • aqara magic cube working (switch)
  • aqara open/close sensor working (open/close)
  • aqara smart switch working
  • aqara rocker switch working

ok, so the only thing that is not working at all for me atm is the humidity value… somehow going to UNDEF.
the pressure isnt implemented yet.

The rest seems to work fine, i will try to write a guide in the installation section on how to work with the RaspBee in the deconz gui and Phoscon App and then get it included into openhab. maybe got time for that tomorrow. done for today. i hope some of the feedback helped.

And thx for the great work with the binding.

Btw, if people wanna know, i tried the Aqara HUB and atm i find that thing and the Apps terrible, works totally random, APP crashes, cant sign in, and loads more of issues, so if you consider using the aqara items, just go and dont buy a hub there, just take the raspbee from dresden electronics.

That is broken right now since a PR end of last year. A fix is underway by another user. Sorry for that inconvenience. The binding does not have a test suite yet to catch those obvious errors, as it is too new.

that sounds like the problem i am facing.

@Schelli : Does OH update the temperature values the Aquara Sensors
@David_Graeff: No need to apologize. I appreciate your efforts!

Any chances Resource Type ZHAConsumption is coming into the next release? E.g. the Bitron 902010/25 smart plug is reporting current power usage via ZHAConsumption and not via ZHAPower. Thus currently I’m not able to read the values…

You need to edit three files of the code to add support yourself :slight_smile: Just replicate what another user did in another pull request to add some other attribute recently.

  1. You add the Consumption Thing into the XML file.
  2. Find out what the field name is. Probably “consumption” or so, you need to find that out by using the deconz rest API: “http://my-deconz/api/aUserName/” (try while in authorisation mode to register “aUserName”)
  3. Add that field as “Integer” or “Double” (if a fractional decimal) to the Value class. Just replicate how it looks for other fields.
  4. Add a few lines to the thing handler.

If you could at least do 1. and 2. in a pull request, the rest could be done by someone else, too.

Cheers, David

@Radioaktivman : Temperature works alright for me, Humidity does NOT, i think Pressure isnt even integrated yet
@hehold : i posted a bit above your post, unfortunately i had no time at all today to look at the binding. but tomorrow i should have some time and if i figure out how binding programming and updating the addon works, i will try to fix the humidity, add the pressure stuff (those 2 i can test with my own hardware) and while i am at it i can try to add ZHAConsumtion as well. if you didnt already do it yourself.

@hehold can you supply a rest api output of the consumption switch please… the link explains how you can aquire it if you are not sure


"4": {
    "config": {
      "battery": 91,
      "on": true,
      "reachable": true
    "ep": 1,
    "etag": "f28fe522b93f8fcf367a116dd4e6891f",
    "manufacturername": "LUMI",
    "modelid": "lumi.weather",
    "name": "MultiTemp 1",
    "state": {
      "lastupdated": "2019-01-08T20:00:07",
      "pressure": 966
    "swversion": "20161129",
    "type": "ZHAPressure",
    "uniqueid": "00:15:8d:00:02:c8:d2:68-01-0403"

this is for example an output of my pressure switch … the devices seem to report the battery level as well, will try to implement that into the binding too

That was done in a recent PR. But apparently everything under “config” is not updated in real-time. The state is fetched only once at start-up.

@Schelli would be great if you could add that too! See below the sensor description via API. In case you need anything else, I’m happy to provide it…

     "on": true,
     "reachable": true
    "ep": 1,
    "etag": "f07f1e082b546fb17f273223f2d6c3c7",
    "manufacturername": "Bitron Video",
    "modelid": "902010/25",
    "name": "902010/25",
      "consumption": 304,
      "lastupdated": "2019-01-08T09:57:37",
      "power": 0
    "swversion": "20170420",
    "type": "ZHAConsumption",
    "uniqueid": "00:12:4b:00:16:47:73:1e-01-0702"

hmmm, i have implemented the pressure sensor and also the consumption sensor, cant test consumption though because i dont have hardware for it, my pressure sensor works fine… the humidity sensor works fine now as well, not sure if i did something essential to it or not …

i installed the eclipsse environment according to the guides and after fiddling around a bit i managed to build all the stuff

i am just not sure how to commit the changes now to openhab, i tried finding out by reading the developer section, but cant figure out what i have to do first. pull request and how it is done exactly, i am not really sure…

maybe some1 can give me a good link so i can read up how to get the changes commited now…

@David_Graeff i am having trouble getting the unit for my pressure to hPa, i can find a unit PASCAL (SIUnits.PASCAL) but not hPa (i tried HECTO(SIUnits.PASCAL) but that didnt work, i am not able to find a comprehensive list of org.eclipse.smarthome.core.library.unit that lists all available units(SIUnits and Smarthomeunits…), supposedly there is hPA somewhere in there.

also i checked out the POWER Channel and the unit is SmartHomeUnits.WATT_HOUR. But Power should we Watt only i assume, since i was addint the Consumption for hehold i would use WATT_HOUR or whatever the power plug is measuring…

@hehold what exactly is the unit of the consumption we are measuring here ?,


here is a list of units openhab is using, it must be some kind of power consumption i guess… so Ws, Wh …

Hi Marc,

It is great to see new people starting to work on openHAB. Here is a wrap-up of what you have to do. I know, a lot stuff to read.

Contribute to the openHAB 2 add-ons repository. First you have to fork the repository and commit your changes to a new branch in the forked copy. Then create a pull request from the fork. After that we will do a review and take care of the merge. Please do not forget to sign your work.

See you soon on GitHub. Do not hesitate to ask if something is not clear.

OK; for now i figured out the forking and the pushing the thing back up on my fork … just have to read up on creating a new branch, so i dont push up on the master branch and wait for hehold to give me the exact data for the ZHAConsumption thingie so i can implement the correct Unit for it then i will try to get a pull request going in the near future…

thx for the help

It is not necessary to create a branch. It just helps. For creating a pull request:

Go to the github web interface to the official openhab2-addons repository. Github will show you a yellow backgrounded question if you want to create a pullrequest for your fork. Add a good Pull Request message and confirm.

@Schelli the units are Watt for Power and Wh for Consumption.

@cweitkamp i just saw there is a pull request from you for deconz … adding a new channel to all sensors

public static final String CHANNEL_LAST_UPDATED = “last_updated”;

channel typeId=“last_updated” id=“last_updated”

should i still send my pull request although this is still open … this shouldnt cause any conflicts i guess, i would just have to add another pull request when yours is approved to implement that channel to my 2 newly implemented sensors…

@Schelli Do not let anything stop you. It should be no problem. Git can handle it. Furthermore it should be possible for you to add the channel definitions in the XML file right now and they got populated after everything -(your PR and my PR) will have been merged.

oh, true , good idea, will just put them in there and then do a pull request…

btw, i didnt touch the humidity sensor if i let it run in eclipse on windows it works fine… i put the package on my raspberry pi and it goes from NULL to state UNDEF. Is there a way to better debug what is happening on my Raspi … because unfortunately on windows in the debugger it works flawlessly…

ok, update and pull request is done … i wanted to add a link to my jar file … but i couldnt exactly figure out how to do this

this link is probably wrong…


how do i update the documentation since i the new sensors need to be added there …

thx for all the help and comments

Nice. Thanks. I will have a look and comment over there.

To enable TRACE logging on your device do the following steps:

If you think about providing a *.jar file for testing I recommend to build it locally, put it into a *.zip container and upload it by drag & drop into the GitHub PR description.

The documentation is in the same repository (see README.md). You are able to change it in the same PR.

ok, regarding the push, i have done everything needed i hope :pray:

now i cant push again, i have provided a screenshot … just dont wanna mess up the next push :smiley_cat:

i have to make some kind of pull request first, but not entirely sure how to pull and push now