Troubleshooting
⚠️ WARNING: The troubleshooting steps below may involve working with 230V AC mains voltage (relay testing, pump wiring). Always disconnect power before working on the circuit. If unsure, hire a qualified electrician.
Quick Reference Matrix
| Symptom | Cause | Solution |
|---|---|---|
| -127 °C temperature reading | DS18B20 not detected | Check 4.7 kΩ pull-up resistor, wiring, and solder joints |
| HA finds no device | MQTT Discovery payload not published | Verify mqtt-protocol = "homeassistant", check MQTT broker connectivity, use MQTT Explorer |
| Relay behavior inverted | Active-low module configured as active-high (or vice versa) | Set relay-invert = true or false in Configuration → Advanced |
| Safe Mode active | Boot-loop detected (4 consecutive short boots < 5 min) | Check serial log for crash reason, fix issue, reboot |
| OTA update fails | TLS issue or insufficient flash space | Use USB flashing fallback, check free space on device |
| Web UI not loading | ESP32 not on network or wrong IP | Check router DHCP list, verify WiFi connection, try pool-controller.local |
| MQTT connection refused | Wrong credentials or broker unreachable | Verify broker IP, port, username/password in MQTT settings |
| Temperature reads 85 °C | DS18B20 parasitic power issue | Add external 3.3V supply to sensor VCC pin |
| Relay not clicking | GPIO pin damaged or relay module not powered | Verify relay VCC/GND, check GPIO voltage with multimeter |
| ESP32 keeps rebooting | Power supply insufficient or watchdog timeout | Use >1A power supply, check serial log for panic messages |
| WiFi scan finds nothing | ESP32 antenna issue or interference | Move device closer to router, check antenna connection |
| mDNS not resolving | Network doesn’t support mDNS | Use IP address directly, install mDNS reflector |
| Sensor readings fluctuating | Loose connection or interference | Check wiring, add shielded cable, verify pull-up resistor |
| Configuration lost after reboot | NVS corruption or config not saved | Re-save configuration, try factory reset if persistent |
Detailed Diagnosis
1. Temperature Sensor Issues
Symptom: Sensor reads -127 °C
This is the DallasTemperature library default when no sensor is found on the OneWire bus.
Checklist:
- Verify the 4.7 kΩ pull-up resistor between DATA and 3.3V
- Check wiring: VCC (red) → 3.3V, GND (black) → GND, DATA (yellow/white) → GPIO
- Swap the sensor to a known-working GPIO pin
- Test with a known-working DS18B20
- Measure voltage on DATA pin: should be ~3.3V idle, pulses during communication
Symptom: Sensor reads 85 °C
This indicates the DS18B20 is in parasitic power mode but not getting enough power.
Solution: Connect VCC pin (red) to 3.3V instead of relying on parasitic power.
2. MQTT / Home Assistant Issues
Symptom: Home Assistant doesn’t discover the controller
Checklist:
- Verify MQTT broker is running:
mosquitto_sub -h <broker> -t "#" -v - Check controller MQTT settings via web UI (MQTT Settings tab)
- Test with MQTT Explorer:
- Subscribe to
pool-controller/# - Look for discovery topics:
homeassistant/sensor/pool-controller-*/config
- Subscribe to
- Restart the MQTT broker
- Reboot the controller
Symptom: Entities show as “unavailable”
- Check MQTT connection status in controller web UI
- Verify the broker is reachable from both controller and HA
- Restart HA MQTT integration
3. Relay Issues
Symptom: Relay clicks but pump doesn’t run
- Check COM/NO wiring — pump should be on the NO (normally open) terminal
- Verify mains voltage at relay input
- Check pump connection and fuse
Symptom: Relay doesn’t click
- Measure GPIO voltage — should toggle between HIGH and LOW
- Verify relay module VCC (5V) and GND connections
- Test relay module independently with 5V between IN and GND
4. Boot and Stability Issues
Symptom: Safe Mode activated
The controller enters Safe Mode after 4 consecutive boots that last less than 5 minutes each. All relays are forced OFF.
Recovery:
- Connect serial monitor:
pio device monitor --baud 115200 - Read the boot log — look for panic messages, asserts, or exceptions
- Common causes:
- Stack overflow in a task
- NULL pointer dereference
- Heap exhaustion
- Corrupt configuration
- Fix the issue and reboot
- The boot counter resets after a successful 5+ minute run
Symptom: Random reboots every few hours
- Check
free_heap_spacesensor — should be above 20 KB - Verify power supply (minimum 1A)
- Check for WiFi disconnection/reconnection loops
- Monitor serial output for crash messages
5. OTA Update Issues
Symptom: OTA fails with TLS error
- The web interface uses HTTPS for OTA — TLS handshake may fail on some networks
- Ensure the ESP32 has enough free heap (check dashboard)
- Try a smaller firmware binary
Workaround: Flash via USB:
pio run --target upload --upload-port /dev/ttyUSB0Symptom: OTA uploads but device doesn’t boot
- The new firmware may be corrupted or incompatible
- Flash a known-good version via USB
- Check partition table size
Diagnostic Tools
Serial Monitor
pio device monitor --port /dev/ttyUSB0 --baud 115200Useful for: boot logs, crash dumps, MQTT connection status.
MQTT Explorer
Install MQTT Explorer or use CLI:
mosquitto_sub -h <broker> -t "pool-controller/#" -vUseful for: verifying MQTT Discovery payloads, checking telemetry data.
Web UI Dashboard
Access via http://<device-ip> — shows live status, temperatures, heap, RSSI.
Network Scan
# Find the controller on your network
nmap -sn 192.168.1.0/24
# Or use your router's DHCP client listGetting Help
If the troubleshooting steps above don’t resolve your issue:
- Search the existing issues
- Check the discussions
- Include the following information in your report:
- Firmware version (from web UI or serial log)
- Hardware variant (Basic, NORVI AE01-R, Custom)
- ESP32 board type
- MQTT broker and version
- Home Assistant version (if applicable)
- Serial monitor output (if available)
Related Documents
- Build from Zero — Complete build guide
- MQTT Configuration — MQTT setup details
- Electrical Safety — Safety information
- Home Assistant Integration — HA setup guide