How chriswycoff/smart_greenhouse works
smart_greenhouse links a greenhouse’s ESP8266 to a PHP website and SQL-backed device state. A user views the greenhouse interface, which reads device state and submits fan, heater, water, or door changes to the update handler. The ESP8266 exchanges data with the device endpoint: it reports temperature and humidity, and receives actuator states. The endpoint also maintains the fan timer and device state in the database. The README documents the two-way device connection, but firmware details were not sampled, so its internal behavior is not expanded here.
Main entry points: device_interact.php Device endpoint · greenhouse_interface.php Control interface · for_esp8266.ino ESP8266 firmware · change_data.php State updater
Components 7
Web interface
- Control interface
greenhouse_interface.php
Server logic
- State updater
change_data.php - Device endpoint
device_interact.php - Device database
Greenhouse device
- ESP8266 firmware
for_esp8266/for_esp8266.ino
Other components
- Greenhouse user
- Greenhouse hardware
Connections 10
- Greenhouse user → Control interface: views controls
- Control interface → Device database: reads state
- Control interface → State updater: submits changes
- State updater → Device database: updates state
- ESP8266 firmware → Device endpoint: reports readings
- Device endpoint → Device database: updates readings
- Device endpoint → Device database: reads actuator state
- Device endpoint → Device database: updates fan timer
- Device endpoint → ESP8266 firmware: returns actuator states
- ESP8266 firmware → Greenhouse hardware: communicates with