Skip to content

Dashboard creation by EMS demo setup and demo rules improvements - #12

Merged
wborn merged 5 commits into
mainfrom
ems-dashboards
Mar 30, 2026
Merged

wborn merged 5 commits into
mainfrom
ems-dashboards

Conversation

@igorrutka

Copy link
Copy Markdown
Contributor

Description

Checklist

  • 1. Acceptance criteria of the linked issue(s) are met
  • 2. Tests are written and all tests pass
  • 3. Changes are manually tested by you and the reviewer
  • 4. Documentation is written or updated

…ion fluctuations to EMS demo rules and other improvements to forecast simulation demo rules
@igorrutka
igorrutka requested a review from wborn February 25, 2026 11:18
@igorrutka igorrutka added Feature Development of new feature Enhancement Improvement of an existing feature labels Feb 25, 2026
@wborn
wborn requested a review from Copilot February 25, 2026 13:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EmsOptimisationSetupService to create overview + battery dashboards from JSON templates during EMS demo setup.
  • Enhance EmsDemoSimulationRules.groovy with 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.

Comment on lines +2 to +6
"createdOn": 1711029229921,
"realm": "master",
"ownerId": "e5ca8a39-5193-478d-ba86-57e7095679cf",
"access": "1",
"displayName": "New Dashboard",

Copilot AI Feb 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Suggested change
"createdOn": 1711029229921,
"realm": "master",
"ownerId": "e5ca8a39-5193-478d-ba86-57e7095679cf",
"access": "1",
"displayName": "New Dashboard",

Copilot uses AI. Check for mistakes.
Comment thread ems/src/main/resources/ems/dashboards/EmsOverviewDashboard.json Outdated
Comment thread ems/src/main/resources/ems/rules/EmsDemoSimulationRules.groovy Outdated
Comment thread ems/src/main/resources/ems/rules/EmsDemoSimulationRules.groovy Outdated
Comment thread ems/src/main/resources/ems/dashboards/EmsBatteryDashboard.json Outdated
Comment thread ems/src/main/resources/ems/dashboards/EmsBatteryDashboard.json
Comment thread ems/src/main/resources/ems/rules/EmsDemoSimulationRules.groovy
@wborn
wborn merged commit f7a0c6f into main Mar 30, 2026
1 check passed
@wborn
wborn deleted the ems-dashboards branch March 30, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvement of an existing feature Feature Development of new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EMS - Add dashboard generation to EMS setup service EMS - Add additional functionality to EMS demo rules for testing purposes

3 participants