{"id":23,"date":"2012-07-02T03:11:00","date_gmt":"2012-07-02T03:11:00","guid":{"rendered":""},"modified":"2021-07-18T19:40:03","modified_gmt":"2021-07-18T19:40:03","slug":"i-took-some-pictures-while-i-was-making","status":"publish","type":"post","link":"http:\/\/cockfieldofdreams.com\/blog\/2012\/07\/i-took-some-pictures-while-i-was-making.html","title":{"rendered":"Outlet Control Pictures"},"content":{"rendered":"<div style=\"clear: both; text-align: center;\"><\/div>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<p>I took some pictures while I was making a permanent enclosure for my web-controlled power outlets. These are going in the kitchen and are attached to the old Gateway that plays my fridge music and serves up my tunes. I made it work in a way that each plug on the outlet can be independently controlled.<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-24_18-30-52_573.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" loading=\"lazy\" border=\"0\" height=\"320\" src=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-24_18-30-52_573-168x300.jpg\" width=\"179\" \/><\/a><\/div>\n<p>&nbsp; <\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-24_18-31-01_549.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" loading=\"lazy\" border=\"0\" height=\"320\" src=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-24_18-31-01_549-168x300.jpg\" width=\"179\" \/><\/a><\/div>\n<p>&nbsp;Oh, and I used a ton of hot glue to seal everything up&#8230;<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_01-08-07_445.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" loading=\"lazy\" border=\"0\" height=\"320\" src=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_01-08-07_445-168x300.jpg\" width=\"179\" \/><\/a><\/div>\n<p>&nbsp; <\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_01-08-13_937.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" loading=\"lazy\" border=\"0\" height=\"179\" src=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_01-08-13_937-300x168.jpg\" width=\"320\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_01-33-12_399.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" loading=\"lazy\" border=\"0\" height=\"179\" src=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_01-33-12_399-300x168.jpg\" width=\"320\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_11-21-37_619.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" loading=\"lazy\" border=\"0\" height=\"320\" src=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_11-21-37_619-168x300.jpg\" width=\"179\" \/><\/a><\/div>\n<p>I took 12V DC control wiring from the IDE drives&#8217; power wires and ran it out of the front of the computer.<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_13-37-31_575.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" loading=\"lazy\" border=\"0\" height=\"179\" src=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_13-37-31_575-300x168.jpg\" width=\"320\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_14-06-05_907.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" loading=\"lazy\" border=\"0\" height=\"179\" src=\"http:\/\/cockfieldofdreams.com\/blog\/wp-content\/uploads\/2012\/07\/2012-06-30_14-06-05_907-300x168.jpg\" width=\"320\" \/><\/a><\/div>\n<p>Very professional! <\/p>\n<hr \/>\n<p>New update relating to my lamp: I was successfully able to install a webcam and set it up to monitor the lamp. This is more of a temporary solution until I can learn Python.<\/p>\n<p>Any way! I installed a program called &#8220;streamer&#8221; which can do many things, including take a JPEG picture from a webcam. Then I wrote a script to run this program every second.<\/p>\n<p><code>#!\/bin\/sh<\/code><br \/><code>while [ true ]&nbsp;<\/code><code>do&nbsp;<\/code><br \/><code>&nbsp;streamer -s 640x480 -f jpeg -o \/var\/www\/images\/snapshot.jpeg&nbsp;<\/code><br \/><code>&nbsp;sleep 1<\/code><br \/><code>done<\/code><\/p>\n<p>The picture gets rewritten every time it runs. That way the web server doesn&#8217;t need to think about which picture to show.   Now I need to execute this program as root at boot time. I added a line to the \/etc\/init.d\/rc.local file:<\/p>\n<p><code>\/home\/bryan\/streamer &amp;<\/code><\/p>\n<p>Hooray! This method obviously takes quite a bit more system resources. If this was something that people would look at all the time, maybe it would be a good method, but I&#8217;ll maybe use this once a week, so hopefully when I learn Python I&#8217;ll figure out a way to execute the &#8220;streamer&#8221; program once when the page is requested.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I took some pictures while I was making a permanent enclosure for my web-controlled power outlets. These are going in the kitchen and are attached to the old Gateway that plays my fridge music and serves up my tunes. I made it work in a way that each plug on the outlet can be independently &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/cockfieldofdreams.com\/blog\/2012\/07\/i-took-some-pictures-while-i-was-making.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Outlet Control Pictures&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":221,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/posts\/23"}],"collection":[{"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":1,"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":229,"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/posts\/23\/revisions\/229"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/media\/221"}],"wp:attachment":[{"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cockfieldofdreams.com\/blog\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}