Open slopingoff opened 3 years ago
This can be handled by using the macro facilities (See wiki).
In particular, the system will try to call a motion_event macro whenever motion detects either a start or stop condition. The default macro for this is motion_event.sh If you create this and give it the appropriate permissions / ownership then it will execute whenever motion starts or stops occur. It is passed a parameter indicating whether it is a start or a stop and that can be used to turn illumination off or on. Note that the script runs under the www-data user (for security reasons) and you may need to give that user permission to control the GPIO to control the relay.
Start by creating the script and manually executing it to check it controls the relay how you want.
Is it possible to add a trigger in the interface to activate IR led at the same time as camera when motion detected. I am going to use a relay to power the LED.