{"id":360,"date":"2014-10-29T15:40:33","date_gmt":"2014-10-29T14:40:33","guid":{"rendered":"http:\/\/queen.run.montefiore.ulg.ac.be\/~barbette\/?p=360"},"modified":"2015-10-08T14:51:33","modified_gmt":"2015-10-08T12:51:33","slug":"limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance","status":"publish","type":"post","link":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/","title":{"rendered":"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance"},"content":{"rendered":"<p>Maybe you use the &#8220;on_picture_save&#8221; to send yourself an e-mail with motiond when your webcam detect an \u00a0intruder. But when someone enters, you&#8217;ll receive a lot of pictures. And if it was just you forgetting to stop the detection before entering, your smartphone will become a christmas tree for nothing&#8230;<\/p>\n<p>I just published my last program &#8220;limitrate&#8221; on Github :<\/p>\n<p>https:\/\/github.com\/tbarbette\/limitrate<\/p>\n<p>This programs allows you to limit the rate of launching a certain command. Instead of launching<\/p>\n<blockquote><p>\/usr\/bin\/program argument1 argument2<\/p><\/blockquote>\n<p>call :<\/p>\n<blockquote><p>limitrate 30 &#8220;\/usr\/bin\/program % argument2&#8221; argument1<\/p><\/blockquote>\n<p>To launch only this command at maximum once every 30 seconds. If you call multiple times the last line in 30 seconds, limitrate will run the command only after 30 seconds replacing the &#8220;%&#8221; by the concatenation of all &#8220;argument 1&#8221;. For example to send an alert e-mail containing files (for example webcam picture) at max every 30 seconds :<\/p>\n<pre><code>10:24:30 : limitrate 30 \"echo \\\"Alert!\\\" | mailx % destination@mail.com\" \"-A \/path\/to\/file1\"\r\n--&gt; Send a mail with file1\r\n10:24:32 : limitrate 30 \"echo \\\"Alert!\\\" | mailx % destination@mail.com\" \"-A \/path\/to\/file2\"\r\n10:24:38 : limitrate 30 \"echo \\\"Alert!\\\" | mailx % destination@mail.com\" \"-A \/path\/to\/file3\"\r\n10:24:41 : limitrate 30 \"echo \\\"Alert!\\\" | mailx % destination@mail.com\" \"-A \/path\/to\/file4\"\r\n10:25:05 : limitrate 30 \"echo \\\"Alert!\\\" | mailx % destination@mail.com\" \"-A \/path\/to\/file5\"\r\n--&gt; Send a mail with file 2,3,4 and 5\r\n<\/code><\/pre>\n<p>Example configuration for motion detection daemon (Camera surveillance) :<\/p>\n<blockquote><p>on_picture_save \/usr\/local\/bin\/limitrate 15 &#8220;echo \\&#8221;See attachment below.\\&#8221; | mailx -s &#8216;Motion in the saloon !&#8217; %<a href=\"mailto:destination@tombarbette.be\">destination@tombarbette.be<\/a>&#8221; &#8220;-A %f&#8221;<\/p><\/blockquote>\n<p>When an intrusion is detected, you&#8217;ll receive a first e-mail with one image. 15 seconds later you&#8217;ll receive all the new images in only one mail, and so on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Maybe you use the &#8220;on_picture_save&#8221; to send yourself an e-mail with motiond when your webcam detect an \u00a0intruder. But when someone enters, you&#8217;ll receive a lot of pictures. And if it was just you forgetting to stop the detection before entering, your smartphone will become a christmas tree for nothing&#8230; I just published my last &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,64,16],"tags":[],"class_list":["post-360","post","type-post","status-publish","format-standard","hentry","category-domotic","category-misc","category-unix"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance - Tom Barbette<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance - Tom Barbette\" \/>\n<meta property=\"og:description\" content=\"Maybe you use the &#8220;on_picture_save&#8221; to send yourself an e-mail with motiond when your webcam detect an \u00a0intruder. But when someone enters, you&#8217;ll receive a lot of pictures. And if it was just you forgetting to stop the detection before entering, your smartphone will become a christmas tree for nothing&#8230; I just published my last &hellip; Continue reading &quot;Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/\" \/>\n<meta property=\"og:site_name\" content=\"Tom Barbette\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-29T14:40:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-08T12:51:33+00:00\" \/>\n<meta name=\"author\" content=\"Tom Barbette\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TomBarbette\" \/>\n<meta name=\"twitter:site\" content=\"@TomBarbette\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tom Barbette\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\\\/\"},\"author\":{\"name\":\"Tom Barbette\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#\\\/schema\\\/person\\\/7f791766092e1207bc7a94a65e74f4fd\"},\"headline\":\"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance\",\"datePublished\":\"2014-10-29T14:40:33+00:00\",\"dateModified\":\"2015-10-08T12:51:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\\\/\"},\"wordCount\":221,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#organization\"},\"articleSection\":[\"Domotic\",\"Misc\",\"Unix\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\\\/\",\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\\\/\",\"name\":\"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance - Tom Barbette\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#website\"},\"datePublished\":\"2014-10-29T14:40:33+00:00\",\"dateModified\":\"2015-10-08T12:51:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#website\",\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/\",\"name\":\"Tom Barbette\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#organization\",\"name\":\"Efficiency of Networked Systems Group\",\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/cropped-logo-uclouvain-2021-barbette.png\",\"contentUrl\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/cropped-logo-uclouvain-2021-barbette.png\",\"width\":512,\"height\":512,\"caption\":\"Efficiency of Networked Systems Group\"},\"image\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/TomBarbette\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/tom-barbette\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#\\\/schema\\\/person\\\/7f791766092e1207bc7a94a65e74f4fd\",\"name\":\"Tom Barbette\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g\",\"caption\":\"Tom Barbette\"},\"sameAs\":[\"https:\\\/\\\/www.tombarbette.be\"],\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/author\\\/tom\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance - Tom Barbette","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/","og_locale":"en_US","og_type":"article","og_title":"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance - Tom Barbette","og_description":"Maybe you use the &#8220;on_picture_save&#8221; to send yourself an e-mail with motiond when your webcam detect an \u00a0intruder. But when someone enters, you&#8217;ll receive a lot of pictures. And if it was just you forgetting to stop the detection before entering, your smartphone will become a christmas tree for nothing&#8230; I just published my last &hellip; Continue reading \"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance\"","og_url":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/","og_site_name":"Tom Barbette","article_published_time":"2014-10-29T14:40:33+00:00","article_modified_time":"2015-10-08T12:51:33+00:00","author":"Tom Barbette","twitter_card":"summary_large_image","twitter_creator":"@TomBarbette","twitter_site":"@TomBarbette","twitter_misc":{"Written by":"Tom Barbette","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/#article","isPartOf":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/"},"author":{"name":"Tom Barbette","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#\/schema\/person\/7f791766092e1207bc7a94a65e74f4fd"},"headline":"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance","datePublished":"2014-10-29T14:40:33+00:00","dateModified":"2015-10-08T12:51:33+00:00","mainEntityOfPage":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/"},"wordCount":221,"commentCount":0,"publisher":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#organization"},"articleSection":["Domotic","Misc","Unix"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/","url":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/","name":"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance - Tom Barbette","isPartOf":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#website"},"datePublished":"2014-10-29T14:40:33+00:00","dateModified":"2015-10-08T12:51:33+00:00","breadcrumb":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/limit-rate-of-mail-sent-by-motion-detection-daemon-motiond-for-webcam-surveillance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/perso.uclouvain.be\/tom.barbette\/"},{"@type":"ListItem","position":2,"name":"Limit rate of mail sent by motion detection daemon (motiond) for webcam surveillance"}]},{"@type":"WebSite","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#website","url":"https:\/\/perso.uclouvain.be\/tom.barbette\/","name":"Tom Barbette","description":"","publisher":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/perso.uclouvain.be\/tom.barbette\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#organization","name":"Efficiency of Networked Systems Group","url":"https:\/\/perso.uclouvain.be\/tom.barbette\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#\/schema\/logo\/image\/","url":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-content\/uploads\/2022\/04\/cropped-logo-uclouvain-2021-barbette.png","contentUrl":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-content\/uploads\/2022\/04\/cropped-logo-uclouvain-2021-barbette.png","width":512,"height":512,"caption":"Efficiency of Networked Systems Group"},"image":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/TomBarbette","https:\/\/www.linkedin.com\/in\/tom-barbette"]},{"@type":"Person","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#\/schema\/person\/7f791766092e1207bc7a94a65e74f4fd","name":"Tom Barbette","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g","caption":"Tom Barbette"},"sameAs":["https:\/\/www.tombarbette.be"],"url":"https:\/\/perso.uclouvain.be\/tom.barbette\/author\/tom\/"}]}},"_links":{"self":[{"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/posts\/360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/comments?post=360"}],"version-history":[{"count":2,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/posts\/360\/revisions"}],"predecessor-version":[{"id":516,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/posts\/360\/revisions\/516"}],"wp:attachment":[{"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/media?parent=360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/categories?post=360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/tags?post=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}