ble_monitor icon indicating copy to clipboard operation
ble_monitor copied to clipboard

CGPR1 motion sensor inconsistent/slow lux report

Open papka1974 opened this issue 2 years ago • 31 comments

According to specification, sensor in Qingping mode sending lux information every second to HA. But seems either it's not really like that or something happen on monitor side. With default BLE monitor configuration lux changed in around 1min+, if I change "period to use for averaging" to 5 and setting median instead of mean, lux changed in HA in around 20sec. And this is still not what really expected. At the same moment, motion reported immediately and light change reported in around 5 sec.

papka1974 avatar Feb 05 '22 07:02 papka1974

In BLE monitor the motion sensor is programmed that it updates on every message. Light sensor is programmed that it updates once per period. In the light sensor attributes, you can see how many advertisements it has received in the last period (last mean/median of xxx). So if you set it to 5 seconds, It should show 1 if it only updates once in 20 seconds.

BLE monitor also filters out exact duplicate messages, based on a packet ID. You can check if your light sensor has a packet ID in the attributes (not all sensors do have it). If BLE monitor receives the same packet ID, it will skip it, as it has no new information. Maybe that happens in your case.

My advise is to keep the period around 1 minute, why do you want it shorter? 5 seconds will increase the load on HA.

Ernst79 avatar Feb 05 '22 07:02 Ernst79

Sorry, I didn't got this - "In the light sensor attributes, you can see how many advertisements it has received in the last period (last mean/median of xxx). So if you set it to 5 seconds, It should show 1 if it only updates once in 20 seconds.". My understanding, if manual says, that in Qingping mode lux update happen every 1 sec, I would expect to receive update every 1 sec and would be able to set update frequency to once in 5 sec, 20, 50 or any value I need. If this would be sensor fault, then changing settings in BLE monitor settings I talk above, would not impact lux change (about duplicate messages and so on.). I expected to use this sensor, for turning on/off light based on motion + depending on lux value. So, scenario after turning light on lux will goes up after let's say 1 min. Then motion cancelled and lights turned off for example after 1 min. Then in 20 sec we got motion again, but lux value will be old and scenario will not work. Everything would be fine if lux would updated together with motion and or light value, what would be absolutely logic and I would not care about delay of 1 min, would even fine for me to update lux every 15 min, but unfortunately other values update not raising lux update. Since I'm using BLE sensor first time, I might miss something, so please point out where I'm wrong here...

papka1974 avatar Feb 05 '22 14:02 papka1974

The docs aren't entirely clear, I agree (will change that). I tried to explain how it currently works. That doesn't mean we can't improve it of course 😄

How it works now

  • The sensor sends Illumination data once per second (in Qingping mode)
  • BLE monitor is averaging this data (or taking the median) once per period (default 1 minute, in your case 5 seconds)
  • I've checked the filtering of BLE advertisements with the same packet id, but it looks like in Qingping mode, this is not used.

So, based on this information, I would expect about 5 data packets per period in your situation. But you say is only updates once in 20 seconds. So, my first question is to check the illuminance sensor how many data packets it receives. You can check this by looking at the the sensor attributes at "last mean of" (and what period did you set)

image

I'm asking, because I want to check if it really only sends data once per 20 seconds, or that it does send data once per second.

Next thing is your remark, about the illuminance might not be updated when new motion is detected. I agree, this seems to be not how we want it. However, I'm a bit afraid to let it update each second. This will make the sensor loading HA quite heavy. However, we also have a sensor type that only updates on a change, which might be better in this case. Its all about the balance between the load on HA (once per second is too much) and the usability.

So, my first question to you, is to check how often the sensor really updates. After that, we can make a decision how to change the behavior of the sensor.

Ernst79 avatar Feb 05 '22 16:02 Ernst79

Screenshot_20220205-184751_Home_Assistant Is this information enough? Now lux update took around 10 sec. Twice as much as light status.

papka1974 avatar Feb 05 '22 16:02 papka1974

Yes, thanks. What is the period that you have set in the BLE monitor options?

Light updates immediately, so the last mean of = 2 matches that. Looks like it sends data only once per 5 seconds.

Ernst79 avatar Feb 05 '22 16:02 Ernst79

Period I set to 5. I tried 1 before and not seems there was any impact. It's a bit of unpredictable how lux changed.

papka1974 avatar Feb 05 '22 17:02 papka1974

Another thought about update. Could it be less overhead, instead of update every second, just compare state/value and update it only if not match with what in HA presently?

papka1974 avatar Feb 05 '22 17:02 papka1974

Yes, that is exactly what I meant with

However, we also have a sensor type that only updates on a change, which might be better in this case.

I will look into it a.s.a.p.

Ernst79 avatar Feb 05 '22 18:02 Ernst79

Great. Thank you!

papka1974 avatar Feb 05 '22 19:02 papka1974

Let me know if you need testing. I could try to help with it.

papka1974 avatar Feb 07 '22 15:02 papka1974

Could you do a test for me. In custom_components/ble_monitor/sensor.py can you change line 236-239 from

                        if (
                            measurement in instant_sensors
                            or ts_now - ts_restart < timedelta(seconds=self.period)
                        ):

to

                        if (
                            measurement in instant_sensors
                            or ts_now - ts_restart < timedelta(seconds=self.period)
                            or ("illuminance" in data and "motion" in data)
                        ):

Ernst79 avatar Feb 12 '22 15:02 Ernst79

Sure I could. What shod I do after this change? Restart plugin or anything else?

papka1974 avatar Feb 12 '22 15:02 papka1974

restart HA

Ernst79 avatar Feb 12 '22 15:02 Ernst79

The above modified code works slightly different than my initial thought. The sensor sends two different data packets for illuminance, one is illuminance only, the other is illuminance + motion. When it receives a message of the last type, it will update the illuminance sensor immediately. In the other cases, it works like before, so only one update per period with the average value.

Ernst79 avatar Feb 12 '22 15:02 Ernst79

So. Something wrong with light now. It work first time when I close the light, but then it's hanged on. So whenever I close light or open, state remained light detected. But on motion, now lux changed at the same moment. However, now, motion indicated on HA side with delay, not immediately as before.

papka1974 avatar Feb 12 '22 15:02 papka1974

Light state started to change. Light state change definitely not calling lux change. And motion also not always.

papka1974 avatar Feb 12 '22 15:02 papka1974

light is broadcasted in a different message, see this part of the qingping parser. So, that is hard to change, we just update the state when we receive a light message. That is the same as before.

                elif xdata_id == 0x08 and xdata_size == 4:
                    (motion, illuminance_1, illuminance_2) = unpack(
                        "<BHB", data[xdata_point:xdata_point + xdata_size]
                    )
                    result.update({
                        "motion": motion,
                        "illuminance": illuminance_1 + illuminance_2,
                    })
                    if motion:
                        result.update({"motion timer": 1})
                elif xdata_id == 0x09 and xdata_size == 4:
                    (illuminance,) = unpack("<I", data[xdata_point:xdata_point + xdata_size])
                    result.update({"illuminance": illuminance})
                elif xdata_id == 0x11 and xdata_size == 1:
                    light = data[xdata_point]
                    result.update({"light": light})

You say that motion is now updated at the same time as illuminance, but they are both not updated immediately when you move. Is that correct?

Ernst79 avatar Feb 12 '22 15:02 Ernst79

Yes. Delay exists on receiving move.

papka1974 avatar Feb 12 '22 15:02 papka1974

But also on illuminance?

Ernst79 avatar Feb 12 '22 15:02 Ernst79

Now tested a bit more. I would say that behavior is almost the same as before. Previously reported lux change together with motion was probably occasional. I need more time to check about report delay in motion, since on last tries it was as initially immediate.

papka1974 avatar Feb 12 '22 15:02 papka1974

ok, just test it for a few days, and let me know.

Just remember, I have programmed it now to update lux when it detects motion. If it only sends lux, it won't update immediately.

Ernst79 avatar Feb 12 '22 15:02 Ernst79

Ok. Will let you know.

papka1974 avatar Feb 12 '22 15:02 papka1974

In Qingping mode, CGPR1 transmits advertising packets every second. But the transfer with data alternates with an empty packet for MiHome:

09:24:01: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01E7090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 231, Light: 38
09:24:02: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:03: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01E8090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 232, Light: 38
09:24:04: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:05: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01E9090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 233, Light: 38
09:24:06: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:07: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01EA090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 234, Light: 38
09:24:08: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:09: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01EB090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 235, Light: 38
09:24:10: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:11: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01EC090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 236, Light: 38
09:24:12: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:13: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01ED090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 237, Light: 38
09:24:14: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:15: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01EE090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 238, Light: 38
09:24:16: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:17: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01EF090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 239, Light: 38
09:24:18: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:19: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01F0090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 240, Light: 38
09:24:20: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:21: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01F1090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 241, Light: 38
09:24:22: 582D34605E00, RSSI: -54, Data: FE95:3058830A02005E60342D5808 MiVer5, DevID: 0x0A83-CGPR1, FnCnt: 2, CtrID: 0x5830 Not bound, Standard certification, MAC: 582D34605E00, Capability: 0x08 - front binding
09:24:23: 582D34605E00, RSSI: -54, Data: FDCD:0812005E60342D580201640F01F2090426000000 MAC: 005E60342D58 CGPR1, Bat: 100%, Count: 242, Light: 38

https://pvvx.github.io/CGPR1/advs.log

image

pvvx avatar Mar 24 '22 06:03 pvvx

@papka1974 any update?

Ernst79 avatar May 02 '22 20:05 Ernst79

Not really. Really disappointed in delays. Doubt it could be used for purposes I thought. Motion reported with small delay, but other values living their own life. Comparing to Fibaro sensor I own (which is motion, not presence sensor) - this is slow crap. Please do not take this as a plugin blaming. Pure about particular device. I bought 3 of such based on recommendations, but either my setup is wrong (i use BT dongle) or my expectations are too high.

papka1974 avatar May 03 '22 09:05 papka1974

did you try in Qingping mode. This mode looks like it is sending data more regular.

Switching to Qingping mode is done by pressing the button for a very long time until the LED stops flashing.

It won't be available in the Xiaomi app afterwards (repairing it to Xiaomi app will cause it to switch back to Xiaomi mode). .

Ernst79 avatar May 03 '22 10:05 Ernst79

I think it's already in Qingping mode... Bit will double check

papka1974 avatar May 03 '22 10:05 papka1974

image image image image image image image

< 200 ms

Usually the delay occurs in the Home Assistant and not in the sensor. In transmission to the executive device, especially if it is via WiFi. Delays on WiFi can be up to a second. image

The sensor transmits a motion signal after 50...100 ms. A bad USB-BT has more delays in receiving and transmitting to the system than the sensor. Less than 40 ms motion analysis by IR cannot be done, because the mains frequency filters 50/60 Hz must work. Transmission of messages from the sensor takes less than 3 ms. Those. after 50ms you already have a received message. Everything else is your slow system...

PS: The photo shows the worst options from several measurements.

pvvx avatar May 04 '22 23:05 pvvx

It could be something in my setup as I wrote. I bought Asus BT-500 dongle, avoiding nonames, to get it working stable. As I wrote before, delay for lux report (and it's not 1-2 sec) making this sensor for me useless. Since I build automation based on Fibaro motion sensor before, i expected to have the same from this device, just getting presence.

papka1974 avatar May 05 '22 04:05 papka1974

Asus BT-500 dongle

:)

Light on/off:

14:54:24: Notifications started
14:54:25: 582D34605FAA, RSSI: -41, Bat: 93%, Count: 151, Light: 0
14:54:27: 582D34605FAA, RSSI: -43, Bat: 93%, Count: 152, Light: 0
14:54:28: 582D34605FAA, RSSI: -43, Bat: 93%, Count: 153, Light: 0
Light On
14:54:28: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:28: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:28: 582D34605FAA, RSSI: -43, Light On, Count: 154
14:54:28: 582D34605FAA, RSSI: -43, Light On, Count: 154
14:54:28: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:28: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -43, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -40, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:29: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:30: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:30: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:30: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:30: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:30: 582D34605FAA, RSSI: -42, Light On, Count: 154
14:54:30: 582D34605FAA, RSSI: -41, Light On, Count: 154
14:54:32: 582D34605FAA, RSSI: -42, Bat: 93%, Count: 155, Light: 16024
14:54:34: 582D34605FAA, RSSI: -41, Bat: 93%, Count: 156, Light: 15459
Light Off
14:54:34: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:34: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:34: 582D34605FAA, RSSI: -40, Light Off, Count: 157
14:54:34: 582D34605FAA, RSSI: -40, Light Off, Count: 157
14:54:34: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:34: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:34: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:34: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -40, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:35: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:36: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:36: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:36: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:36: 582D34605FAA, RSSI: -40, Light Off, Count: 157
14:54:36: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:36: 582D34605FAA, RSSI: -41, Light Off, Count: 157
14:54:36: 582D34605FAA, RSSI: -42, Light Off, Count: 157
14:54:38: 582D34605FAA, RSSI: -41, Bat: 93%, Count: 158, Light: 0
Light On
14:54:38: 582D34605FAA, RSSI: -41, Light On, Count: 159
14:54:38: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:38: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:38: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:38: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:38: 582D34605FAA, RSSI: -41, Light On, Count: 159
14:54:38: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:38: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -41, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -41, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -41, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -41, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -41, Light On, Count: 159
14:54:39: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:40: 582D34605FAA, RSSI: -42, Light On, Count: 159
14:54:40: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:40: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:40: 582D34605FAA, RSSI: -40, Light On, Count: 159
14:54:40: 582D34605FAA, RSSI: -41, Light On, Count: 159
14:54:42: 582D34605FAA, RSSI: -41, Bat: 93%, Count: 160, Light: 13929
14:54:44: 582D34605FAA, RSSI: -44, Bat: 93%, Count: 161, Light: 15486
14:54:46: 582D34605FAA, RSSI: -42, Bat: 93%, Count: 162, Light: 15486
14:54:48: 582D34605FAA, RSSI: -41, Bat: 93%, Count: 163, Light: 15397
14:54:50: 582D34605FAA, RSSI: -42, Bat: 93%, Count: 164, Light: 15259
14:54:52: 582D34605FAA, RSSI: -41, Bat: 93%, Count: 165, Light: 15259
14:54:54: 582D34605FAA, RSSI: -44, Bat: 93%, Count: 166, Light: 15211
14:54:56: 582D34605FAA, RSSI: -42, Bat: 93%, Count: 167, Light: 15154
14:55:00: 582D34605FAA, RSSI: -42, Bat: 93%, Count: 169, Light: 15149
14:55:02: Notifications stoped

Light less/more:

15:03:17: Notifications started
15:03:19: 582D34605FAA, RSSI: -57, Bat: 93%, Count: 157, Light: 108
15:03:21: 582D34605FAA, RSSI: -62, Bat: 93%, Count: 158, Light: 108
15:03:23: 582D34605FAA, RSSI: -56, Bat: 93%, Count: 159, Light: 108
15:03:25: 582D34605FAA, RSSI: -58, Bat: 93%, Count: 160, Light: 361
15:03:27: 582D34605FAA, RSSI: -62, Bat: 93%, Count: 161, Light: 361
15:03:29: 582D34605FAA, RSSI: -56, Bat: 93%, Count: 162, Light: 108
15:03:31: 582D34605FAA, RSSI: -62, Bat: 93%, Count: 163, Light: 1538
15:03:33: 582D34605FAA, RSSI: -56, Bat: 93%, Count: 164, Light: 1538
15:03:35: 582D34605FAA, RSSI: -58, Bat: 93%, Count: 165, Light: 528
15:03:37: 582D34605FAA, RSSI: -62, Bat: 93%, Count: 166, Light: 108
15:03:39: 582D34605FAA, RSSI: -56, Bat: 93%, Count: 167, Light: 108
15:03:43: 582D34605FAA, RSSI: -61, Bat: 93%, Count: 169, Light: 108
15:03:47: 582D34605FAA, RSSI: -58, Bat: 93%, Count: 171, Light: 1492
15:03:49: 582D34605FAA, RSSI: -56, Bat: 93%, Count: 172, Light: 108
15:03:51: 582D34605FAA, RSSI: -58, Bat: 93%, Count: 173, Light: 108
15:03:53: 582D34605FAA, RSSI: -62, Bat: 93%, Count: 174, Light: 108
15:03:55: 582D34605FAA, RSSI: -54, Bat: 93%, Count: 175, Light: 1522
15:03:57: 582D34605FAA, RSSI: -56, Bat: 93%, Count: 176, Light: 1522
15:03:58: Notifications stoped

If the change in brightness intensity from the lamp is faster, then the IR motion sensor is triggered.

pvvx avatar May 05 '22 12:05 pvvx