How igcim/pilz works
Pilzzucht is a PHP web application for monitoring and controlling a mushroom-growing environment. Users sign in, review live readings and device state, define mushroom varieties and growth-phase setpoints, and choose operating modes or manual device actions. The ESP32 reports readings through an authenticated JSON endpoint; automatic regulation and manual controls create queued commands that the device retrieves on a later report. The map reflects excerpted callers and documented behavior; unsampled login, simulator, and management flows are represented only where their responsibilities are evident, with uncertain links omitted.
Main entry points: db.php MySQL database · messung.php Measurement API · index.php Live dashboard · funktionen.php Command and expiry helpers
Components 18
Web application
- Sign-in
login.php - Session and CSRF
includes/auth.php - Live dashboard
index.php - Control settings
steuerung.php - ESP simulator
esp_simulator.php - Admin creation
admin_anlegen.php - Shared navigation
includes/header.php
Cultivation profiles
- Variety list
pilzsorten.php - Variety editor
pilzsorte_bearbeiten.php
Control logic
- Automatic regulation
includes/regelung.php - Command and expiry helpers
includes/funktionen.php
ESP interface
- Measurement API
api/messung.php - CLI device model
tools/esp_dummy.php - API key config
config/esp.php
Persistence
- MySQL database
config/db.php
Other components
- Grower
- ESP32
- MySQL service
Connections 29
- Grower → Sign-in: signs in
- Sign-in → MySQL database: checks credentials
login.php - Grower → Live dashboard: views status
- Live dashboard → Session and CSRF: requires session
index.php - Live dashboard → MySQL database: reads status and history
index.php - Live dashboard → Command and expiry helpers: cleans expired controls
index.php - Grower → Control settings: sets mode and devices
- Control settings → Session and CSRF: requires session
steuerung.php - Control settings → MySQL database: updates control state
steuerung.php - Grower → Variety list: manages varieties
- Variety list → MySQL database: reads varieties
pilzsorten.php - Variety editor → MySQL database: saves profiles and phases
pilzsorte_bearbeiten.php - Variety editor → Session and CSRF: uses session safeguards
pilzsorte_bearbeiten.php - Admin creation → MySQL database: creates administrator
admin_anlegen.php - ESP32 → Measurement API: posts readings
api/messung.php - CLI device model → Measurement API: posts simulated readings
tools/esp_dummy.php - CLI device model → API key config: loads API key
tools/esp_dummy.php - Measurement API → API key config: checks API key
api/messung.php - Measurement API → MySQL database: stores readings and retrieves commands
api/messung.php - Measurement API → Command and expiry helpers: expires controls
api/messung.php - Measurement API → Automatic regulation: invokes automatic rules
api/messung.php - Automatic regulation → Command and expiry helpers: queues device commands
includes/regelung.php - Command and expiry helpers → MySQL database: writes command queue
includes/funktionen.php - Measurement API → ESP32: returns queued commands
api/messung.php - ESP simulator → Session and CSRF: requires session
esp_simulator.php - ESP simulator → API key config: uses device key
esp_simulator.php - Live dashboard → Shared navigation: renders navigation
index.php - Variety editor → Shared navigation: renders page shell
pilzsorte_bearbeiten.php - MySQL database → MySQL service: connects to
config/db.php