My heatpump for the heating of my house and water now and then gets an error. This error is not easily noticed (no red light or something). Therefore I made this detector to detect the error and notify me via e-mail, and an notification via the IFTTT and a SMS message to my wife.
This detector is battery powered and switches completely off when the heatpump works normally, utilizing the fail safe relay in the heatpump
Step 1: Design and Procesflow
The module works straight forward:
- If the heatpump works properly, the relay is open and the module is powered off
- If the heatpump is in error mode, the relay is switched to the closed state and the module is powered on and the red LED is on (see next steps)
If you switch the test switch, the relay is bypassed and the module is switched on:
- If the red button (OTA switch) is pressed while manually switching the module on, the module starts up in the OTA mode for updating the firmware Over The Air (OTA), the blue LED is on (later on I changed the red button to a blue button)
- If the yellow button (battery switch) is pressed while manually switching the module on, the module starts up and checks the battery voltage and sends this by e-mail, the green LED is on and blinks if the e-mail was sent succesfully (later on I changed the yellow button to a green button)
Step 2: Actions in the Error Mode
If the heatpump gets in error mode, the module is started and the followinga actions are executed:
- Connect to WiFi (standard function of esp82666)
- Send e-mail (I send the e-mail via SMTP2Go as SMTP server (you need an account at SMTP2Go)
- Connect to IFTTT Webhook (see IFTTT website and the next step)
- Send MQTT message to home automation system (I use Openhab2).
Step 3: IFTTT Webhooks
In this step I explain briefly how IFTTT Webhooks works
Of course you need an IFTTT account.
Attach the Webhooks service and click on settings (see picture)
You need the displayed key in your program credentials to connect your ESP8266 to the IFTTT webhooks.
The event name must be the same as the IFTTT action in your program
Step 4: Building the Module
See the attached schematic and the pictures of the assembled module. I used an ESP-07S because the module is located quite far from my WiFi router and the ESP-07S has a connector for an external WiFi antenna.
- Resistors (10k and 200R)
- LiPo battery (I used 380mA)
- voltage regulator (I used an HT7333)
- capacitors for the voltage regulator
- male headers for programming the ESP-07 module
- screw terminals and wire to connect to the relais in the heatpump
Step 5: The Program
The program was written in the Arduino IDE. See my Github.
The ESP-07S was programmed via a FTDI programmer. See the connections in the picture.
Mount it and cover it.