{"id":108,"date":"2016-09-19T21:00:43","date_gmt":"2016-09-19T21:00:43","guid":{"rendered":"http:\/\/doctor-dark.co.uk\/blog\/?p=108"},"modified":"2023-12-18T12:21:30","modified_gmt":"2023-12-18T12:21:30","slug":"online-webcam-project-part-2","status":"publish","type":"post","link":"https:\/\/doctor-dark.co.uk\/blog\/online-webcam-project-part-2\/","title":{"rendered":"Online webcam project, part 2."},"content":{"rendered":"<p><strong>Trigger warning.<\/strong><\/p>\n<p><em>Stop! Don&#8217;t look at the following photographs if you are offended by ugly applications\u00a0of hot glue.<\/em><\/p>\n<p>I found what I thought would be the ideal case for the camera and Pi in the kitchen. It was one of those Tesco plastic food boxes with clips and a watertight seal, and it had nasty cracks in the base in just the right spot to cut a hole for the lens. Using a variety of inappropriate tools, I made the necessary hole, and fixed the lens into it with hot glue.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-109\" src=\"https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_142952-300x225.jpg\" alt=\"Ugly hot glue!\" width=\"600\" height=\"450\" srcset=\"https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_142952-300x225.jpg 300w, https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_142952-768x576.jpg 768w, https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_142952-1024x768.jpg 1024w, https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_142952-1200x900.jpg 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>As I warned you, very ugly hot glue. Note that it covers the join between the two parts of the lens, which I hope will ensure our good Welsh rain can&#8217;t get in between the lens elements. The next steps were to screw the inner lens cap in place, and mount the Raspberry Pi Zero inside the box. I was going to put it in the same part of the box as the lens and camera, but every arrangement I tried had the USB wireless antenna rather close to the camera and its cable. So, I mounted the Pi Zero in the lid of the box with a goodly lump of White Tac.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-110\" src=\"https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_144721-300x225.jpg\" alt=\"img_20160919_144721\" width=\"600\" height=\"450\" srcset=\"https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_144721-300x225.jpg 300w, https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_144721-768x576.jpg 768w, https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_144721-1024x768.jpg 1024w, https:\/\/doctor-dark.co.uk\/blog\/wp-content\/uploads\/2016\/09\/IMG_20160919_144721-1200x900.jpg 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>A notch in the edge of the box, for the power cable, was the next thing. It&#8217;s at the bottom, and only a very small percentage of the rain around here falls upwards, so it may be OK without any sealant. I have more White Tac if there <em>is<\/em> a problem&#8230;<\/p>\n<p><strong>Software<\/strong><\/p>\n<p>Getting the camera to take a picture every ten minutes is not a problem, thanks to <strong>cron<\/strong> and the bash shell.<\/p>\n<p>The intention is to use <strong>lftp<\/strong> to upload the pictures to the web host, but finding a decent example of code that will do that is not proving easy. Please feel free to comment if you have something suitable.<\/p>\n<p>I shouldn&#8217;t have too much difficulty hacking out a web page for the picture to live in, as I am not planning anything fancy, so I&#8217;ll just use HTML, like the rest of my site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trigger warning. Stop! Don&#8217;t look at the following photographs if you are offended by ugly applications\u00a0of hot glue. I found what I thought would be the ideal case for the camera and Pi in the kitchen. It was one of those Tesco plastic food boxes with clips and a watertight seal, and it had nasty &hellip; <a href=\"https:\/\/doctor-dark.co.uk\/blog\/online-webcam-project-part-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Online webcam project, part 2.&#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":[7],"tags":[],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":1,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":111,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/posts\/108\/revisions\/111"}],"wp:attachment":[{"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}