Introduction: Heatpump Error Detection and Alarm ESP8266, Openhab, Telegram, Battery Powered MQTT

About: I like to combine electronics like Arduino's, ESP8266 etc with 3D designing and 3D printing.

My heatpump for the heating of my house and water now and then gets an error. This error is not easily noticed, since there is no red light or something, only a small 'P' on a small LCD screen. Therefore I made this detector to detect the error and notify me via Openhab, Telegram and e-mail.

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)

Manual modes

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)

- Send MQTT message to home automation system (I use Openhab2). From Openhab2 a telegram message is sent, see this website how the Openhab Telegram action works.

Step 3: 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.

Parts:

- ESP-07S

- Resistors (10k and 200R)

- buttons

- switches

- LiPo battery (I used 380mA)

- voltage regulator (I used an HT7333)

- capacitors for the voltage regulator

- LEDs

- male headers for programming the ESP-07 module

- screw terminals and wire to connect to the relais in the heatpump

Step 4: 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.

Step 5: Mount It

Mount it and cover it.