The goal of this project was to build an automated watering system for the vegetables on my balcony with soil moisture sensors. In addition, I included it into my home automation system FHEM.
You can manually turn on/off the watering pump, trigger a watering pulse (you can set the duration), turn on/off the automatic watering mode (this mode allows automatic watering, if soil moisture is below a threshold it triggers a watering pulse).
You can fully customize the parameters, for example the interval the system should read new soil moisture, what is the threshold for the soil moisture to be considered dry or wet
[DC to DC converter](https://www.amazon.de/dp/B09B818N5F?psc=1&ref=ppx_yo2ov_dt_b_product_details)
[12 V PWM solar charge controller](https://www.amazon.de/dp/B08Z84FT4Z?psc=1&ref=ppx_yo2ov_dt_b_product_details)
[30 Watt Solar panel](https://www.amazon.de/Offgridtec-Solarmodul-Solarpanel-Photovoltaikmodul-3-01-001530/dp/B007HLNFES/ref=sxin_17_pa_sp_search_thematic_sspa?content-id=amzn1.sym.9a40cf28-51bb-4bea-92a6-a7215aacac74%3Aamzn1.sym.9a40cf28-51bb-4bea-92a6-a7215aacac74&cv_ct_cx=30+watt+solar&keywords=30+watt+solar&pd_rd_i=B007HLNFES&pd_rd_r=eaf2fb78-64fb-4763-b113-36d1fa0d9c91&pd_rd_w=gWBgZ&pd_rd_wg=eFzLl&pf_rd_p=9a40cf28-51bb-4bea-92a6-a7215aacac74&pf_rd_r=RG1JFKQVJPW7YD850G8W&qid=1688189898&sbo=RZvfv%2F%2FHxDF%2BO5021pAnSA%3D%3D&sr=1-2-6e6ea531-5af4-4866-af75-1ef299d1c279-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9zZWFyY2hfdGhlbWF0aWM&psc=1)
You can configure the port, on which the API runs in configs.py in the 'api_port'-value. You also have to set an API-Key in secrets.py in the 'api'-value. Then you can call the API as follows:
http://servername/api_key/command[/json]
You can use the following commands:
wateron - Turns on the watering pump
wateroff - Turns off the watering pump
waterstate - Returns the state of the watering pump
waterpulse - Triggers the watering pump for the duration of pulse_duration (set it in configs.py)
autoon - Enables automatic watering mode
autooff - Disables automatic watering mode
autostate - Returns state of automatic watering mode
forcesoilread - Forces new readings from soil moisture sensors
waterlevel - Returns the level of the water tank
ping - Check if the API is up and running
stats - Returns some stats of the device
reboot - Reboots the device
logs - See logs of the device (you can add a number like .../stats/12 to see the latest 12 log lines)
soils - See soil moisture of the device (usage like logs)
This is the Watering-HTTPMOD Device for FHEM. It shows status symbols and all readings from stats. You can manually trigger a watering pulse and enable/disable the automatic watering mode.