Post by papa on Jun 1, 2023 20:21:17 GMT
May 31, 2023 16:51:01 GMT diegopcbs said:
I have a project to do controlled irrigation via MQTT, I saw that you have a project with Gateway Mqtt, could you help me?Helping me with an orientation?
diegopcbs, "controlled irrigation via MQTT" is a challenging project. For orientation, I will describe some possibilities, some components, & some warnings.
An initial warning: This project risks over watering & under watering.
1) An electrically-controlled valve connected to your water supply pipe. The valve I've used takes an AC power supply of 24 volts. Also needed is a DC to AC relay for the (DC) node to switch on the AC power to the valve.
2) A remotely communicating device to switch the relay/valve ON & OFF. A WiFi device may be too far from one's WiFi router to connect reliably. Instead I have used an Arduino node that communicates via an RFM69 radio. An RFM69 radio node needs an RFM69 gateway for two-way communication with a computer's MQTT. This forum (see below) has docs on building & programming the node & a WiFi/RFM69 gateway.
3) Some kind of computer based control software is needed. For Windows & Linux computers, this forum has installed Mosquitto MQTT communication & openHAB with a MQTT binding. There are also openHAB apps for phones.
4) The above hardware & software would allow one to remotely control water flow ON & OFF via a virtual openHAB button or openHAB-scheduled timers.
5) Also needed are ways to protect the electronics from water.
6) What if you want to add received rainfall as a factor? This makes the openHAB programming more complicated. I once implemented that. However it became difficult to obtain the needed information from internet weather services.
7) What if you want to add soil moisture as a factor? Again more complicated programming. Also after trying a couple methods, I found it challenging to electronically measure soil moisture. In my soil conditions, capacitive soil moisture sensors were very unreliable. I had the best (but not fully reliable) results from resistance-based soil moisture sensors.
A final warning: This project risks over watering & under watering. For one fail safe, I programmed the node to turn off water if the node lost contact with the gateway.
Next: Some Forum Threads on Controlled Irrigation via MQTT