Skip to content

Cleanup detectionOn.sh to improve performance - #8

Open
Ozzyminted wants to merge 1 commit into
Ozzyminted:masterfrom
harisokanovic:dev/haris/cleanup-detectionOn
Open

Cleanup detectionOn.sh to improve performance#8
Ozzyminted wants to merge 1 commit into
Ozzyminted:masterfrom
harisokanovic:dev/haris/cleanup-detectionOn

Conversation

@Ozzyminted

Copy link
Copy Markdown
Owner

Modify as follows:

  1. Run getimage once at beginning of script, save image to /tmp
  2. Launch all notification tasks (save snapshot, mqtt, email, telegram,
    and user scripts) as background jobs, use same image image in all
    cases for consistency
  3. Wait for all background jobs to finish before deleting tempfile

In motion.conf.dist:

  • Add default debug_msg_enable=false
  • Fix typo: s/sendemail/send_email

Testing: Ran detectionOn.sh with all options+debugging enabled on a
Wyze Cam V2 and verified the following:

  • LED triggered
  • Snapshot jpg saved to sdcard
  • Old snapshots removed from sdcard
  • Ran few user scripts to read tempfile
  • sendPictureMail.sh, mosquitto_pub.bin, and telegram ran, but I
    didn't verify delivery

Modify as follows:
 1. Run `getimage` once at beginning of script, save image to /tmp
 2. Launch all notification tasks (save snapshot, mqtt, email, telegram,
    and user scripts) as background jobs, use same image image in all
    cases for consistency
 3. Wait for all background jobs to finish before deleting tempfile

In motion.conf.dist:
 * Add default debug_msg_enable=false
 * Fix typo: s/sendemail/send_email

Testing: Ran detectionOn.sh with all options+debugging enabled on a
Wyze Cam V2 and verified the following:
 * LED triggered
 * Snapshot jpg saved to sdcard
 * Old snapshots removed from sdcard
 * Ran few user scripts to read tempfile
 * sendPictureMail.sh, mosquitto_pub.bin, and telegram ran, but I
   didn't verify delivery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants