Repository navigation
Dashboard creation by EMS demo setup and demo rules improvements - #12
Conversation
…ion fluctuations to EMS demo rules and other improvements to forecast simulation demo rules
There was a problem hiding this comment.
Pull request overview
Adds EMS demo improvements by templating and provisioning dashboards during EMS setup, and enhancing the demo simulation rules (including power consumption noise and updated forecast handling) to better support testing/demo scenarios.
Changes:
- Extend
EmsOptimisationSetupServiceto create overview + battery dashboards from JSON templates during EMS demo setup. - Enhance
EmsDemoSimulationRules.groovywith configurable power fluctuations, updated forecast period handling, and adjusted scheduling cadence/signature changes. - Add two dashboard template JSON files for EMS overview and battery monitoring.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
ems/src/main/resources/ems/rules/EmsDemoSimulationRules.groovy |
Adds power noise and changes forecast period/timers; adjusts summation behavior via new parameter. |
ems/src/main/resources/ems/dashboards/EmsOverviewDashboard.json |
New dashboard template consumed by setup service to generate an EMS overview dashboard. |
ems/src/main/resources/ems/dashboards/EmsBatteryDashboard.json |
New dashboard template consumed by setup service to generate an EMS battery dashboard. |
ems/src/main/java/org/openremote/extension/ems/manager/EmsOptimisationSetupService.java |
Wires dashboard creation into EMS setup flow and injects new rules placeholder for fluctuation magnitude. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "createdOn": 1711029229921, | ||
| "realm": "master", | ||
| "ownerId": "e5ca8a39-5193-478d-ba86-57e7095679cf", | ||
| "access": "1", | ||
| "displayName": "New Dashboard", |
There was a problem hiding this comment.
This dashboard JSON includes environment-specific metadata (realm, ownerId, access, createdOn, and displayName). Since the setup service overwrites realm/displayName and creates the dashboard programmatically, keeping hard-coded ownerId/access (and stale createdOn) risks creating dashboards owned by a non-existent user or with unintended permissions. Recommend removing these fields from the template JSON (or explicitly overriding/clearing them in code before createNew).
| "createdOn": 1711029229921, | |
| "realm": "master", | |
| "ownerId": "e5ca8a39-5193-478d-ba86-57e7095679cf", | |
| "access": "1", | |
| "displayName": "New Dashboard", |
Description
EMS - Add dashboard generation to EMS setup service #7
Checklist