Computer Related > Home energy monitoring
Thread Author: Kevin Replies: 23

 Home energy monitoring - Kevin

Do you monitor your electricity consumption in realtime?
Last edited by: smokie on Tue 29 Jun 21 at 10:48
 Home energy monitoring - smokie
What do you think I am, some kind of nerd? LOL

Nah, I get the previous day's data at 0800 into a csv file via my Pi using the Octopus API.

You can get stuff which does that I believe (Hildebrand) but tbh the interest for me has waned somewhat, it was just a lockdown project which I found fun.

I do still compare year on year monthly usage cos I can, and keep an eye to try to make sure the heavy loads are in the cheap period, where I can. I think the project has made us all here pretty energy aware.

When I was on the Agile plan, where the rate changes every 30 minutes, the Pi could take care of optimising usage where necessary (e.g. turning the car charger off and on) and turning on the dishwasher for the cheapest t contiguous 2 hours. Agile has become more and more expensive and on quite a few days now it is never cheaper than s regular tariff.
Last edited by: smokie on Tue 29 Jun 21 at 10:48
 Home energy monitoring - Kevin
I put together a little WiFi module that sends consumption data to FHEM on a Pi every 60 secs (configurable) over WiFi. It feeds it into gplot to produce a minute by minute graph of current (amps), instantaneous and cumulative power and power factor. Voltage and frequency can also be measured.

Much more useful than half hourly readings from supplier. I can even identify when lights go on and off in certain rooms, when the TV is switched on and when the fridge/freezer compressor runs for a few minutes every so often.

Cost about £15 in bits.
Last edited by: smokie on Tue 29 Jun 21 at 10:50
 Home energy monitoring - smokie
OK, could be of interest but what would I do with the data though? :-)

Presume it uses a clamp? I've seen similar on the forum.

There is a product which does something like that, and can apparently recognise the "signature" of each device. I forget the name now.

I am recording my next door neighbours consumption too and I correctly guessed when his underfloor heating goes on :-)
Last edited by: smokie on Tue 29 Jun 21 at 10:48
 Home energy monitoring - Kevin
I installed it because our meters were swapped for SMETS II and I didn't 100% trust the readings I was pulling from Octopus. The Octopus readings showed a background consumption which carried on throughout the night and I couldn't explain.
When I installed the monitor I could see a series of spikes every 20 minutes or so followed by 5 minutes of about 100W higher consumption. I didn't realise what it was until I got up one morning and the fridge/freezer alarm was going. The spikes had been caused by the compressor motor trying but failing to start and the thermal cutout tripping. After a few attempts it would eventually start but then died completely. Cue new fridge/freezer and confirmation that the new meters were telling the truth.
I also have a couple of WiFi temp sensors because a post by Mike H got me fascinated when he said that he only has an external sensor for his central heating.

I don't use the data to control anything yet but it has highlighted where we are wasting energy. For example, we now remember to switch the lights off in the kitchen where previously they've been left on until hitting the sack even though no-one is in there. We have outdoor lights each side of the garage plus a porch light that are all on a single dusk to dawn sensor. It switches on and off at 70 lux which means that the lights are on about two hours longer than necessary so I might start controlling some simple things and swap that for a custom made jobby. Might even recover the £5 outlay to do that.

Our biggest waste is the rather basic heating and hot water controls but that needs some thought before I start messing with that.
Last edited by: smokie on Tue 29 Jun 21 at 10:50
 Home energy monitoring - Zero
>> Our biggest waste is the rather basic heating and hot water controls but that needs
>> some thought before I start messing with that.

Just installed Hive here. In retrospect I should have gone Nest.
Last edited by: smokie on Tue 29 Jun 21 at 10:49
 Home energy monitoring - Kevin

What's the advantage of Nest over the Hive?
Last edited by: smokie on Tue 29 Jun 21 at 10:48
 Home energy monitoring - Zero
Hive is simple, the thermostat/programmer is battery so flexible location (range not great with walls in the way) the app(s) ok and integration with Alexa is good.

I have Hot Water, heating, and two radiator valve controlled rooms on Hive.

Nest however has much better internet integration, being able to have weather forecast factored in, it learns, has better geolocation control, control over hot water temp, and can integrate cooling if you have or wish to add the hardware. (nest just has control over plugs.

The control unit however needs a main power source.

In short you can do more with nest.
Last edited by: smokie on Tue 29 Jun 21 at 10:49
 Home energy monitoring - No FM2R
>>I installed it because .........

I'm genuinely impressed, but also seriously regretting my lack of effort in this home tech stuff.

I need to put some effort in.
Last edited by: smokie on Tue 29 Jun 21 at 10:49
 Home energy monitoring - Zero
>> I need to put some effort in.

I think its a tech thats now got beyond the fun tinkering stage, and now needs some planning with spec'ing control system selection, the house subsytems you want controlled, otherwise you end up with a messy selection of disparate system and control.
Last edited by: smokie on Tue 29 Jun 21 at 10:48
 Home energy monitoring - Kevin
>I need to put some effort in.

This is what a recent day's consumption looks like.

The consumption until 3am is the home cinema kit. The short vertical spikes (red - amps, blue - KW) until about 9pm are the coffee machine and kettle (she drinks tea) and the increase after 10pm are the dishwasher. In between there's all the normal background stuff like kit on standby plus fridge/freezer, laptops and lights etc. The new fridge/freezer has a digital inverter motor than runs almost continuously at much reduced power but you can still see it.
Last edited by: smokie on Tue 29 Jun 21 at 10:49
 Home energy monitoring - smokie
Kevin, was it a lot of work doing what you've done? For instance any soldering or programming, or changing anything so much that if I weren't here SWMBO would be stuck? And what program(s) do you run on the Pi? (I have plenty of spare 24x7 capacity).

Maybe we should put a thread in Computer Related.

I might try moving this stuff so if it disappears, look there for it.
Last edited by: smokie on Tue 29 Jun 21 at 10:49
 Home energy monitoring - Kevin
I'll explain what I'm using a little later. Occupied at the mo'.
Last edited by: smokie on Tue 29 Jun 21 at 10:49
 Long Nerdy Post - Kevin
Soldering - yes, but nothing difficult and you might be able to get away without if you can find expansion boards with terminals.

The basic guts of what I'm using is an ESP8266-12E* microcontroller with WiFi capability which I've installed on Vero/project board with a 3.3V LDO regulator, smoothing caps, pullup resistors and terminals to connect to the outside world. They are mounted in cheap (£1.20) IP55 enclosures. Power is from old USB phone chargers that I had lying around. I could have added 240VAC power but I didn't want mains and LV DC in the same enclosure.
Bare ESP12s which I used are the cheapest but I'd recommend NodeMCU versions which cost around £2.50 from China and come pre-soldered to a PCB with regulator, male headers, USB/serial interface and reset/program buttons. £5 from UK suppliers. Best to add another regulator and caps for any attached devices if they pull more than a few mA tho'.

All you need to get it running is a USB cable, a copy of the software and the loading utility.

* ESP8266 is the chip used in Sonoff 802.11 gear.

Programming - possibly, but depends what functionality you want.

I'm running ESPEasy but there are others available.

It has code plugins for lots of different sensors and outputs but the ESPs don't have enough flash storage for all the plugins at once so you need to choose from different binaries that have the collection of plugins you want or compile your own version. The code that handles the power monitor I have is still work-in-progress so I built my own version from a source snapshot. The code is on GitHub and the development environment is Platformio.
Initial loading of the code onto a virgin ESP is via a UART connection so you can either do it straight to a NodeMCU, or use a USB/Serial converter and python utility or Arduino to home-built boards. Once the code is running on the ESP you can upload other versions via WiFi and the web interface.

Pi Software

I use a setup called FHEM on the Pi. I used it because a) It already has modules for just about any home automation gizmo you can think of. b) It runs on cheap hardware. c) It's modular and written in Perl so it would be real easy to make any additions/changes if I needed to.
It's running on a Pi Zero W because I didn't want to spend a lot of cash and it has built-in WiFi. I didn't know how well the ESPs would cope with the router WiFi signal in the garage where the leccy meter is so I also had a backup plan of using the Zero as a bridge/repeater but it wasn't necessary, the ESPs manage fine with only their PCB-etch antenna.

FHEM is fairly easy to get started with and you don't need to know any Perl (tho' it helps).

Ease of Use (SWMBO)

I assume that you aren't expecting Mrs S to go around changing sensors if they fail but with a bit of thought even that could be as easy as changing a light bulb.

As far as FHEM goes, I haven't experimented with it very much. I only really wanted a tool to collect and display data so that I didn't have to write my own. Having said that, the more I get to know it the more I see how flexible it is. The standard interface is HTML with a CLI that shows and allows everything but it looks like you can create custom views for different users. Using it can therefore be as complicated or as simple as you want to make it. One neat little feature is that you can add 3D floorplans of your property and populate it with your sensors and actuators.

I guess what I'm saying is that it's up to you. If the GUI it isn't intuitive and easy to use - it's your fault.
 Another Long Nerdy Post - sherlock47
I have a disparate collection of tech - Sonoff Th10 x3 with mutiple sensors on each, Sonoff DIy switches, Sonoff current monitor = all running Tasmota software, and Zigbee temperture sensors x4 and Zigbee IR sensor, and monitored using Node Red running on a Pi4.

Monitoring Ext temperature, 4 Room Temp, CH flow and return and HW return, HW Tank water at top and mid level Temp.

It does give you a good understanding of what/ when the Potterton boiler is doing. And how long it takes to heat different areas of the house. I would guess that it has allowed me to reduce the ch/hw run times by some factor, but the the change in occupancy over the covid period makes it difficult to to do comparisons. My aim is to add control of a couple of motorised valves that can reflect where in the house is occupied. but other things take focus in the summer.

The lights for major down stairs rooms, stairs and patio / garden are controlled with a mix of Sonoff 3 way light sitches, Sonoff Tasmota DIY switches, and Energenie light switches - all using the native apps , but voice controlled by Alexa.

The use of TeamViewer allows true remote operation / monitoring from any remote phone or compter of all the above.

I have given up educating SWMBO on the use of Alexa and EWelink - all smart light switches can be switched back to manual control in the event of my demise.

lots of fun during lockdowns.
Last edited by: sherlock47 on Tue 29 Jun 21 at 22:14
 Another Long Nerdy Post - smokie
I am using Home Assistant on a dedicated Pi. I have plenty of smart bulbs (LIFX & TP LINK), loads of Sonoff inline switches (incl mini's, usb ones and one with a humidity - or is it temp - sensor), a number of different brands of plugs (mostly Sonoff), a Xiaomi Zigbee gateway , motion sensor and illuminance measurer, some window and door detectors - loads of different stuff, and quite a bit more of it in my drawer too, as I ran out of ideas long before I ran out of hardware!! I even found a regular Sonoff light switch which replaces your ordinary one and needs no neutral but it has a quite large back and was too big for my pattresses.

There is now no longer a need to flash the Sonoff devices with Tasmota in Home Assistant.

The last thing to be Smartified was the car charger on a SONOFF mini (which switches a contactor) so enable me to use Agile when charging, the idea being it would switch the charger on and off for he cheapest x half hours. The drawback is that my current car beeps twice when power is connected, so I had to disable it overnight because it was beeping occasionally during the night. (I've also since done away with Agile).

Google Home is my voice controller of choice and I've put Home Assistant on the phones for remote control.

I've done nothing with heating as I don't think anything I can do would improve what we've got.

My interest may perk up a bit next autumn/winter but for the time being I'm trying to do outdoor stuff - despite the weather!!

I'll read your post more slowly Kevin as it could well be of interest but slightly beyond my skillset. Thanks for writing it up so well.
 Another Long Nerdy Post - Kevin
>I have a disparate collection of tech..

I don't think I'll be going that far. I'm taking a slow approach and just gathering data before I make any decisions.

Then it'll be -

If I make this smart will it make things easier or more comfortable? Will it save money without affecting comfort? Is it a "I must have one of those!" toys?

If I want it smart then I'll investigate what's available off-the-shelf or custom built.

Things I've seen so far that need fixing are -

Outside lights. I could fix them by modding a simple off-the-shelf dusk to dawn sensor but being able to also switch them remotely is a cheap nice-to-have so I'll do that and integrate the patio and garden lights as well.

Our heating controls really do need improving. It easily satisfies the comfort and money aspects so that is what I'll be looking at next (half a dozen DS18B20s on order). Our existing programmer is a 5+2 day 2-periods/day unit coupled with room and HW stats plus TRVs. It simply isn't flexible enough to suit our retired lifestyle now.
 Another Long Nerdy Post - Falkirk Bairn
Never knew about half of what is discussed above -

Apart from changing light bulbs when they fail my limits are sending off meter readings 1 x per month.

The bulk of my electricity usage are fridge, freezer, cooker - the electronics use precious little
 Another Long Nerdy Post - smokie
fwiw my average since switching tariffs on 29 June is just over 10kWh a day, at a VAT inclusive cost of 10.49p per unit. That includes a bit of car charging which always take the average up.

On the other side I had a free run of the dishwasher the other afternoon when all power was provided by the solar panels (of which I don't have many!)
 Free Electric 1hr per month - Kevin
>On the other side I had a free run of the dishwasher the other afternoon


I know you are with Octopus so -

Free electric for 1 hr per month. They will email you in advance to let you know when the free hour is scheduled. Fire up the dishwasher, washing machine and car charging point for free. Maybe steal a load of car batteries and an inverter?
Last edited by: Kevin on Mon 30 Aug 21 at 10:41
 Free Electric 1hr per month - smokie
How exciting, thanks!! :-)
 Free Electric 1hr per month - smokie
Just out of interest, my potentially most expensive hour since being with Octopus was on 5 July last year from 14:30 to 15:30 when I used just over 9kWh.

On the normal tariff at that time that would have cost me about £1.25, but at the time I was on the Agile time-of-use tariff and it was a major plunge, so they actually paid me 31p (wow!!) for using that much.

I had the car on charge, ran all the appliances, boiled the kettle a number of times and that was what I maxed out at. I didn't put a heater on in the garden though. Massive waste of power but there was overgeneration at the time so it was going to waste anyway, and I believe it was cheaper for Octopus if it were used than if it were not, though I can't recall that logic. :-)

Last night I while I was charging the car the cost was about 20p an hour (Go tariff) so I won't be getting too rich.
 Free Electric 1hr per month - Robin O'Reliant
>> I know you are with Octopus so -
>> Free electric for 1 hr per month.

I'm with Octopus too and they're installing a smart meter on 7th September. That's handy to know.
Last edited by: VxFan on Tue 31 Aug 21 at 03:09
 Home energy monitoring - MD
>> Cost about £15 in bits.

Crikey What a guy. Now, 'ave yer got any old old iron you wanna flog :-)
Last edited by: VxFan on Mon 5 Jul 21 at 02:51
Latest Forum Posts