π± From Code to Soil: How We Built an Arduino-Powered Smart Garden API for MyZubster
And how you can join the movement β one sensor, one plant, one Monero transaction at a time.
π§ The idea
MyZubster started as a decentralized ecosystem for privacy, payments, and plant mapping.
But we wanted to go further.
We wanted to connect the digital world with the physical one β to bridge code and soil, sensors and seeds, data and community.
That's why we built the Arduino Garden API: a simple, open, and secure way for anyone to connect their urban garden to the MyZubster network.
π οΈ What we built
We added a new module to the MyZubster Gateway:
POST /api/garden/data β authenticated endpoint to receive sensor data (pH, EC, temperature, humidity) from Arduino or ESP devices.
GET /api/garden/:id/stats β retrieve historical statistics (min, max, average) for each garden.
MongoDB persistence β all data is stored and ready for future dashboards and analytics.
The API is lightweight, self-hosted, and designed to work with lowβpower devices like ESP8266 or ESP32.
π How it works (in 30 seconds)
Arduino reads sensors (pH, EC, temperature, humidity).
Sends a JSON payload to the MyZubster Gateway.
Data is stored in MongoDB.
You get stats β min, max, average over time.
json
POST /api/garden/data
{
"gardenId": "my-urban-garden",
"ph": 6.2,
"ec": 1.8,
"temperature": 22.5,
"humidity": 65
}
json
GET /api/garden/my-urban-garden/stats
{
"gardenId": "my-urban-garden",
"stats": {
"ph": { "min": 6.0, "max": 6.5, "avg": 6.2, "count": 42 },
"ec": { "min": 1.6, "max": 2.0, "avg": 1.8, "count": 42 },
...
}
}
π§ͺ Real test: it works
We tested the API with a simple curl command β and it worked instantly:
bash
curl -X POST http://localhost:3002/api/garden/data \
-H "Content-Type: application/json" \
-d '{
"gardenId": "test-garden-001",
"ph": 6.2,
"ec": 1.8,
"temperature": 22.5,
"humidity": 65
}'
Response:
json
{
"success": true,
"message": "Dati dell'orto salvati con successo",
"data": {
"gardenId": "test-garden-001",
"ph": 6.2,
"ec": 1.8,
"temperature": 22.5,
"humidity": 65,
"timestamp": "2026-07-30T12:00:45.996Z"
}
}
Then we sent three readings and retrieved aggregated statistics β all working perfectly.
π Why this matters
This is not just an API. It's an invitation.
Gardeners can now monitor their plants remotely.
Developers can build dashboards, alerts, and automations.
Researchers can collect open data on urban agriculture.
Communities can share knowledge, seeds, and produce.
MyZubster is becoming a bridge between technology, ecology, and local communities.
π οΈ Code for Arduino (ESP8266/ESP32)
Here's a minimal example of how to send data from an Arduino to MyZubster:
cpp
include
include
const char* ssid = "your_wifi";
const char* password = "your_password";
const char* serverUrl = "http://188.213.161.186:3002/api/garden/data";
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) delay(500);
Serial.println("WiFi connected!");
}
void loop() {
// Read sensors (pH, EC, temperature, humidity)
float ph = 6.2;
float ec = 1.8;
float temp = 22.5;
float hum = 65;
// Create JSON payload
StaticJsonDocument<200> doc;
doc["gardenId"] = "test-garden-001";
doc["ph"] = ph;
doc["ec"] = ec;
doc["temperature"] = temp;
doc["humidity"] = hum;
String payload;
serializeJson(doc, payload);
// Send HTTP request
WiFiClient client;
if (client.connect("188.213.161.186", 3002)) {
client.println("POST /api/garden/data HTTP/1.1");
client.println("Host: 188.213.161.186:3002");
client.println("Content-Type: application/json");
client.print("Content-Length: ");
client.println(payload.length());
client.println();
client.println(payload);
delay(1000);
}
delay(60000); // Send every minute
}
π How you can contribute
We've opened 9 issues across the ecosystem to make this vision real:
Repository Type Title
1 myzubster Free Add "Urban Garden" category to the global map
2 myzubster Free Detail page for each garden
3 myzubster Bounty Automatic geolocation and area search (0.06 XMR)
4 MyZubster-Marketplace Free "Garden Products" category in Marketplace
5 MyZubster-Marketplace Free Seed and cutting exchange
6 myzubster-docs Free Guides for building a hydroponic garden with Arduino
7 MyZubsterGateway Bounty API to receive data from Arduino sensors (0.08 XMR) β DONE β
8 MyZubsterWeb Free Dashboard to visualize garden data
9 myzubster Free Arduino code examples for smart gardens
π All issues: https://github.com/MyZubster-Ecosystem/myzubster/issues
π Related links
Live site: https://myzubster.com
GitHub Organization: https://github.com/MyZubster-Ecosystem
Gateway Repository: https://github.com/MyZubster-Ecosystem/MyZubsterGateway
Telegram Channel: https://t.me/myzubster
Telegram Bot: @MyZubster_bot
π A final thought
"The best time to plant a tree was 20 years ago. The second best time is now."
MyZubster is no longer just about code and crypto.
It's about growing food, building community, and taking care of the earth β one sensor, one plant, one Monero transaction at a time.
If you believe in a greener, more decentralized future,
welcome aboard. π±
Daniel Ioni β Rimini, 2026
π± With Chanel watching me write code
Top comments (0)