ESP8266 Gas Boiler Controls over thermostat wiring via smartphone (blynk app), web (api), physical button.
This is C++ code to run on ESP8266 (platformio IDE used) as simple control unit to switch on/off generic gas boiler via thermostat wiring.
In order to use this code u must have some basic skills in electronic's field. If you dont - stop. There is risk of getting shocked or damaging gas boiler.
Most of Gas Boilers on the market can be controlled via thermostat wiring (2 wires). The idea is dead simple:
- Wires shorted - gas boiler works.
- Wires arent connected - gas boiler stops.
In case u have double-pressure boiler as I do, second heating circuit for waterflow is not affected by thermostat wiring.
Thermostat wiring itself does not control the maximum temperature u getting off your gas boiler. It will heat the water, until threshold is reached. Water temperature threshold is set directly on a gas boiler.
Thermostat devices collect air temperature and turn on/off gas bolier pereodically to maintain desired temperature. This unit itself does not implement such logic, since I will be collecting air temperature metric from another ESP8266 device.
You will need following parts to get it working
- ESP8266 board
- Resistors 100 Ohm, 1 KOhm.
- Optocoupler 817c or similiar.
- Led diod
- Non-fixed push button (You cant use fixed buttons and have device controlled)
- Copy credentials_sample.h to credentials.h, define constants, accroding to your enviroment
- config.h has some optional setting, feel free to edit as you wish
- Upload FW to esp8266, make sure it's reachable over WEB
- Do the wiring according to scheme below
- Setup your blynk app (defaults State LED - Virtual Pin 0, Button - Virtual Pin 1)
Request | Description |
---|---|
/api/boiler/on |
Turns ON Gas Boiler |
/api/boiler/off |
Turns OFF Gas Boiler |
/api/boiler/invert |
Inverts previous state, ON-OFF or OFF-ON |
/api/boiler/status |
Gets current state |
Typical JSON response is
{
"state": true
}
Feel free to discuss and contribute.
- Konstantin Odnoralov - Initial work -
This project is licensed under the MIT License.