# 🌱 ESP32 Greenhouse Controller - Command Reference ## ⚡ System Commands | **Command** | **Description** | |------------------------|----------------| | `REBOOT` / `RESTART` | Reboots the ESP32 immediately. | | `SET_DEFAULT` | Restores all configuration to default and reboots the ESP32. | ## 📡 WiFi Commands | **Command** | **Description** | |----------------------------------|----------------| | `SET_WIFI ,` | Updates WiFi credentials & saves them to EEPROM. | | `SCAN_WIFI` | Scans for available WiFi networks (human-readable). | | `SCAN_WIFI JSON` | Scans for WiFi networks and returns results in JSON format. | ## 📡 MQTT Commands | **Command** | **Description** | |--------------------------------------|----------------| | `SET_MQTT_HOST ` | Updates MQTT broker hostname or IP. | | `SET_MQTT_PORT ` | Updates MQTT broker port. | | `SET_MQTT_USER ` | Updates MQTT username. | | `SET_MQTT_PASS ` | Updates MQTT password. | | `SET_MQTT_TOPIC_ROOT ` | Updates MQTT topic root. | | `SET_MQTT_CONN ,,,,` | Sets all MQTT settings in one command. | ## ⚙️ Global Configuration Commands | **Command** | **Description** | |--------------------------------|----------------| | `SET ` | Updates a global configuration parameter. | | **Supported Parameters** | `publishInterval`, `wifiReconnectInterval`, `mqttReconnectInterval`, `mixerLevelSetpoint`, `feederLevelSetpoint`, `mixerFullLevel`, `mixerRefillLevel`, `phSettlingTime`, `phTargetMax`, `phPumpDuration`, `mixingPumpDuration`, `autoMode`, `bypassFillInterlock` | ## 🌱 Per-Plant Configuration Commands | **Command** | **Description** | |-----------------------------------------------|----------------| | `SET PLANT MODE ` | Sets the active watering mode for a plant (index starts at 1). | | `SET PLANT SETPOINTS ` | Updates moisture setpoints for a plant's growth stage. | ## 🔹 Example Usages: ``` SET_WIFI MyHomeWiFi,SecurePassword123 ``` **Output:** ``` WiFi credentials updated: SSID=MyHomeWiFi ``` ``` SCAN_WIFI JSON ``` **Output:** ```json { "networks": [ { "ssid": "HomeWiFi", "signal": -67, "security": "Protected" }, { "ssid": "GuestWiFi", "signal": -72, "security": "Protected" } ] } ```