# How to reduce peak consumption (hems)

**URL:** <https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148>\
**Category:** General\
**Created:** [1 November 2020 08:13 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148 "2020-11-01T08:13:43Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [2 November 2020 22:02 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/41 "2020-11-02T22:02:41Z")

</div>

> [@hominidae](#):
>
> not only have a power level, but rather a power signature

Good tip! Indeed the cycle is important. Thanks!  
Not 100% sure yet what I have to consider the best power cost. But I need some kind of number, so Node-RED can decide which devices can be turned on simulateneously.  
But perhaps it its better if Node-RED was able to combine the power signatures (graphs) instead of a single number. Because a cycle of a device can take a long time, so a single number might not be very useful ...

> [@TotallyInformation](#):
>
> > [@BartButenaers](#):
> >
> > I would like to discuss HOW I can do it
> 
> Somewhat extreme

Julian, should have been clearer. I mean HOW I can reduce my peaks in general. I have already given up on the washing machine 😉 That will be wife-driven instead of Node-RED-driven ...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 November 2020 22:05 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/42 "2020-11-02T22:05:01Z")

</div>

> [@BartButenaers](#):
>
> > [@TotallyInformation](#):
> >
> > Somewhat extreme
> 
> Julian, should have been clearer. I mean HOW I can reduce my peaks in general. I have already given up on the washing machine 😉 That will be wife-driven instead of Node-RED-driven ...

Doh! I still like the idea of adding a robotic interface to things though! 🧙

---

<div class="post-metadata">

**Author:** ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)\
**Post date:** [2 November 2020 22:09 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/43 "2020-11-02T22:09:37Z")

</div>

> [@BartButenaers](#):
>
> But perhaps it its better if Node-RED was able to combine the power signatures (graphs) instead of a single number. Because a cycle of a device can take a long time, so a single number might not be very useful ...

Yes, this is how the EV-Charging Algo in our Wallbox works, by measuring the access energy. The 2-Way-Meter is doing the add-up internally though. But one could record the graph for each device - even later identify it, should it be switched on outside schedule/manually - and add all graphs up to get a combined signature.  
Adding complexity: the graph for a washing machine will be dependent on program and temps of water-intake, so it will be different (longer in time or more power to heat) depending on season/climate

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [2 November 2020 22:17 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/44 "2020-11-02T22:17:41Z")

</div>

The core to the leveling, is what you call the classic 'salesman' problem. If you are not familiar with this concept, it is core to basic statistically analysis. And I would think would be the core of any logic (we) develop over the discussion of same. [https://en.wikipedia.org/wiki/Travelling\_salesman\_problem](https://en.wikipedia.org/wiki/Travelling_salesman_problem). In our case we want the 'route' to the least expensive result, given the tasks required at the point of analysis. There are literally 100s of examples of the classic salesman methodology as computational logic coding.

We just use the 'device' cost estimate or value, and establish the devices required to be used for any give time frame, and the classic salesman method will find the 'most' efficient result.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [2 November 2020 22:18 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/45 "2020-11-02T22:18:51Z")

</div>

Yep this is where it gets hard - length of cycles of devices. We have managed this in a somewhat arbitrary way - the dishwasher, washing machine and clothes dryer are all put on the 'intense" /longest cycle by default - so with this i am "budgetting" for the worst case power consumption.\

We then assing a priority to the devices - it is most urgent to get the dishwasher done every day - so it has the priority timeslot from 9AM (after breakfast) each day - it has a long cycle but quite low overall power draw with a few peaks when it is heating air to dry etc

By using the solcast api stuff i am able to predict pretty closely when we will have excess etc - your trade off will be (especially when you have this highest peak consumption model) do you leave excess power available to allow a kettle to be boiled (for example ??) - this is the scenario where a small battery for managing self consumption peaks makes a lot of sense (solar permitting of course).

Craig

---

<div class="post-metadata">

**Author:** ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)\
**Post date:** [2 November 2020 22:19 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/46 "2020-11-02T22:19:13Z")

</div>

...time for an AI-node then 🙂

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [2 November 2020 22:23 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/47 "2020-11-02T22:23:39Z")

</div>

Actually ... LOL... no. We use the salesman modeling as the core logic, and use a learning machine model, to watch the salesman optimizations. This makes the brute force tabulation of least cost, simplistic. We can run salesman logic for weeks or months, establishing trending, then let the learning engine take past data as a starting point. This how AIs are trained all the time. For example, teach AI to see a cat, you gather 10,000 cat pictures, and show them to the AI, the AI is primed via such. Takes a fraction of the time, to otherwise let an AI learn from scratch.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [3 November 2020 06:39 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/48 "2020-11-03T06:39:49Z")

</div>

Morning guys,  
Time for a summary...  
I need to have for each device the following data in Node-RED:

- The priority
- The power signature(s) for every cycle it supports

Beside that Node-RED needs to know the maximum allowed peak, and some margins (to make sure the devices don't overlap to much and risk again peaks due unexpected extra consumption).

Then all that data needs to feed into some kind of energy scheduler, which calculates when every device should run:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/8/a81e566279f6b6b0fb8fe76027a2ceeca519390c.png)

And this needs to be rescheduled live as soon as some device is manually switched on.

Conclusion: undoable to develop such a node for fun in some spare hours in the evening.

So the obvious _ **next question** _ is: are there any existing open-source projects, affordable software, affordable devices that can do this kind of stuff? Have been looking last night, but couldn't find anything useful. But perhaps looking for wrong keywords ...

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [3 November 2020 09:22 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/49 "2020-11-03T09:22:40Z")

</div>

Bart, have you heard of NILM? Might be interesting for your project.

> **[Nonintrusive load monitoring](https://en.wikipedia.org/wiki/Nonintrusive_load_monitoring)**
>
> Nonintrusive load monitoring (NILM), or nonintrusive appliance load monitoring (NIALM), is a process for analyzing changes in the voltage and current going into a house and deducing what appliances are used in the house as well as their individual energy consumption. Electric meters with NILM technology are used by utility companies to survey the specific uses of electric power in different homes. NILM is considered a low-cost alternative to attaching individual monitors on each appliance. It No...

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [3 November 2020 11:12 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/50 "2020-11-03T11:12:29Z")

</div>

Sorry - this might be a little bit off topic...

I'm using a PZEM-004T to monitor and report voltage/current/wattage and power-factor. My sensor is located on the main consumer panel, but I don't see any problem (apart from the cost) in using a number of these sensors **[Edit] clamped around the live wire** of key appliances.

 ![Screen Shot 11-03-20 at 09.23 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/ca8bf5bd836afd90be2ee02c49f945a205fa2599.jpeg)

> [@Need to write one function that will return 3 values](https://discourse.nodered.org/t/need-to-write-one-function-that-will-return-3-values/30931/10):
>
> Here's a screen-shot of my simple dashboard. I'm using a PZEM-04 module with a split-ring current transformer feeding into a Wemos D1 Mini flashed with Tasmota that transmits to Node-RED via MQTT (very similar to your system). Here's a screen-shot of the NR flow. And here's the flow-code that uses a dynamic band changer for the Power-gauge. [{"id":"47ec6f8.e8c9b9","type":"ui\_gauge","z":"f0f0fcca.cf3ac8","name":"","group":"900b126f.c721c8","order":2,"width"…

Since publishing the above posting, I've implemented a dynamic band changer for the 'current' gauge.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [3 November 2020 11:20 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/51 "2020-11-03T11:20:00Z")

</div>

> [@ghayne](#):
>
> have you heard of NILM

Hi Garry,  
Indeed last night all my search criteria eventually lead me to NILM... But I have no brains/time enough to implement this myself. Had hoped that somebody knew a project or device implementing this...

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [3 November 2020 11:28 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/52 "2020-11-03T11:28:29Z")

</div>

I found nothing promising doing a quick search. I have started visually analysing our devices as I have a MQTT feed from our IHD/CAD manufacturer that gives instantaneous power readings from our smart meter every 12 seconds, whether I can develop a method for discriminating individual devices is something else! If I make progress I will post here.

 ![Screenshot-11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/799bb94d73786f453d41fe66cbc71de260cbb60a.png)

---

<div class="post-metadata">

**Author:** ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)\
**Post date:** [3 November 2020 14:19 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/53 "2020-11-03T14:19:17Z")

</div>

> [@BartButenaers](#):
>
> So the obvious _ **next question** _ is: are there any existing open-source projects, affordable software, affordable devices that can do this kind of stuff? Have been looking last night, but couldn't find anything useful. But perhaps looking for wrong keywords ...

...the one solution, coming near what has been described here, is maybe this one, from sense: [Product – Sense.com](https://sense.com/product/)  
It will learn the signature and you can combine rules/alerts and such with smart plugs and switches.  
Edit: see also: [Integrations – Sense.com](https://sense.com/integrations/) and [Sense Labs – Sense.com](https://sense.com/labs/)  
Maybe the route via IFTT is an appropriate entrypoint for expanding on the signatures.gathered and create rules and schedules

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [3 November 2020 16:15 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/54 "2020-11-03T16:15:32Z")

</div>

> [@BartButenaers](#):
>
> So the obvious _ **next question** _ is: are there any existing open-source projects, affordable software, affordable devices that can do this kind of stuff?

Perhaps [emoncms,](https://emoncms.org/) at least partly ?

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [3 November 2020 21:07 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/55 "2020-11-03T21:07:44Z")

</div>

> [@hominidae](#):
>
> It will learn the signature

Thanks for the pointer! I can indeed see [here](https://blog.sense.com/articles/how-does-sense-detect-my-devices/) that they detect the signature, but I don't see how you can use that to schedule your devices. Have you found that somewhere?

> [@Andrei](#):
>
> Perhaps [emoncms,](https://emoncms.org/) at least partly ?

Andrei,  
if that could do the job, it would be very useful since there is already a Node-RED [node](https://flows.nodered.org/node/node-red-node-emoncms) available. And they even have a Node-RED [guide](https://guide.openenergymonitor.org/integrations/nodered/) on their site. But to be honest I don't see much about power signatures or a [scheduler](https://openenergymonitor.org/forum-archive/node/10019.html). Seems to me more like follow-up of power consumption only, and no scheduling?

---

<div class="post-metadata">

**Author:** ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)\
**Post date:** [3 November 2020 22:05 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/56 "2020-11-03T22:05:09Z")

</div>

> [@BartButenaers](#):
>
> Thanks for the pointer! I can indeed see [here](https://blog.sense.com/articles/how-does-sense-detect-my-devices/) that they detect the signature, but I don't see how you can use that to schedule your devices. Have you found that somewhere?

...not yet...there is also an active community [https://community.sense.com/](https://community.sense.com/) but I tend to believe, that sense does not have an option for actively control something.  
Here is another one, which seems to have an option for controlling "things": [Use cases - Smappee](https://www.smappee.com/use-cases/)  
Edit: ..and here's the product brief: [Infinity - Smart metering by Smappee](https://www.smappee.com/infinity/)

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [3 November 2020 23:24 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/57 "2020-11-03T23:24:23Z")

</div>

Hate to say it... but to do this 'right' something you will be happy with long-term? I still suggest you create this incrementally and from scratch. Hence, why I suggested the salesman methodology. 🙂 But I do acknowledge my bias as well.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [4 November 2020 06:17 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/58 "2020-11-04T06:17:17Z")

</div>

> [@Nodi.Rubrum](#):
>
> incrementally and from scratch

Of course, as soon as I get some time in the near future, I will need to start measuring a single device and so on. But at least I need to know my end goal, in thus case an affordable scheduler.  
Still hopibg that someone has the golden tip.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [4 November 2020 12:46 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/59 "2020-11-04T12:46:00Z")

</div>

Yup, until you have data trending, the scheduler is not urgent. Moreover, my hunch is, the data trending might even suggest a few ideas or options we have not theorized as yet.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 November 2020 16:28 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148/60 "2020-11-04T16:28:38Z")

</div>

> [@BartButenaers](#):
>
> Of course, as soon as I get some time in the near future, I will need to start measuring a single device and so on. But at least I need to know my end goal, in thus case an affordable scheduler.  
> Still hopibg that someone has the golden tip.

Can't remember now whether this has been covered. But a simply place to start and one with a quick win would be to add a non-invasive monitor on the main power inlet to your property. That way, you could immediately get alerts if the power was spiking or approaching maximum. Personally, I would want that as a backstop anyway even if also using other tooling. I've seen plenty of projects on how to do that as well over the years so it should be pretty easy and relatively cheap to achieve.

[Previous page](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148.md?page=2)

[Next page](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148.md?page=4)
