So soon it will be cheaper to burn vegetable oil to heat your home, I got another letter about the electric going up another 29% bring it to around 37p / kwh. Gas has gone up twice already, first by 27%, then by 41% and is likely to go up again before December.
I have my automated heating system, the tldr version. Multizone, individual room sensors and rad valves in 3 zones + 1 unzoned. Scheduled and presense aware targets. Humidity awareness.
I have been implementing "smarts" to make the heating more efficient. I'm still looking for more ways.
Step ONE. I need data. I have data on electrical usage, but not gas. I need to read the gas meter. I need to run an idea, monitor the temps, runtime AND gas usage to accurate emperically measure if a particular control or dynamics feature actually lowers or increases gas usage.
The meter is a Honeywell bk-g4m which I am told (need to check) has a metal disk on the number 0 of the least significant digit. This is designed to close a read switch for automated readers. A quick google and it looks like the only use case in the profession for such readers is so bespoke and rare, it's hard to find them, a lot of "speak to your installer" lines.
So DIY.
Two aspects need addressed first. SAFETY and LEGALITIES.
On safety, the advice is to not have any of your electronics inside (or within 150mm) or your gas meter with the only exclusion being the reed switch. The reed switch needs to operate as a voltage/current which will not form a spark with enough energy to ignite any trapped gas.
On legalities, the meter is considered "Utility operator equipment", it's not mine. I am forbidden by law from tampering with it, carrying prison time in some cases.
So, what ever I do, it needs to not upset those two things. If it's not "legally" tampering, but the guy who comes to read the meter (it's outside) feels it's a safety issue, he will report it and I'll at least get my gas shut off and join the queue for an inspection and reconnection, which is standard policy for gas supply here. If in doubt, send out a 19 year old on minimum wage to pull the capping seal (it's an odd collar around the inlet pipe, if you break the seal and pull it off, it isolates supply. Then send out the qualified engineer a few days later to check it out and reconnect it. I'm sure I'd end up paying for both visits, circa £200 and that's IF they don't raise a criminal charge of tampering.
So the safest way is to run 2 wires to the magnetic reed switch, at 3.3V. Those wires run through a gap in the meter box door (it's vented, not sealed) and into a lunch box place outside. In the lunch box is the gubbins.
The concept would be a halted ESP8266 with it's wake pin attached via a current limiting resistor to the reed switch and 3.3V. I have to check if the wake pin is HiZ or not.
Once awoken, the software logs a "tick", checks the last time of transmission and if 1 hour has past, switch on the Wifi and transactional send the last hours tick times. (Tick times will be a negative delta in seconds so the ESP does not need to know clock time).
The rest is just server side software to convert the negative delta T's to actual timestamps and push it to a time series DB for analysis.
Wifi is expensive and I can't justifiably run power to this location. However, I was hoping with a few 18650s in parallel, waking on the pulse to only log a tick in memory (or EPROM) and shutdown again. That consumes about 30mA for a few milliseconds. Wifi connection and a REST request/response on a good day will take 5 seconds, longer on bad days if the first attempt fails. With the radio active it consumes about 70mA.
I've not run the sums, but if I can get it close to a month or more I'd be happy.
Any thoughts? Perils to avoid?
How realistic is running an MCU like this without a solar panel on battery for a month?