I would like to hear your opinion on this. I am currently monitoring the temperature and humidity of a room with a DHT22 and a Raspberry-Pi, and I would like to set up a PIR motion sensor and monitor the presence/absence of people in the room.
Now, while I am currently monitoring the temperature on a polling basis, with an interval of 5 minutes, I don't think it is a good idea to do that with the motion sensor. In my opinion, the motion sensor should be interrupt driven, not poll driven. Why? If I poll the Raspberry Pi from time to time, I may never see the PRTG go "Warning, there's someone in your room", unless I have a very short polling shedule (say every 5 or 10 seconds). However, a short schedule like that puts strain on my PRTG probe and network.
However, if I use an interrupt driven approach, any time the interrupt event on the Raspberry Pi detects a change in the PIR sensor's pin, and it alerts the PRTG Probe. It doesn't put any strain on the Rasp-pi, nor the network. It's a very CPU consuming sensor for the PRTG probe, though.
How should I implement this interrupt approach? Should I use Syslog, SNMP Trap? Can I use that? Can I create a custom OID and message?
Or is there any other way of transmitting these messages? Is there any other way you would do this?