{ "info": { "author": "Antoine Rousseaux", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Other Environment", "Framework :: Flask", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Home Automation", "Topic :: Scientific/Engineering :: Atmospheric Science" ], "description": ".. image:: https://raw.githubusercontent.com/anxuae/piH2O/master/templates/pih2o.png\n :align: center\n :alt: PiH2O\n\n\nThe ``pih2o`` project attempts to provide an automatic plant watering application *out-of-the-box*\nin pure Python for Raspberry Pi. The watering is triggered for all plants depending on the number\nof plants which need water.\n\nRequirements\n------------\n\nThe requirements listed below are the one used for the development of ``pih2o``, but other\nconfiguration may work fine.\n\nThe **pump** can be replaced by an electro valve if the tank water is upper than the plants\n(watering by gravity). The number of **soil moisture sensors** can be easily adapted from 1 to 4.\nThe **transistor** is optional, the sensors can be directly connected to the 5V pin in order\nto power them continuously (but it accelerate their corrosion).\n\nHardware\n^^^^^^^^\n\n* 1 Raspberry Pi 2 Model B (or higher)\n* 1 pump and its power supply 12V DC (or electro valve)\n* 1 to 4 soil moisture sensors (Arduino TE215)\n* 1 Analog-to-Digital Converter (ADS1015 or ADS1115 4 Channel I2C)\n* 2 transistors NPN (type BC237B)\n* 1 transistor PNP high power switch (type BDX34)\n* 1 zener diode (type 1N4007)\n* 2 resistors of 1.5k Ohm\n* 1 resistor of 10k Ohm\n\nSoftware\n^^^^^^^^\n\n* Python ``3.5.3``\n* RPi.GPIO ``0.6.3``\n* adafruit-ads1x15 ``1.0.2``\n* croniter ``0.3.23``\n* blinker ``1.4``\n* flask ``1.0.2``\n* flask-restful ``0.3.6``\n* flask-sqlalchemy ``2.3.2``\n\nInstall\n-------\n\nA brief description on how to set-up a Raspberry Pi to use this software.\n\n1. Download latest Raspbian image and set-up an SD-card. You can follow\n `these instructions `_ .\n\n2. Insert the SD-card into the Raspberry Pi and fire it up. Use the raspi-config tool that is shown\n automatically on the first boot to configure your system (e.g., expand partition, change hostname,\n password, enable SSH, configure to boot into GUI, etc.).\n\n .. hint:: Don't forget to enable the I2C in raspi-config.\n\n3. Reboot and open a terminal. Install the latest firmware version:\n\n ::\n\n $ sudo rpi-update\n\n4. Upgrade all installed software:\n\n ::\n\n $ sudo apt-get update\n $ sudo apt-get upgrade\n\n5. Install ``pih2o`` from the `pypi repository `_:\n\n ::\n\n $ sudo pip3 install pih2o\n\nRun\n---\n\nStart the automatic plant watering application using the command::\n\n $ pih2o\n\nThe application acts as a daemon running on the Raspberry Pi. It can be controlled thanks\nto an `RESTful API `_.\n\nThe ``pih2o`` is scheduled to wake up every given interval, power the soil moisture\nsensors and take humidity measurement (or threshold if no analog input available).\nFinally the sensors are powered off to extend their lifespan.\n\n.. warning:: Running pih2o in that way use the development server of\n `flask `_ which is `not suitable in a production\n environment `_\n\nDefine the record interval\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe record interval (i.e. time between each humidity measurement) is defined\nin the `Configuration`_ using the `crontab syntax `_\nwhich is summarized here::\n\n \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 minute (0 - 59)\n \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 hour (0 - 23)\n \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of month (1 - 31)\n \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 month (1 - 12)\n \u2502 \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of week (0 - 6) (Sunday to Saturday)\n \u2502 \u2502 \u2502 \u2502 \u2502\n \u2502 \u2502 \u2502 \u2502 \u2502\n record_interval = * * * * *\n\nPump triggering strategy\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe watering time is defined in the `Configuration`_. The rational to dissociate the pump stop\nfrom the humidity level measured is the soil slow absorption and we want to avoid floor flooding.\n\nThree strategies are defined to detect if watering is required by your plants depending on your\nconfiguration and the number of sensors connected.\n\n* ``[GENERAL][watering_strategy] = majority`` means the pump is triggered if half of sensors\n are triggered.\n* ``[GENERAL][watering_strategy] = first`` means the pump is triggered if at least one sensor\n is triggered.\n* ``[GENERAL][watering_strategy] = last`` means the pump is triggered if all sensors are\n triggered.\n\n.. note:: if analog channels are available: the sensor is triggered when the humidity read from the AO\n goes below the defined threshold (in %) else if digital channels are available: the sensor\n is triggered if the corresponding DO is set to 1.\n\nInstall developing version\n--------------------------\n\nIf you want to use an unofficial version of the ``pih2o`` application, you need to work from a\nclone of this ``git`` repository. Replace the step 5. of the `Install`_ procedure above by the\nfollowing actions:\n\n- clone from github ::\n\n $ git clone https://github.com/anxuae/piH2O.git\n\n- go in the cloned directory ::\n\n $ cd pih2o\n\n- install ``pih2o`` in editable mode ::\n\n $ sudo pip3 install -e .\n\n- start the application exactly in the same way as installed from pypi. All modifications performed\n in the cloned repository are taken into account when the application starts.\n\nConfiguration\n-------------\n\nAt the first run, a configuration file is generated in ``~/.config/pih2o/pih2o.cfg``\nwhich permits to configure the behavior of the application. The configuration can be\neasily edited using the command::\n\n \u00a0 $ pih2o --config\n\nThe default configuration can be restored with the command (strongly recommended when\nupgrading ``pih2o``)::\n\n \u00a0 \u00a0$ pih2o --reset\n\nSee the `default configuration file `_\nfor further details.\n\nCircuit diagram\n---------------\n\nSoil moisture sensor specification used for this project (the number is up to you but the following\ndiagram is for up to 4 max):\n\n==================== ==================================\nParameter Value\n==================== ==================================\nInput Voltage 3.3 \u2013 5V\nOutput Voltage 0 \u2013 4.2V\nInput Current 35mA\nOutput Signal Both Analog (A0) and Digital (D0)\n==================== ==================================\n\nDigital sensors\n^^^^^^^^^^^^^^^\n\nHere is the diagram for digital sensors (rise to high on dry soil). Depending on the sensor type,\nan signal amplifier may be necessary (not represented on this diagram).\n\n.. image:: https://raw.githubusercontent.com/anxuae/pih2o/master/templates/sketch_digital.png\n :align: center\n :alt: Electronic sketch for digital sensors\n\nAnalog sensors\n^^^^^^^^^^^^^^\n\nHere is the diagram for analog sensors connected to an ADC1115 to measure humidity level.\n\n.. image:: https://raw.githubusercontent.com/anxuae/pih2o/master/templates/sketch_analog.png\n :align: center\n :alt: Electronic sketch for analog sensors\n\nPump\n^^^^\n\nHere is the diagram for the pump (or electro valve). For better understanding the sensors\nare not represented here.\n\n.. image:: https://raw.githubusercontent.com/anxuae/pih2o/master/templates/sketch_pump.png\n :align: center\n :alt: Electronic sketch for pump\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/anxuae/piH2O.git", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anxuae/piH2O", "keywords": "Raspberry Pi,Plant,Watering", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "pih2o", "package_url": "https://pypi.org/project/pih2o/", "platform": "unix", "project_url": "https://pypi.org/project/pih2o/", "project_urls": { "Download": "https://github.com/anxuae/piH2O.git", "Homepage": "https://github.com/anxuae/piH2O" }, "release_url": "https://pypi.org/project/pih2o/1.0.3/", "requires_dist": [ "RPi.GPIO", "adafruit-ads1x15", "blinker", "croniter", "flask", "flask-restful", "flask-sqlalchemy" ], "requires_python": "", "summary": "An automatic plant watering application in pure Python for the Raspberry Pi.", "version": "1.0.3" }, "last_serial": 5379004, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b69316e96d01e37bd90fcb74fdc80bf9", "sha256": "30ffe9a69d9c518a19237a95fc6f6c57b4b17259bbe47c103b4ebf36861847e1" }, "downloads": -1, "filename": "pih2o-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b69316e96d01e37bd90fcb74fdc80bf9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16691, "upload_time": "2018-05-26T17:50:25", "url": "https://files.pythonhosted.org/packages/9d/d9/72b41c9b71e538472b061ffa599d7e2cf4a1f1398457b926398f4c892188/pih2o-0.0.1-py2.py3-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "2a3afa3f4e21885997f4b19bc94d9c88", "sha256": "19514ad42ec33ae2c6762914b67f0afc88118184a9597848d508866b85bc874f" }, "downloads": -1, "filename": "pih2o-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2a3afa3f4e21885997f4b19bc94d9c88", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17784, "upload_time": "2018-05-27T19:05:30", "url": "https://files.pythonhosted.org/packages/6b/61/95fcf7b7262c93ca41158f5fcc9bf7cfd60384e2901bfff091499fb71f95/pih2o-0.0.2-py2.py3-none-any.whl" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "18e18ee2870014b2c2feb62f84097dcd", "sha256": "ea4865ad4ceaac7124698f1c1f9e6297a0c50375daf5488580610053e8aff1d6" }, "downloads": -1, "filename": "pih2o-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "18e18ee2870014b2c2feb62f84097dcd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18360, "upload_time": "2018-06-24T21:09:38", "url": "https://files.pythonhosted.org/packages/ee/3f/ce7ee73f9b86d5ce41aa79576278dce8aaf3fbc3215b13fad5df5936c12c/pih2o-1.0.0-py2.py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4f8e17a85e7a3f58ea8392fe73509909", "sha256": "0255822ccd20ed3822e6988ae0060f4fbb6eabbb9d901f9434cb11603827dd0c" }, "downloads": -1, "filename": "pih2o-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4f8e17a85e7a3f58ea8392fe73509909", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18416, "upload_time": "2018-09-25T21:54:37", "url": "https://files.pythonhosted.org/packages/c0/bc/29ff9e03aab49f0daded6a991f53a7fc963e9fab61b730ed26607fc2615d/pih2o-1.0.1-py2.py3-none-any.whl" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "6b0c236f0d3247cb15668beadd3695e7", "sha256": "14b94abb5aec74a80d1d5266fe17be46b7e9342eb87d9fd916650109b948b7f6" }, "downloads": -1, "filename": "pih2o-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6b0c236f0d3247cb15668beadd3695e7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18474, "upload_time": "2018-09-26T19:33:53", "url": "https://files.pythonhosted.org/packages/2b/a4/1606e69e63246ef2456ce117d140135afa3e974127b3ae8d4d9100c35308/pih2o-1.0.2-py2.py3-none-any.whl" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "6972ef3c2cc912d20109fb05cd8d2105", "sha256": "c738b757217d0037618e3ec4bc1792ec2e1ff27fb8329940d90e0831725c7942" }, "downloads": -1, "filename": "pih2o-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6972ef3c2cc912d20109fb05cd8d2105", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18575, "upload_time": "2019-06-09T22:40:18", "url": "https://files.pythonhosted.org/packages/ea/3c/48dc9ae48e818dcbdc699dd8fc1686d180d374c7978427a11e99488a6161/pih2o-1.0.3-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6972ef3c2cc912d20109fb05cd8d2105", "sha256": "c738b757217d0037618e3ec4bc1792ec2e1ff27fb8329940d90e0831725c7942" }, "downloads": -1, "filename": "pih2o-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6972ef3c2cc912d20109fb05cd8d2105", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18575, "upload_time": "2019-06-09T22:40:18", "url": "https://files.pythonhosted.org/packages/ea/3c/48dc9ae48e818dcbdc699dd8fc1686d180d374c7978427a11e99488a6161/pih2o-1.0.3-py2.py3-none-any.whl" } ] }