hjelev/rpi-mqtt-monitor

Feature Request: Digital External Input Sensor (e.g. HC-SR501 as PIR Sensor)

Closed this issue · 3 comments

Thank you so much for this brilliant script which is so much well integrated in HA.

I'm looking forward to use this for my smart mirror display. All features for monitoring, display control and remote reboot is integrated. Only one piece is missing. Do you see a possibility to add support for a HC-SR501 as external PIR Sensor?

The sensor logic is quite simple like a digital IN: GPIO.LOW = no motion, GPIO.HIGH = motion.

If you can not spend more of your time to extend this script, please let me know. I would consider to fork and have a deeper look in the expendability of your code.

Thanks

I think this request is intended to be for me since I implemented the external sensors.
I will have a look on the weekend.

Thanks for quick reply.

I think an extension by another sensor type is straight forward, but the update interval is an issue. collect_monitored_values() is sampled only in low frequency (default: 120s).

I reconsidered again...

Temp and hum. are slowly changing, but a motion is maybe not in focus of this service. Such a time-critical event shall trigger the direct sending of all data. Waiting for the next send iteration makes no sense.

The script won't be good for PIR sensor due to low frequency.