An ESP8266 logs an oil heater’s pump runtime without a second microcontroller

ESP8266, heating, data logging

This is the read-only HTML version. For the full Visual Space experience, open the app.

ESP8266, relay, smartmeter — I

ESP8266, relay, smartmeter — I

Source: simple native ESP8266 Smartmeter on Hackaday.io · Thomas

IoT, energy monitoring

Thomas’s 2014 smartmeter project puts timing and Wi-Fi reporting on the ESP8266 itself. A relay signals when the heater’s oil pump runs, while a web dashboard pairs runtime with weather data—a useful proxy for heating demand, with some important sampling limits.

👏 1

An oil heater’s pump already provides a useful signal: when it runs, and for how long. Thomas’s simple native ESP8266 Smartmeter on Hackaday.io turns that signal into a web log, with the ESP8266 handling both measurement and networking. Created on October 27, 2014, the project reflects a deliberately small hardware footprint: Thomas explained in the comments that he wanted only a breakout board and a relay in the basement, rather than several separate components.

One chip times the pump and reports the result

Thomas modified the ESP8266 firmware with two additional AT commands: one starts measurement, and the other stops it. Once enabled, the logger polls a GPIO configured with a pull-up. A relay associated with the heater’s oil pump pulls the input low while the pump is running.

The firmware measures that low interval. When the input returns high, it sends the elapsed time to a webserver using an HTTP GET request, carrying the value in the URL. The server stores the reading, and a web page displays the accumulated data using Google’s visualization tools and AJAX. The listed server stack is PHP and MySQL.

The important architectural choice is that the ESP8266 is the application controller, not just a Wi-Fi modem. There’s no separate microcontroller needed to watch the input, time the event and tell the radio what to transmit. Thomas also made the AT-command responses more explanatory, so an incorrectly entered command could report what went wrong.

The component list includes a 230 V relay. That makes the heater interface a mains-related part of the build, not an ordinary low-voltage sensor connection; this overview isn’t a wiring guide or evidence of a certified installation.

Runtime is a proxy, not a direct fuel reading

What the device measures directly is pump operating time—not oil volume or delivered heat. That distinction matters when interpreting its “smartmeter” label. The log can reveal changes in heater activity, but treating those intervals as fuel consumption would require a justified relationship between runtime and fuel flow.

Thomas added weather information from OpenWeatherMap to investigate how heater activity related to outdoor temperature. In the February 12, 2015 update, he reported that wind speed was now logged and displayed too. His reasoning was that increased consumption during windy conditions might point toward shortcomings around windows, doors or the roof. That’s a hypothesis to investigate, rather than a diagnosis the logger can make on its own.

There’s also a sampling wrinkle Thomas explicitly acknowledged: temperature was recorded only when an event occurred. An average of those readings is therefore not necessarily a daily average—it gives more representation to times when the heater produces events. He considered that adequate for spotting tendencies, while noting that it could be improved.

The unfinished details affect unattended use

The project description lists two firmware limitations. Input monitoring used polling because Thomas hadn’t managed to get interrupts working. Logger configuration was also lost after a reset, with flash storage still on the to-do list.

In the November 20, 2014 configuration update, Thomas linked a workaround for people who wanted automatic setup without an initial AT-command exchange. He also said he hadn’t resolved flash-writing attempts that caused the chip to reboot. That update shouldn’t be mistaken for a completed persistent-configuration feature.

Thomas supplied links to the firmware source and web application files. He described the automatic connection and reporting functions as a starting point for other loggers, including periodic sensor measurements. Those were extension ideas, not demonstrated temperature-sensor hardware in this build. The latest supplied update is the February 2015 wind-speed addition; further work was mentioned as planned.

The lasting lesson is as much about measurement as hardware: a single networked chip can turn an existing on/off signal into a useful record, but the event that triggers logging also shapes what the data can tell you. For a follow-on version, fixed-interval weather sampling alongside pump events would be a useful way to separate the conditions outside from the heater’s response to them.

Source: simple native ESP8266 Smartmeter

Internet Of Things

2 Followers

Connect useful things with clear purpose. Explore sensors, embedded devices, networks and automation; share projects, troubleshoot integrations, and compare approaches to reliability, power use, security and maintaining connected systems.

Visual Space is built for projects like this—where creators collaborate, organize goals, and grow communities around real work.