ESP32-based automation for chicken coop management: temperature monitoring, freeze prevention, pump control, lighting automation, WiFi management, and a SolidJS web UI for configuration and status.
- Automated pump control with freeze prevention, hysteresis, and flow monitoring
- Dual-purpose sensor inputs (Dallas temp or water meter) with auto-detection
- Smooth PWM lighting control with manual and scheduled modes
- Async web server with OTA updates, logs, and real-time status dashboard
- All settings stored in LittleFS and configurable via web UI
- Install Python3 and pip Python.org.
- Install Node.js and npm Node.js.
- Install PlatformIO and dependencies (see below).
- Install PlatformIO (VSCode extension recommended).
- Or install PlatformIO Core via pip:
pip install platformio. - Or use
wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -O /tmp/platformio.py && chmod +x /tmp/platformio.py && python /tmp/platformio.py(Linux/Mac). - Or follow PlatformIO Core installation instructions.
source ~/.platformio/penv/bin/activate(Linux/Mac) or~\.platformio\penv\Scripts\activate(Windows) to activate the PlatformIO virtual environment.- You may want to add pio to path (
export PATH="$HOME/.platformio/penv/bin:$PATH"on Linux/Mac or add to Environment Variables on Windows).6.pip install -r build_scripts/requirements.txtto install build script dependencies.
- Flash firmware and filesystem (web tool or PlatformIO Upload Filesystem Image:
pio run -t upload; pio run -t uploadfs) or flash merged release firmware image:python $HOME/.platformio/packages/tool-esptoolpy/esptool.py --chip esp32 --port COM22 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x0000 .pio/build/esp32-release/firmware_merged.bin(adjust COM port and paths as needed). - Connect to the temporary WiFi AP
CoopController(password if defined in platformio.ini). - Open http://192.168.4.1 or http://coopcontroller.local to load the UI, enter your WiFi SSID/password, and save settings.
- After restart, access the device at http://coopcontroller.local on your network.
cd web && npm inpm run devto run with the mock API server.- Building the filesystem in Platformio automatically builds the web UI and includes it in the filesystem image.
- Full project guide and hardware/feature details: Agents and architecture notes in Agents.md
- PlatformIO configuration and pin definitions: platformio.ini
