ESP32 board and relays
The board
Section titled “The board”AquasManager generates ESPHome firmware for an ESP32 DevKit-style board (esp32dev), the most
common one: an ESP32-WROOM-32 on a development board with a USB port.
- The controller connects to the Wi-Fi and MQTT broker defined in the server configuration, with a
fixed IP taken from the range
AQUAS_NETWORK__STARTtoAQUAS_NETWORK__END.
Preparing a new board
Section titled “Preparing a new board”AquasManager flashes controllers over the network (OTA). A new board must therefore first receive, over USB, a basic ESPHome firmware with Wi-Fi and OTA updates enabled:
- connect the ESP32 to a computer over USB;
- install a minimal ESPHome firmware with ESPHome Web (Chrome or Edge
browser) or the
esphomecommand-line tool; - once the board is on Wi-Fi, note its IP address and declare it in AquasManager.
All later updates are done from the interface, cable-free.
Reserved pins
Section titled “Reserved pins”| Use | Pins |
|---|---|
| I²C bus (expansion modules, RTC clock) | SDA = GPIO21, SCL = GPIO22 |
| 1-Wire bus (temperature probes) | your choice, GPIO4 by default |
Avoid the boot pins (GPIO0, 2, 12, 15) and the input-only pins (GPIO34 to 39) for driving a relay.
Relays
Section titled “Relays”Each piece of equipment is switched by a relay. In AquasManager, set for each relay:
- its type (active-high or active-low trigger, depending on the relay board);
- the contact used: NO (normally open, the device is off at rest) or NC (normally closed, the device is on at rest).
AquasManager combines both so that “on” in the interface really means “on” at the socket.
To add relays beyond the available pins, use a PCF8574 or PCF8575 expander: see Modules and RTC clock.
