While waiting for the kit to arrive and to be able to start piecing all together, it's time to start thinking how are the three Raspberry PIs be able to talk to each other.
The following picture shows this - the exchange of messages between them.
RPI4
The RPI 4 will store all the sensor information in a SQLITE3 database. The samples will be taken every 15m or 30m, still in study.
Two python scripts will be used:
- Getting all the information from the sensors and storing it in the database
- Using XMLRPC, a client will connect to the XMLRPC server (running in the server where the Automation HAT MINI is) and will issue order to turn on or off the pumps or lights, according to the sensor data. This will also be store in the database:
- Pumps on or off
- Lights on or off
The RPI4 will also have a Flask app providing some web services for the Raspberry PI zero to query with some information.
RPI 3B+
The Raspberry PI 3B+ will control the Automation Hat MINI and, if needed, a relay with 4 channels to control what it can't be controlled with the HAT - outputs/relays availability.
A Python XMLRPC server will be running here, waiting for instructions and commands from the RPI4 to take actions - using the Automation HAT or the relay .
Raspberry PI Zero
The Raspberry PI zero will take photos of the Hydroponics setup (and hopefully the crops) twice a day. This will allow to follow the progress of the vegetables growth (or not) in time.
Before it posts to Twitter, using Web Services, will query them for some info to post, along with the photo, to Twitter.
Well, it sounds well and easy on paper... Let's hope !
Happy programming and growing !
Top Comments