deCONZ and Xiaomi Sensors - No updates?

Dear community,

recently installed Zigbee Phoscon Gateway (raspbee) and connected Xiaomi sensors (temperature/humidity and motion sensors), integrated them via deCONZ binding into openhab 2 (running 2.5.10 on a PI3). So far so good. Everything works quite will but i cannot trigger rules based on motion detected. Tried several option to get them fired but nothing helped. See what I have done:

Thing:

presencesensor presence-no1 "Arbeitszimmer Bewegung" [ id="00:15:8d:00:02:24:d0:d8-01-0406" ]

Item:

Switch Presence_No1 "Bewegung Arbeitszimmer [%s]" <motion> { channel="deconz:presencesensor:homeserver:presence-no1:presence" }

Rules:

rule "Trigger Presence 1a"
when
    Channel "deconz:presencesensor:homeserver:presence-no1:presence" triggered
then
    logInfo("Rule Presence 1a triggered")
end

rule "Trigger Presence 1b"
when
    Item Presence_No1 changed to ON
then
    logInfo("Rule Presence 1b triggered")
end

rule "Trigger Presence 1c"
when
    Item Presence_No1 received update ON
then
    logInfo("Rule Presence 1c triggered")
end

rule "Trigger Presence 1d"
when
    Item Presence_No1 received command ON
then
    logInfo("Rule Presence 1d triggered")
end

None of the rules is about to fire. Also when checking the logfile I just can see that it receives command OFF:
2020-11-18 21:54:14.195 [ome.event.ItemCommandEvent] - Item 'Presence_No1' received command OFF

Checking it in Phoscon App I can see the the motion is detected. But it seems that it never receives command ON.

What is wrong here?

Rgds
Peter

Hi all,

meanwhile I did a lot of checks but there is no real progress. What I have found out in the meantime:

  1. It is not just the motion sensor that gets no update, it is also all the other temperature and humidity sensors (Xiaomi) that get not updated in openhab. All sensors get updated at the beginning when openhab service is started, but after that they never get a furher update.

  2. I checked deconz REST API and realized the values there are getting updated. Checking all the sensors using REST interface I can see the temperature and humidity changes. So deconz REST api works well, but openhab does not update things.

  3. There are no errors in logfiles showing the bindung should not work. There is only one event in log file that raised my attention:

2020-11-22 19:37:38.077 [hingStatusInfoChangedEvent] - 'deconz:temperaturesensor:homeserver:arbeitszimmer-temperature' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)

Is there any specific REST/http configuration to be set? I am just wondering why updates are done when starting openhab, but no more later on.

If there is anybody out there, please help.

Rgds
Peter

By the way: Raspbee II gateway runs on pi 3, phoscon GW 2.05.85 / 15.10.2020 and firmware
26610700

I kind of have similar issues – my Xiaomi Aquara Motion sensor works in the Phoscon-app (e.g. it can be triggered by moving in front of it) but the openhab-item (switch, channel …:presence) is not updated.

I know this is an old thread but maybe there is a solution by now (??).

It works now.
I looked at the REST-response and was puzzled not to find the state “presence” there (but rather fields like “dark” and “daylight”) – so I think the device was wrongly recognized as a light-sensor or something.

My “solution” was to delete the sensor and pair it again (pressing the “reset”-button on the sensor a bit longer … not sure if this has any influence at all…).
This time the “precense”-field showed up in the response by the REST-api and the item changes state.
(item-definition is standard:
Switch presence_bedroom "Presence in the bedroom: [%s]." <motion> (gBedRoom) ["Motion"] {channel="deconz:presencesensor:homeserver:motion_bedroom:presence"}
with the thing defined (inside the decon-bridge) as

Bridge deconz:deconz:homeserver [ host="xxx.xxx.xxx.xxx", httpPort="xxx", apikey="xxxxxxxxxxx" ] 
{
  Thing presencesensor motion_bedroom "Motion sensor bedroom" @ "Bedroom" [ id="5", lastSeenPolling=2 ] 
}

)

[Edit: The confusion cleared up in my head – I thought that it is kind of random which thing (presence-sensor or lightlevel-sensor) is added… ]

If the sensor is paired, two things will be added:
one ZHAPresence and one ZHALightLevel – with different id’s.
So depending on your use-case both pieces of information can be read out.

For reference: