-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Motion sensors state behavior (RTCGQ11LM) #270
Comments
I've seen some RTCGQ11LM which do not report any occupancy anymore for +- 1/2 min after occupancy has been detected. Could you post your log so we could verify this? It is important to constantly trigger the motion sensor during that period. |
Will do @Koenkk! Thanks for you reply. I am pretty sure that the sensor goes "numb" for 30 seconds after triggering. Nothing is sent to HA. |
Hello, I have the same problems with the Xiaomi Motion with Lux Sensor. If I paire the sensor it only works for 1-2 minutes, then only sporadically and at some point not at all. I have created a log of this: log2.txt 16:33:27 push button I was in front of the sensor all the time, making hand movements. The other motion sensor without Lux Sensor works perfectly, for several weeks. I tested this on a clean fresh zigbee2mqtt environment, with only one sensor. I have this problem at two different locations, with different hardware. |
@mark078 this sound like battery issues, have you already tried replacing? |
@Koenkk no, I haven't changed the battery yet, I'll do that later. I have two of these sensors that cause these problems, by the way. |
@Koenkk I took out the battery and connected a 3.3 Volt Arduino and measured the voltage, it was 3.3 Volt. I was the whole time before and waved at him, but he gets out regularly and then reports no more motion. :-( Don't you have such problems? |
It seems that your sensors doens't report the occupancy that often (I've seen that more). Can you try setting the |
I entered it with occupancy_timeout: 300, it looked good at first, but not any more below. There was no reaction for over 8 minutes, although there was movement. I'll connect it tomorrow with the original Xiaomi bridge. Maybe it'll give him a firmware update.
#cat configuration.yaml
#cat database.db
|
@mark078 I've never thought of this, but these difference could indeed be explained due to different firmware versions! I'm curious if a firmware update solves this problem. |
@Koenkk I'll report tomorrow... Here's something weird from tonight in the log ([0,8],null,null,null,null,0,0,null). Since then, there's been no more motion detection.
|
@mark078 this is some random data from Xiaomi sensors (pretty normal). |
@Koenkk Okay and the soft restart is normal, too? Small update.. I paired both motion with Lux sensors to the Xiaomi Bridge and both have been running without problems for about 3 hours. Motion detection works every 5 seconds without any failures. |
I didn't notice the soft restart, but this could also cause problems (like in #274). Could you try changing: https://github.com/Koenkk/zigbee2mqtt/blob/master/lib/controller.js#L14 to This should disable the soft restart. |
@Koenkk I'll try tomorrow. The rest like xiaomi switches, motion without lux sensor and cube works very well! |
@mark078 ok great, let me know the result. Was there any firmware update available for the motion sensors? |
Hey @Koenkk , not good news. I didn't see an update in the Mi Home app, there was only one for the Yeelight bulb. I had paired the motion sensor at Xiaomi bridge for about 16 hours. I paired the motion sensor to zigbee2mqtt again. Unfortunately, the behaviour has not changed. :-( It detects motion for a few minutes, then at some point it only transmits light values and then it no longer reacts at all for a long time. I adjusted the controller.js (with a 9 less) and tried to set the channel to 14, but that didn't help. My firmware for CC2530 is from ptvo: http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/ |
@mark078 could you try this firmware: https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/CC2530/bin |
@Koenkk this firmware doesn't work, I tried it on two different CC2530s: https://de.aliexpress.com/item/CC2530-Zigbee-Module-UART-Wireless-Core-Board-Development-Board-CC2530F256-Serial-Port-Wireless-Module-2-4GHz/32767470382.html I have flashed this several times... Pics: https://www.dropbox.com/sh/ud0mx1igu9df0r5/AACqJfgwPYGdGam42xi5iCqSa?dl=0 Zigbee2mqtt start with CC2530ZNP-Prod.hex FW:
With the ptvo FW it works.
|
@kirovilya do you know what could cause the CC2530 firmware not to work? |
@mark078 could you try this firmware: https://raw.githubusercontent.com/kirovilya/files/master/CC2530ZNP-Pro-Secure_LinkKeyJoin.hex Sometimes helps wire P05 and P04 to GND (and P20 too). |
@Koenkk I don't really have any idea why the FW doesn't work for me. I just installed it on a third platform (orange pi zero) and did the same thing there. ptvo firmware works, the others fw don't. @kirovilya thank you, maybe it will work! I'll try and report it. :) |
@kirovilya sadly that didn't work. I flashed your FW first, then tried one by one: The same again with the FW from Koenkk but there also receives the error "request timeout" from the coordinator. :-( Then the firmware of ptvo flashed again and it runs, crazy. Do you have the same CC2530 as me? 2x Double header with 6 pins from ChdTech? Then one more question, do you have the Xiaomi Motion Lux sensors and do they work on you? |
@mark078 I think so yes. It is my chip https://www.aliexpress.com/item/CC2530-Zigbee-UART-Wireless-Core-Board-Development-Board-CC2530F256-Serial-Port-Wireless-Module-24MHz/32767470382.html In last chance try set I tried all the devices from here #52 (comment) |
Mhhh that's strange, that the firmware works for you and not for me. I had "rtscts: false" mainly in the config. But in the meantime I took it out, without success. I will test the cc2531 with the xiaomi motion sensor on the weekend. Next week I can try the arduino flashing method. I had already flashed my first cc2530 board with arduino and the custom firmware and it was running. |
Interested in the result with the CC2531! @mark078 |
@Koenkk it seems to work with the CC2531 Stick. But I don't know which firmware is on it anymore. What would be interesting, if ptvo has this Xiaomi motion with lux sensor with its firmware in operation? And why the CC2530 doesn't work for me. It's the same problem as here: #231 |
@Koenkk Yeah, I'm a little happy now, after a few days of fumbling around. :) The motion sensor still works, actually as good as with the Xiaomi Bridge. I will flash a newest firmware on the CC2531 stick tomorrow. Because the stick has flashed to me someone else where I had no debugger yet. |
I have reflashed the CC2531 Stick with this firmware: https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/CC2531/bin So the debugger must be okay. After that I flashed the CC2530 with Linux and CC2530 Firmware, but the problem is still that zigbee2mqtt does not start.
I will flash the CC2530 next week with an Arduino. |
I noticed something at firmware von @dzungpv Freshly after pairing, the Xiaomi Motion with Lux Sensor has reported every 6 seconds when it has detected a motion. So in a row... After several hours, it only transmits a motion detection every minute. If I briefly press the pairing button on the motion sensor, it responds again recognizes motion every 6 seconds. < push paring button >
There is still a problem, despite my waving in front of the sensor it sends an occupancy false after one minute and an occupancy true immediately afterwards. it looks as if the sensor is going to sleep for a minute. during this time it does not measure or detect any motion.
I think this is the same problem as here: #70 |
@mark078 It is normal, you can check the FAG in Mi Home app |
@mark078 You should connect it to a Mi Home gateway and check for firmware update, i have two of them and they work fine, they say it will always sleep 1 minute and work and then sleep again, when it sleep mean it not respond to any motion, you can use Automation in Hass to solve the problem |
@dzungpv ahhh ok. So after an hour, your motion sensors only respond for a minute at a time? My second problem.. I try to solve then times to set the occupancy_timeout higher than 60 seconds. Because of the firmware update to the original bridge, i paired the two sensors a few days ago. But there was no firmware update. Only for the bridge and xiaomi yeelight bulb. But the sensors run much better with your firmware now. With the other firmware from ptvo for cc2530, the sensors didn't react at all at some point. |
@mark078 Yes, it sleep and wake up after 1 minute. have both RTCGQ11LM(2) and RTCGQ01LM(2). You can try to place near the gateway and test like this. That why i try to make cc2530 work, it have very far better signal quality compare to cc2531 usb |
@dzungpv I'd read about the 60 seconds before, but then I forgot. :D I will reflash the other cc2530 and repair all sensors. Maybe compare this with the bridge later. I also think the cc2530 is better, especially since you save one usb port. |
Hi, is there a way to change the parameters of sleep 1 minute to 5 sec? Any ideas how to fix this. |
I am having similar issue.
but i do not seem to get any topic post. |
@alinelena can you post your complete log? |
@tatunts Version 0.1.4 changed the default occupancy to 90 seconds, that has probably solved it. |
Hello. Have you had any answer about this? I think this is the question. If we can simulate the reset push via software o send a "keep alive" command to the sensor, the problem will be solved. |
@Koenkk this went under my radar... got fixed after some updates. |
So,is it fixed in earlier updates? Does zigbee2mqtt in his latest update keep xiaomi motion sensor alive so they send al state changes even if they are within the first minute? Regards, Jose |
@jgyoldi after the cooldown period of 1 minute the sensor only sends it state once a minute. This is the behavior of the sensor. |
You are right. The thing is, is there a way via software to reproduce the behaviour of the physical reset? Some kind of soft-reset. It could be sent if there is a detention after the cool down period. I there is no detection after an hour the sensor van enter in cool down period of detection from every minute and if there is again a detection send again the soft-reset. |
If it's not possible using the Xiaomi gateway it probably isn't. |
Hi, still got this issue with occupancy_timeout 90 seconds. How bad it is if I put it on 180s? I have a big hallway and I'm using 2 sensor but sometimes one of them doesn't see movent. Can I solve my problem with the 180s or should I consider purchasing another sensor? Thanks! |
I have an RTCGQ01LM which was reporting "motion" after every 55 minutes followed by "no motion detected" 90s later, with no one home! Setting the occupancy_timeout specifically to 90 (which was 'blank' and should default to 90s) solved the problem. It's been "no motion detected" for 3 hours now! |
Hello everyone.
I was wondering if this behavior is normal or there is something that can be done.
I've noticed that after migrating to this platform from the Xiaomi gateways, the motion sensor cannot maintain the ON state if there is still movement on the room. It only shows the 60 seconds trigger then stays off for a few seconds that does not detects anything and then sends another ON state to HA when motion is detected.
Here is a comparison of the same motion sensors, one with this solution and the other still with connected by the gateway:
the one on the bottom is the GW connected sensor, both are the RTCGQ11LM model.
Is this the default behavior? This impacts on my logs, history, recorder (db size) and also CPU, since I have automations that triggers by the ON state of these sensors.
Thanks a lot!
The text was updated successfully, but these errors were encountered: