Updated: 12 March 2019
The emoncms demand shaper module uses a day ahead 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.
The demand shaper supports the following forecasts:
- UK Grid Carbon Intensity forecast
- Agile Octopus tariff forecast
- EnergyLocal power availability forecast
See extended discussion on demand side response here:
See the github repository readme for the installation guide and requirements:
The demand shaper process publishes the schedule configuration to a MQTT topic that the device subscribes to, e.g:
emon/smartplug1/in/ctrlmode On/Off/Timer emon/smartplug1/in/timer 1300 1600
There are a number of interesting elements that happen behind the scene when the demand shaper module is used in conjunction with the latest emoncms & device module and EmonESP firmware for the Sonoff S20. I have copied in the guide for using the demand shaper module with the sonoff s20 plug from the readme here for illustration. Note the sections “What happened here?”
Using the Demand Shaper module with a SonOff S20 smart plug
Install the EmonESP (timer branch) firmware on a Sonoff S20 smartplug. There are pre-compiled binaries to make this step easier as well as the option to compile from source. See guide here:
1. The Sonoff S20 smartplug creates a WIFI access point, connect to the access point and enter home WIFI network. That is all the configuration required.
2. Connect back to your home WIFI network. Login to emoncms and navigate to the DeviceShaper module (in the extras menu). Wait until a popup appears asking to connect:
What happened here?: The smart plug discovers the emonbase/emonpi automatically by listening out for the periodic UDP packet published by the emonbase/emonpi, enabled by the UDP broadcast script and triggered by keeping the demandshaper page open
3. After clicking allow and waiting a minute or so, the smart plug will then appear:
What happened here?: The smart plug received the MQTT authentication details from the emonbase/emonpi automatically as part of a pairing process enabled by clicking on Allow. After connecting to MQTT the smartplug sent a descriptor message that automatically created and configured an emoncms device based on the smartplug device template in the emoncms device module.
4. Configure a schedule and wait for the plug to turn on!
The module currently supports the following day-ahead forecasts:
- Octopus Agile tariff
- UK grid carbon intensity forecast
- EnergyLocal Bethesda trial forecast
Updated: 12 March 2019