Open konstantinj opened 5 years ago
First the FIFOs.
FIFO is the main command pipe for raspimjpeg to accept commands
FIFO1 is a special pipe used to communicate motion detections FROM raspimjpeg back to the scheduler so that it can determine what to do when motion events occur. "1" signals a motion start, "0" signals a motion stop, "9" indicates raspimjpeg has changed settings so scheduler should restart.
FIFO11 (and FIFO12, .... FIFO20) are secondary command pipes that are equivalent to the main FIFO and can be used by other applications to avoid commands getting mixed up.
motion_external is set to 2 Settings can be 0 internal (recommended method for detection) 1 external use the older external motion process 2 monitor
monitor turns on internal and runs motion detection scripts BUT does not issue motion events to the scheduler via FIFO1. This is intended for use where you want to run motion scripts to do various things but not cause the scheduler to do anything. You won't get the normal scheduler starting and stopping captures when in this mode.
So first of all change the motion detect mode under camera settings back to internal
motion_external was 0 before. I was just experimenting a bit and wanted to check if the motion_event.sh script gets triggered. That's the case. What should I see in log when normal motion gets detected?
A motion triggered recording looks like `{2019/04/26 08:30:03} send smd 1
[2019/04/26 08:30:03] Start capture requested from Pipe
[2019/04/26 08:30:03] Send ca 1
{2019/04/26 08:30:03} Capturing started
{2019/04/26 08:30:14} send smd 0
[2019/04/26 08:30:14] Stop capture requested
[2019/04/26 08:30:14] Send ca 0
{2019/04/26 08:30:14} Capturing stopped
{2019/04/26 08:30:14} Add /var/www/media/vi_0002_20190426_083003.mp4 to Box Queue at pos 2
{2019/04/26 08:30:14} Executing macro /var/www/macros/end_vid.sh "/var/www/media/vi_0002_20190426_083003.h264"
{2019/04/26 08:30:14} Start boxing /var/www/media/vi_0002_20190426_083003.h264 to /var/www/media/vi_0002_20190426_083003.mp4 Queue pos 2
{2019/04/26 08:30:15} Finished boxing /var/www/media/vi_0002_20190426_083003.mp4 from Box Queue at pos 2
{2019/04/26 08:30:15} Removed item from Box Queue ` I notice that your commands are ca 1 and ca 0. I have ca 1; and ca 0; where the semicolon terminates a command. It is possible a change has meant that is required at the end of commands. I'll check that.
Awesome. Looks like that was the issue! ...and I just moved from the C world to Go and need to learn to omit the ; :smile:
Hi,
I've missed couple of versions and now in my docker version motion triggered events are not working anymore after the update.
In the schedule log I can see
Executing macro /var/www/macros/motion_event.sh "1"
when inmotion_external = 2
Also I can seeStart capture requested from Pipe
But no capture is made. Issuingecho "im" > FIFO1
does not do anything whileecho "im" > FIFO11
creates an image.What else do I need to check?
my uconfig (tried several things and did not reset)
and the schedule.json