Software for the 4 channel relay controller and 8 channel DS18B20 sensor reader provided by 3DStar.ro
- simple or secure MQTT connection, Let's Ecrypt CA cetificate already loaded
- topic structure for multiple buildings (locations) control:
location/device_espid/+
- main and backup WiFi connections
- secured, no access point is presented in case both WiFi connections are unavailable
- after the initial configuration, web access can be disabled, module uses just pure MQTT
- extra information on device status topic: type, ID, supply voltage, AP SSID, AP RSSI, AP mac
Roll your own or get one from 3DStar shop in PCB, kit (PCB + components), SMD kit (PCB with soldered SMD components + bags of through hole components) or fully assembled form.
The ESP-01 / ESP-01S from AI Thinker is used to control one PCA9536D 4bit IO expander. On each channel there is a relay that can be used to control heating equipment (boilers, pumps, valves, etc.).
8 connectors are provided for directly attaching 1-Wire DS18B20 temperature sensors. Their number is not limited and by using splitter cables more than 8 can be attached.
- there are 2 methods:
- download, edit config.h, build & upload
- download binary and upload For building the sources PlatformIO is recommended for automatic library management.
-
mqtt topic:
LOC/TIP/NAME_ESPid
where LOC, TIP and NAME are user defined and ESPid is the HEX representation of your ESP mac address' last 3 bytes. What follows are possible suffixes and must be appended to the above mqtt topic. -
command topic:
/cmnd/...
-
save
: save current configuration to LittleFS -
update
: perform OTA update -
reset
: restart ESP device -
format
: format LittleFS space -
list
: list current LittleFS stored config.json to Serial @ 115200bps. Other than this serial is not used at all. -
config
: change device configuration. Due to MQTT message length restrictions do not send json messages longer than 256 bytes. Get examples from config.json in data folder. You can send any part at any time. Remember to send save command after you are satisfied with the configuration. -
/rX
: relay control. X is the relay number. Payload can be 0 = OFF, 1 = ON.
-
-
relay status topic:
/relay/X
where X is the relay number. Payload will be 0 for OFF and 1 for ON. It is updated by the ESP after processing commands, statuses are sent with retain flag. -
sensorss topic:
/temp
, a json message is sent continaing the unique codes and temperature of all found DS18B20 sensors. -
status topic:
/stat
where the ESP sends periodic updates (heartbeat) with type, ID, supply voltage, SSID, RSSI, BSSID (AP mac) Example:{"Type":"thermostat","ID":"abcdef","Vin":3.31,"SSID":"WIFI","RSSI":-29,"BSSID":"D8:50:E6:XX:XX:XX"}
-
will topic:
/will
Payload is 1 when device is ON and 0 when powered OFF