Closed djraidar closed 4 years ago
Hi,
maybe try to put further the motion sensor, they can causes perturbation to the chip.
I've also got this issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Interestingly, I just tried the HC-SR501 and got the same output:
23:13:16.201 -> Creating HCSR501 buffer
23:13:16.201 -> Pub json into:
23:13:16.201 -> home/OpenMQTTGateway/HCSR501toMQTT
23:13:16.237 -> {"hcsr501":"true"}
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
23:13:16.237 -> Creating HCSR501 buffer
...
I have uncommented the #define ZsensorHCSR501
as described in https://github.com/1technophile/OpenMQTTGateway/wiki/User-guide-PIR (the #include
doesn't need to be uncommented, because it is gated by the define, I'll submit a PR for the docs as I tinker a bit more with this.
Oh, looking again at the code, I see that I should have plugged it to D5 (for an ESP8266), not a D7 (seems like another patch to the docs is upcoming).
But most interesting is that it works: I get a home/OpenMQTTGateway/HCSR501toMQTT {"hcsr501":"true"}
when there is movement, and false
after a few seconds leaving the sensor alone. So the only bug here is the spamming of "Creating HCSR501 buffer" messages, let me look at that...
Put the HCSR501 on 5v (and for data D5 pin) and the DHT sensor on 3v3 (for data D2 pin). That should do it. Cheers
HCSSR501 is much more susceptible to Wifi Noises than AM312. You might want to consider that as a better alternative
Hi! I was wondering if I can use an AM312 instead of the HC-SR501 for motion detection.
And, the issue: I am using the ESP32 with a DHT22 and a Motion Sensor. In the serial monitor, it keeps looping 'creating hcsr501 buffer' hundreds of times, barring any info from BT or DHT info, any insight why? Could it be me not using 5V power and trying to operate this from the 3.3v pin of the ESP32?