Skip to content

feat(easee): verify active session identity for saved battery levels - #108

Merged
frahlg merged 3 commits into
mainfrom
fix/easee-active-session
Sep 6, 2026
Merged

frahlg merged 3 commits into
mainfrom
fix/easee-active-session

Conversation

@frahlg

@frahlg frahlg commented Sep 6, 2026

Copy link
Copy Markdown
Member

Core needs a charger session identity before it can restore a saved battery level after restart. Easee observation 129 describes a previous completed session, and observation 223 can remain after charging ends while the cable stays connected. Neither alone proves that a paused car is the same car.

Easee Cloud 1.3.0 emits session_id only after measured charging and the ongoing-session API confirm the same observation-223 ID and start with no session end. The driver keeps that proof through ordinary pauses in the same process. Disconnect, completion or a changed session revoke it. A fresh process cannot identify a paused or completed car automatically. After completion an offline car may need its battery level confirmed again.

The extra API call is limited to ten attempts per hour, at least one minute apart after failure. A verified active session needs no repeated lookup. JSON values that are not session objects no longer stop fresh power telemetry. Equivalent UTC timestamps match with either +00:00 or Z and optional zero fractional seconds.

Validation:

  • make test-driver ID=easee_cloud: 37 passed, 15 skipped.
  • make check: 4037 passed, 1309 skipped.
  • Lua regressions cover active proof, ordinary pause, terminal-to-awaiting transitions, closed and changed sessions, malformed JSON forms, both UTC-format directions, lookup limits and failed/empty observations.
  • Read-only inspection on an Easee charger confirmed that the ongoing API can report an ended session while the cable remains connected. Physical reconnect and active-session restoration still need an end-to-end hardware test on the final pair.

This head addresses the two Codex review findings and the Bugbot timestamp finding on f92e705. Core srcfl/ftw#1074 pins the updated driver; the paired client is srcfl/ftw-webapp#63. No release has been published.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg marked this pull request as ready for review September 6, 2026 13:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T13:08:27.125486Z f92e705 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f92e705016

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread drivers/lua/easee_cloud.lua
Comment thread drivers/lua/easee_cloud.lua

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f92e705. Configure here.

Comment thread drivers/lua/easee_cloud.lua

@cursor cursor Bot 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.

Stale comment

Left a non-blocking comment: Cursor Bugbot finished as skipped and reported one unresolved finding, so this automation is not approving. Reviewers were assigned for human review of the Easee session-identity change.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor
cursor Bot requested review from Leitet and davmoz September 6, 2026 13:12
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>

@cursor cursor Bot 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.

Approved: Cursor Bugbot passed on the current head, its earlier finding is resolved, and no new issues were reported. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@frahlg
frahlg merged commit 7a7ffb5 into main Sep 6, 2026
9 checks passed
@frahlg
frahlg deleted the fix/easee-active-session branch September 6, 2026 15:32
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