How to reduce peak consumption (hems)

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

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 ...