geraldoramos / pigeon

Pigeon is a simple 3D printed cloud home surveillance camera project that uses the new Raspberry Pi Zero W
https://www.instructables.com/id/Pigeon-a-3D-Printed-Cloud-Home-Surveillance-Camera/
GNU General Public License v3.0
296 stars 22 forks source link

Dropbox module runs first and deletes the output files, so no other modules can use them. #29

Open AlexHowansky opened 6 years ago

AlexHowansky commented 6 years ago

I'm working on adding a module to do push alerts to my phone via pushover.net. I've currently got it working great, sending the JPG that was captured as an attachment -- so any time the camera catches something, my phone dings, and there's the photo. The problem is that the dropbox module deletes the images as soon as it's done uploading them, so they're gone by the time my module runs. I've been unable to change the order that the modules run in. I've tried changing the order they're listed in modules_enabled.conf but that had no effect. I ultimately just commented out the rm from the dropbox module so the files would stay local on the pi, but that's a short term solution. Do you know of any mechanism to adjust the order that the modules run in?

AlexHowansky commented 6 years ago

OK, it seems that the modules are run in alphabetical order by virtue of the for d in /home/pi/pigeon/modules/*/ in pigeon_modules_init.sh. I will update this script to run the on_movie_end and on_picture_save modes in the order specified in modules_enabled.conf.