Skip to content
Switch branches/tags

Demand Shaper

Appliance, Smartplug, WiFi Relay, EmonEVSE / OpenEVSE EV Charging Station, HeatpumpMonitor demand shaper: Find the best time to run a household load.

The demand shaper module uses a day ahead power availability forecast and user set schedules to determine the best time to run household loads. An example could be charging an electric car, the user enters a desired completion time and charge duration, the demand shaper module then works out the best time to charge the car, generally there will be higher power availability overnight and during sunny midday hours. The demand shaper attempts to avoid running appliances at peak times while ensuring that the appliance has completed the required run period.

Developed as part of the CydYnni EnergyLocal project, see:


Supported forecasts

New in v2: Multiple forecasts can now be combined such as the Solcast Solar Forecast with the Octopus Agile forecast to allow optimisation of both on-site solar and import from Octopus Agile overnight.


  • Emoncms Core
  • Emoncms Device module
  • MQTT Mosquitto broker and MQTT emoncms setup as per emonSD image
  • Emoncms dependencies: Apache2, MariaDB, Redis etc.


The DemandShaper module is pre-installed on the emonSD image that is shipped with OpenEnergyMonitor EmonPi and EmonBase devices. If you dont have a EmonPi or EmonBase but do have a spare RaspberryPi, the easiest way to use the DemandShaper module is to download the latest emonSD SD card image so that you have the full Emoncms stack. Alternatively it is possible to build the Emoncms stack from scratch (useful for non-Pi systems e.g a cloud VM) using EmonScripts, or if you already have an manual Emoncms installation see steps for manual installation below.

Installation Options:

  1. Use pre-built emonSD SD card image for a RaspberryPi
    Download the latest image here:

  2. Install full emoncms system including demandshaper module using EmonScripts
    Just run our automated emoncms installation script on a target system of choice, see:

  3. Install demandshaper module within an existing emoncms installation

User Guides

The module contains custom interfaces for applications such as EV charging where you can drag drop the battery level state of charge to the desired target, the module then calculates the required run time based on the battery size and charger charge rate.

Developer Guide

In progress of being written...

  1. Architecture
  2. Add a new forecast
  3. Parsing forecasts
  4. Add a new device
  5. The schedule object
  6. Testing using the CLI scripts

Parsed Forecast Examples


  • The standard configuration on emonSD and EmonScripts based systems include basic authentication for MQTT access.
  • Devices running EmonESP such as the SmartPlug can be configured with an admin username and password to limit access.


Appliance, Smartplug, OpenEVSE demand scheduler: Find the best time to run household loads




No packages published