It is lightweight but powerful enough that it doesn’t make sense to try and “roll my own” storage system. I used the SQLite library for data storage. If the Raspberry Pi can run autonomously, you must be storing data somehow. That’s a great idea, we love the BOM polling to check the probability and amount of rainfall! It could also easily be adapted to incorporate any local water-restrictions if (or more accurately, when) we see another extended drought here in Australia too. The water control solenoids have to put up with humidity and temperature fluctuations. If, for some reason, my home internet connection goes down and the Pi can’t connect to the server for an update, it just keeps going with the previously stored programme. The Raspberry Pi can then sit safely behind my home firewall, and connects to the web server for updates (I setup private API authentication over HTTPS, so it’s secure too). It also provides a high speed connection for making requests to the BOM data feed. The live web server is data-centre connected, so it’s virtually guaranteed to be online all the time. This seemed like a logical choice for the network setup. It doesn’t really matter if the forecasts aren’t 100% accurate – the plants aren’t going to mind if we get 10mm of rain instead of 20mm of rain! The web server also polls the BOM (Bureau of Meteorology) data feed (available in JSON format) for rain forecasts for my area. I integrated it into an existing web server infrastructure that I’ve developed over time, so I can’t really share the PHP code itself but I have included a sample XML response that the server produces, and the Python code that runs on the Pi. There’s some software with the OpenSprinkler that I could have made use of, but I really wanted to roll my own. I wrote the Python for the Pi from scratch. I setup a web server to do much of the “thinking” the Pi basically then polls the web server and does what it’s told. You know it’s a success when someone else asks you for one too! How have you setup the network topology? It ended up working so well that I set one up at my parents’ house too! They're both working really well. I understand Python well, so I thought I’d give it a go. Over the years, I’ve gained some experience hardware interfacing with Raspberry Pi in a few different projects, so I figured I’d apply my IT knowledge to a little home automation. A sprinkler system on a standard timer doesn’t really account for the seasons either, so it’s easy to over- or under-water everything. Well I’m rather busy, so spending 30 minutes watering the garden with a hose isn’t a great use of my time. What made you embark on your automatic garden watering project? We’re definitely onboard for using technology to save time, and this certainly reclaims some time that could otherwise be lost. The system is equally suited to planter-pot micro-spray and other methods to keep your pots from drying out on a hot summer day, which can happen in just hours. This installation has been used for in-ground watering, and can easily adapt above-ground sprinklers, drip-tube just about any irrigation method. Although the garden may not need as much water in winter (as compared to summer), in Australia we can certainly go weeks or months without significant rain, so letting technology handle this task makes a lot of sense. Using a Raspberry Pi, an OpenSprinkler breakout controller, and a little ingenuity, Thomas has created an intelligent IoT-connected watering system to keep the garden watered year-round. But it doesn’t mean we have to do it manually. As much as watering the garden might be a soothing sort of meditation for some, for others, it’s simply one of many necessary chores to keep a home looking nice.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |