{"id":421,"date":"2024-07-07T17:23:03","date_gmt":"2024-07-07T16:23:03","guid":{"rendered":"https:\/\/www.bolukan.nl\/?p=421"},"modified":"2024-07-07T19:16:42","modified_gmt":"2024-07-07T18:16:42","slug":"how-full-is-the-rain-barrel","status":"publish","type":"post","link":"https:\/\/www.bolukan.nl\/?p=421","title":{"rendered":"How full is the rain barrel?"},"content":{"rendered":"\n<p>I made a setup with an AJ-SR04M Waterproof Ultrasonic Sensor to measure how full the rain barrel is. The measurement data are distributed via mqtt and shown on the home monitor.<\/p>\n\n\n\n<p>The sensor dangles down from the center of the lid. There was no crack to run the wire in because I put the green house together properly. The wire enters via the roof truss through the upper window. Inside is the PCB that controls the speaker and processes the signal. A four-wire telephone wire helps bridge the last meters to a Raspberry PI Zero Wifi that is connected to the fixed internet.<\/p>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-ad2f72ca wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"706\" height=\"1024\" src=\"https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/WireFromRainBarrelIntoGreenhouse.jpg\" alt=\"\" class=\"wp-image-423\" style=\"width:auto;height:200px\" srcset=\"https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/WireFromRainBarrelIntoGreenhouse.jpg 706w, https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/WireFromRainBarrelIntoGreenhouse-207x300.jpg 207w\" sizes=\"(max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"848\" height=\"1024\" src=\"https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/AJ-SR04M_In_Greenhouse.jpg\" alt=\"\" class=\"wp-image-424\" style=\"width:auto;height:200px\" srcset=\"https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/AJ-SR04M_In_Greenhouse.jpg 848w, https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/AJ-SR04M_In_Greenhouse-248x300.jpg 248w, https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/AJ-SR04M_In_Greenhouse-768x927.jpg 768w\" sizes=\"(max-width: 848px) 100vw, 848px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"719\" height=\"1024\" src=\"https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/PiZero_Greenhouse-719x1024.jpg\" alt=\"\" class=\"wp-image-425\" style=\"width:auto;height:200px\" srcset=\"https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/PiZero_Greenhouse-719x1024.jpg 719w, https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/PiZero_Greenhouse-211x300.jpg 211w, https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/PiZero_Greenhouse.jpg 720w\" sizes=\"(max-width: 719px) 100vw, 719px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"590\" src=\"https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/GreenHouseOnMagicMirror.jpg\" alt=\"\" class=\"wp-image-426\" style=\"width:auto;height:200px\" srcset=\"https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/GreenHouseOnMagicMirror.jpg 1024w, https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/GreenHouseOnMagicMirror-300x173.jpg 300w, https:\/\/www.bolukan.nl\/wp-content\/uploads\/2024\/07\/GreenHouseOnMagicMirror-768x443.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n\n<p>A Python script runs on the Pi as a service to periodically start a measurement and send the result to the MQTT server. A first application with the received data is to display the information &#8211; how much space is left in the water barrel &#8211; on the home monitor.<\/p>\n\n\n\n<p>The script is published on github: <a href=\"https:\/\/gist.github.com\/Bolukan\/376181c5e0f1abd9b3105a20a7d64ad1\" target=\"_blank\" rel=\"noreferrer noopener\">Python script to transfer AJ-SR04M Waterproof Ultrasonic Sensor to MQTT <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made a setup with an AJ-SR04M Waterproof Ultrasonic Sensor to measure how full the rain barrel is. The measurement data are distributed via mqtt and shown on the home monitor. The sensor dangles down from the center of the lid. There was no crack to run the wire in because I put the green [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[13,5],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-esp8266","tag-python","tag-software"],"_links":{"self":[{"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/posts\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=421"}],"version-history":[{"count":5,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions"}],"predecessor-version":[{"id":436,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions\/436"}],"wp:attachment":[{"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}