Xiaomi Aqara devices and how they are managed in openhab


(Thomas Binder) #21

the binding immediately gets the updates - if present. So, if anything you had to find a way to configure the update interval within the Xiaomi System - e.g. per device or within the Gateway. I don’t see something that way - and I assume the devices themselves only update if needed - to save energy.

Long Story short: we have to live with it - but all real-time dependent Actions (e.g. buttons or Alarms) will get immediate Response. non-vital Information (temperature, pressure - and like here Illumination) update “at will” :wink:


(Andrew Pawelski) #22

@thefathefa incase you never worked this out - the sitemap type is setpoint for this:

Setpoint item=Outdoor_PIR_Timer icon=“time” minValue=0 maxValue=120 step=1


(Thefathefa) #23

Thanks, I got a suggestion to just set the timer values at Openhab startup time and this is what I did. I have to say that it did fit well my use case. But thanks anyway, I might be able to use your suggestion for other purposes.


(Stefan Haupt) #24

Hi,

could it be that this statement isn’t correct (anymore)? I’ve set the motionofftimer to 5 seconds. Then I take my motion sensor into the hand and begin waving it around :wink: motion status turns to ON correctly, but after exactly 5 seconds the it turns OFF again altough I’m still waving.

Stefan


(Stefan Haupt) #25

I’ve now run some tests and here are my results. I think it must work like this but I’m still not 100% sure. So please correct me if I am wrong.

According to my tests the MotionOffTimer should be set to a value higher than 60s (whenever a motion check is performed). Every 60s a check is performed and if motion is dectected, the motionofftimer will be reset and starts from new. At the same time (if motion is detected) illumination is reported. See attached chart.


Xiaomi Aqara Human Sensor PIR w. LUX - Things / Items
(Stefan Haupt) #26

hey guys, do you ALWAYS receive proper illumination values? very often it stays just at “0” for me and makes it impossible to properly trigger my lights.


(Thomas Binder) #27

I do get too many values in my opinion, but they seem to be correct: 0 in black of night and near 100 in bright sunlight? - but I don’t trigger anything with it as the Gateway is not in a ideal Position and I don’t know what I could trigger with it… :wink:


(Stefan Haupt) #28

that’s interesting. for me it’s too few. in the middle of the day I see something like this, which can obviously not be true (as I have the windows open):

2018-07-12 16:27:54.134 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 43 to 0

:frowning:


(Stefan Haupt) #29

took me a while but just now I had the idea “let’s check the original xiaomi smartphone app” and unfortunately it shows exactly the same information :frowning: so it’s not an openHAB issue but maybe sensor or gateway issue.

in the app I can check the device log and here I see for example:

16:43h Motion detected, illumination is 0 lux


(Thomas Binder) #30

Then I guess, there’s some issue with the gateway or the sensor. Which firmware do you use?


(Stefan Haupt) #31

Below are two screenshots from my smartphone (xiaomi app). Your help is highly appreciated!
Seems to me openHAB is doing nothing wrong. Even the original app displays this weird data.
Maybe it’s just me who does not understand “lux”. Could it be that a low light room just has 0 Lux? Below is a picture of my test floor. Once I put the sensor in my office room, it reports Lux values of a few hundred :-/



(Stefan Haupt) #32

from my low light test floor to my office room (quite bright) and back

2018-07-12 22:55:03.357 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 0 to 4

2018-07-12 23:50:03.778 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 4 to 3

2018-07-13 01:40:04.626 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 3 to 0

2018-07-13 02:35:05.929 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 0 to 3

2018-07-13 04:25:05.373 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 3 to 0

2018-07-13 08:48:11.050 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 0 to 35

2018-07-13 09:01:03.699 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 35 to 0

2018-07-13 09:18:11.304 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 0 to 11

2018-07-13 09:25:57.933 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 11 to 188

2018-07-13 09:26:09.139 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 188 to 11

2018-07-13 09:26:24.330 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 11 to 128

2018-07-13 09:26:50.694 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 128 to 125

2018-07-13 09:26:55.930 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 125 to 170

2018-07-13 09:27:06.760 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 170 to 179

2018-07-13 09:27:12.044 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 179 to 142

2018-07-13 09:27:22.227 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 142 to 161

2018-07-13 09:27:32.590 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 161 to 143

2018-07-13 09:27:38.348 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 143 to 127

2018-07-13 09:27:43.579 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 127 to 125

2018-07-13 09:27:54.328 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 125 to 47

2018-07-13 09:28:00.137 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 47 to 22

2018-07-13 09:28:11.049 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 22 to 0

2018-07-13 09:42:27.519 [vent.ItemStateChangedEvent] - Mi_BodySensor_Illumination changed from 0 to 142

(Thomas Binder) #33

Perhaps this is the cause for your issues… It could be the Illumination-sensor isn’t meant to be precise in the first place. I got mine sitting in an absolutely non-ideal place for measuring light in the room - and I also get sometimes (rarely, but I do) values of 0 throughout the day - but if it’s really cloudy and dark in the room without a light on.


(Stefan Haupt) #34

I think you are right, in every other room I’ve tested the sensor, it delivers higher values than 0 (although not much higher). I’ve now ordered a second and third sensor and check if they behave similar.


(Thefathefa) #35

Hi everyone,

I still haven’t been able to get batteryLevel info from the smoke detectors. I used to have 1 at the time of writing above messages and I have now 3 more with the same issue… Would someone who is getting the batteryLevel value updated show here how the item is defined, please?

Thanks,