My current Gardu setup.
Introduction
For a general introduction feel free to read my blog post.
To register your GARDU on this website this is what you need one. To create one you need:
- an arduino or similar
- One or more Hydro sensor
- A way to send two POST request to this website.
My setup is opensource and is available on this gitlab repo. The script that manages the calls is this one. This is the list of materials I've used.
As I written in the blog post I use ROS to manage the communication between the Arduino and the RasberryPie Computer. With the new Arduino you can simply write everything using the integrated WiFi module and server.
If you end up making one contact me.
How to interact with this website
There are two POST requests you need to send:
- The first one to
gardenio.ideallab.org/garden/sensor_record_add
for each sensor's read - The second one to
gardenio.ideallab.org/garden/all_sensors_acquired
which signals all the sensors have been read for that measurments.
POST to /garden/sensor_record_add
Expected body of the post to contain:
- timestamp*
- gardu-identifier
- sensor
- value
Note: the gardu-identifier can be any string you decide. We suggest to use the format:
Gardu-, but anything goes. The `sensor` can also be anything, we suggest to give
it a unique name.
* `timestamp` is not mandatory -- if not given the server will use the one of the timestamp of the
POST request.
A typical payload looks like:
{'sensor' : "RedBlack",
'gardu-identifier' : "Gardu-69015a28-6219-11eb-879b-00155da14f8f",
'value': 400,
'timestamp: '2021-01-28T20:25:43'}"
}
POST to /garden/all_sensors_acquired
Check the threshold for all the sensorRecord and return true or false to switch on True
Params:
- gardu-identifier: The gardu which has done the reading of all the sensors attached
- sensor_acquired: Must be True
Register on the website
If you have done all this nicely, now remember to register your own Gardu using exaclty the same identifier you used to in the first POST request.
Go to your own Gardu to then associate a plant to each sensor.
Have fun!