Skip to content

FEMS Backports 2026-01-24#3540

Merged
sfeilmeier merged 24 commits intodevelopfrom
feature/fems-backports
Jan 23, 2026
Merged

FEMS Backports 2026-01-24#3540
sfeilmeier merged 24 commits intodevelopfrom
feature/fems-backports

Conversation

@sfeilmeier
Copy link
Copy Markdown
Contributor

  • Backend

    • [Backend] add executor for refresh token Commit
    • [Backend] update odoo refresh admin token Commit
    • [Backend] Metadata.Odoo: reuse session token Commit
    • [Backend] add tags to odoo user Commit
  • UI

    • [UI] Fixed style issue with formly serial number fields. Commit
    • [UI] EVSE: Only show Phase-Switch for KEBA P40 Commit
    • [UI] fix channels subscribe Commit
    • [UI] Fixes for mobile UI Commit
    • [UI] fix for missing sum state on live page Commit
    • [UI] Update to latest LTS: Node 24, NPM 11 Commit
    • [UI] /overview: release sort order for owner Commit
  • Edge

    • [Edge] ESHv2: fix possible NPE Commit
    • [Edge] ESHv2 Time-of-Use-Tariff Ctrl DELAY_DISCHARGE fix charge from AC Commit
    • [Edge] Predictors: Implement better logging Commit
    • [Edge] Controller.Ess.SoH.Cycle: Implement State-of-Health Cycle Controller Commit
    • [Edge] JSCalendar: implement nthOfPeriod for monthly byDay Commit
    • [Edge] Implement Grid-Buy-Soft-Limit in _meta (2) Commit
    • [Edge] App.FENECON.Home*: Bugfix for LED Commit
    • [Edge] Implement Grid-Buy-Soft-Limit in _meta Commit
    • [Edge] JSCalendar: Add Api-Routes to existing Components Commit
    • [Edge] FENECON 100 battery inverter: add type Commit
    • [Edge] Battery.Fenecon.Home: fix register names Commit
  • Common

    • [Edge/Backend] Various Cleanups Commit

sfeilmeier and others added 23 commits January 23, 2026 23:15
- enable sort order filter for owner in systems overview

Reviewed-by: Hanna Späth <[email protected]>
Reviewed-by: Andreas Mur <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: [email protected] <[email protected]>
Co-committed-by: [email protected] <[email protected]>
Co-authored-by: Sebastian Asen <[email protected]>
Reviewed-by: Sebastian Asen <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Alex Belke <[email protected]>
Co-committed-by: Alex Belke <[email protected]>
- add tags for owner accounts and accounts created by ibn
- tested on keycloak dev env

Co-authored-by: Stefan Feilmeier <[email protected]>
Reviewed-by: Kai Jeschek <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Michael Grill <[email protected]>
Co-committed-by: Michael Grill <[email protected]>
- reuse odoo session token for requests until it expires
- migrated most used methods to use single session token: "get_edge_with_role", "get_edges", "info"

Reviewed-by: Kai Jeschek <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Michael Grill <[email protected]>
Co-committed-by: Michael Grill <[email protected]>
Co-authored-by: Sebastian Asen <[email protected]>
Co-authored-by: Stefan Feilmeier <[email protected]>
Reviewed-by: Sebastian Asen <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Michael Grill <[email protected]>
Co-committed-by: Michael Grill <[email protected]>
Reviewed-by: Kai Jeschek <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Michael Grill <[email protected]>
Co-committed-by: Michael Grill <[email protected]>
- Evse.Controller.Single: reuse existing tasks factory
- Scheduler.JSCalendar: implement JSCalendar Api-Routes
- Controller.IO.Heating.Room: implement JSCalendar Api-Routes

Reviewed-by: Fabian Brandtner <[email protected]>
Introduce a global, time-based "grid-soft-limit" feature for energy storage systems. This functionality allows defining peak-shaving limits per time interval using JSCalendar for scheduling.

Details:
- Implemented in the Time-of-Use Tariff Controller.
- Supports flexible configuration of grid import limits based on time-of-day.
- Enables dynamic peak-shaving strategies aligned with tariff periods or grid constraints.

Reviewed-by: Sebastian Asen <[email protected]>
- `_sum/State` now gets subscribed if reload is triggered on live page

Reviewed-by: Lukas Rieger <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Andreas Mur <[email protected]>
Co-committed-by: Andreas Mur <[email protected]>
- The energy monitor is no longer displayed cut off.
- The status icon is now visible even at very low resolutions.

Co-authored-by: DerMuaaa <102706922+Andreas [email protected]>
Reviewed-by: Lukas Rieger <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Andreas Mur <[email protected]>
Co-committed-by: Andreas Mur <[email protected]>
Reduce tech debt:
* use newer Java features
* adheare to Java coding conventions
* improve logger usage (string templates, stacktraces)
* Use EnumMap where possible

Co-authored-by: Stefan Feilmeier <[email protected]>
Reviewed-by: Michael Grill <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Kai Jeschek <[email protected]>
Co-committed-by: Kai Jeschek <[email protected]>
Co-authored-by: Leon Blenk <[email protected]>
Co-authored-by: Michael Grill <[email protected]>
Reviewed-by: Michael Grill <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Leon Blenk <[email protected]>
Co-committed-by: Leon Blenk <[email protected]>
- Revert merge mistakes, improve logging, fix log time-parsing
- Plus: fix Eclipse warning for missing FENECON_100K Enum handling
- Noticed during development of sumState component and channels

Reviewed-by: Andreas Mur <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Lukas Rieger <[email protected]>
Co-committed-by: Lukas Rieger <[email protected]>
- Sources: https://www.rfc-editor.org/rfc/rfc8984.html; https://datatracker.ietf.org/doc/html/rfc8984#prop-recurrenceRules

- added "nthOfPeriod" to JSCalendar implementation
  - nthOfPeriod represents an specific occurrence, for example every third Sunday a month

- fixed some typos
- code changes to avoid redundancy
- implemented logic to execute nthOfPeriod and interval

```
 [{
  "@type": "Task",
  "uid": "245a8c5b-1898-4488-9cfb-105d78630cd6",
  "start": "2026-01-13T13:35:00",
  "recurrenceRules": [
    {
      "frequency": "monthly",
      "byDay": [
        { "day": "mo", "nthOfPeriod": 3 },
        { "day": "tu", "nthOfPeriod": 1 }
      ]
    }
  ]
}]
```

Co-authored-by: Stefan Feilmeier <[email protected]>
Reviewed-by: Leonhard Anderle <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Fabian Brandtner <[email protected]>
Co-committed-by: Fabian Brandtner <[email protected]>
…roller

## Summary

This pull request introduces a new SoH (State of Health) cycle controller based on the
existing `ControllerEssCycle` pattern.

The focus of this PR is the **structural foundation and state machine design**:
- new controller module
- explicit state machine
- dedicated handler classes per state
- separation of action states and waiting states

## Motivation

Determining the battery State of Health (SOH) requires a reproducible and deterministic
execution of reference and measurement cycles.

To avoid implicit transitions and unstable state changes, the SOH controller is designed
with **explicit charging/discharging states and corresponding waiting states**.
This makes transitions easier to reason about and aligns with existing OpenEMS cycle
controller patterns.

## State Machine Overview

The controller uses explicit **action states** and **waiting states**.

Action states are responsible for setting ESS power setpoints.
Waiting states are responsible for observing system feedback (e.g. SoC) and triggering
state transitions once conditions are met.

### Current States

- `IDLE`
- `PREPARE_REFERENCE`

**Reference cycle**
- `REFERENCE_CYCLE_CHARGING`
- `REFERENCE_CYCLE_CHARGING_WAIT`
- `REFERENCE_CYCLE_DISCHARGING`
- `REFERENCE_CYCLE_DISCHARGING_WAIT`

**Measurement cycle**
- `MEASUREMENT_CYCLE_CHARGING`
- `MEASUREMENT_CYCLE_CHARGING_WAIT`
- `CHECK_BALANCING`
- `MEASUREMENT_CYCLE_DISCHARGING`
- `MEASUREMENT_CYCLE_DISCHARGING_WAIT`

**Finalization**
- `EVALUATE_RESULT`
- `DONE`
- `ERROR_ABORT`

Co-authored-by: Sebastian Asen <[email protected]>
Co-authored-by: Stefan Feilmeier <[email protected]>
Reviewed-by: Sebastian Asen <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Alex Belke <[email protected]>
Co-committed-by: Alex Belke <[email protected]>
- As long as a predictor has not yet been trained, an error appears in the log each time a prediction is requested
- However, many of these mistakes are not mistakes at all, but planned behavior
- Add log severity to the exceptions thrown in the predictor
- Known exceptions with error handling only appear as info in the log, whereas unknown exceptions, which indicate that something unexpected has gone wrong, appear as errors in the log

Co-authored-by: Sebastian Asen <[email protected]>
Reviewed-by: Sebastian Asen <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Leonhard Anderle <[email protected]>
Co-committed-by: Leonhard Anderle <[email protected]>
Co-authored-by: Sebastian Asen <[email protected]>
Co-authored-by: Lukas Rieger <[email protected]>
Reviewed-by: Victor Nagy <[email protected]>
Reviewed-by: Lukas Rieger <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Johann Kaufmann <[email protected]>
Co-committed-by: Johann Kaufmann <[email protected]>
- Before ESS would not charge during DELAY_DISCHARGE if Production > Consumption
- Border colors for the Serial numbers were not generating, as they were using the highlight colors. so modified to use ion-colors

Reviewed-by: Lukas Rieger <[email protected]>
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Sagar Venu <[email protected]>
Co-committed-by: Sagar Venu <[email protected]>
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 23, 2026

Codecov Report

❌ Patch coverage is 60.20942% with 456 lines in your changes missing coverage. Please review.

❌ Your patch status has failed because the patch coverage (60.21%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3540      +/-   ##
=============================================
+ Coverage      59.22%   59.35%   +0.13%     
  Complexity       105      105              
=============================================
  Files           3040     3066      +26     
  Lines         132217   132833     +616     
  Branches        9756     9816      +60     
=============================================
+ Hits           78293    78825     +532     
- Misses         50976    51019      +43     
- Partials        2948     2989      +41     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sfeilmeier sfeilmeier merged commit 5fe2052 into develop Jan 23, 2026
6 of 7 checks passed
@sfeilmeier sfeilmeier deleted the feature/fems-backports branch January 23, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant