I’ve been doing quite a bit of work on the demandshaper module over recent weeks as part of work on the EnergyLocal Bethesda Trial. I’ve created a new release v1.1:
Release v1.1 · emoncms/demandshaper · GitHub
Changelog
- Modularisation and refactor of scheduler function, seperated out the forecast processing from the smart and timer schedule generation.
- Matching javascript implementation of php scheduler function.
- Improvements to schedule object: fixed schedule settings and always changing runtime settings are now seperated providing a better structure.
- Fixed schedule settings only are saved to disk in order to reduce SD card wear
- Forecast is preloaded in js client and schedules calculated using js scheduler to reduce bandwidth requirements and speed up UI.
- Fixed DST timezone support
- Higher resolution scheduling support to 15mins
- Basic demandshaper schedule log to /var/log/emoncms/demandshaper.log
- Improvements to EnergyLocal forecast
- Missing ip address fix
- Fixed standard timer implementation (timer1 and timer2 now work)
- Confirmation of whether settings have transferred to Smartplug/OpenEVSE/Heatpump controller.
- Emoncms V10 menu support.
Important: Due to substantial differences in settings object structure, after updating to version 1.1 the demandshaper schedules database entries need resetting.
This can be done by going to the URL:
http://emonpi/emoncms/demandshaper/clearall
Timezones: The module currently has the Europe/London timezone hardcoded, making this configurable is on the development list for a later version, most of the forecasts are currently UK based as it is, so its likely of limited use elsewhere for now. The EmonESP firmware uses UTC time and the OpenEVSE firmware the local browser time. The demandshaper module applies a correction based on device type.
Schedule log: It can be useful when testing to see what schedules have been generated and when they are recalculated. This information is now logged to /var/log/emoncms/demandshaper.log if this file exists. To create this file the steps are:
sudo touch /var/log/emoncms/demandshaper.log
sudo chmod 666 /var/log/emoncms/demandshaper.log
This log can be accessed from an api:
http://emonpi/emoncms/demandshaper/log (all)
http://emonpi/emoncms/demandshaper/log?filter=openevse (filter by device)
http://emonpi/emoncms/demandshaper/log?filter=openevse&last (show only last schedule)
Stability & Testing
I’m not confident yet that this development is stable, it generally appears to be working well on my system and the DST fixes and state confirmation make it a substantial improvement over earlier versions, there are times where the schedule does not appear to get written correctly to the smartplug and the interface responds with a ‘settings mismatch’ error, re-sending/setting a new schedule usually clears this issue.
Im away from the office from July 16th (Tuesday) until the 31st so will only be able to give limited support in that period. Thanks