Skip to content

Conversation

@Maschga
Copy link
Collaborator

@Maschga Maschga commented Jan 23, 2026

Fix #26596
Ref #26615

πŸƒβ€βž‘οΈ run EEBus automatically at startup
🚩 add services section for OCPP, SHM and EEBus
πŸ“„ modal is readonly if configured in evcc.yaml

TODO:

  • all fields are advanced
  • add warning
  • autocompletion for interfaces (?)
  • improve i18n strings
  • add e2e tests
  • redact private cert
grafik grafik

\cc @andig @naltatis

@Maschga Maschga added the ux User experience/ interface label Jan 23, 2026
@naltatis naltatis self-assigned this Jan 24, 2026
@naltatis
Copy link
Member

I've added shipid/ski fields and explanation. Also adjusted the json save/delete workflow. The roundtrip should work now.

@Maschga Can you do the e2e? Basic flow like verify values exist on start. Change shipid and restart. Verify SKI changes after reboot when user deletes config and restarts.

Also noticed that private key is not redacted yet.

Bildschirmfoto 2026-01-27 um 16 44 07 Bildschirmfoto 2026-01-27 um 16 44 12 Bildschirmfoto 2026-01-27 um 16 44 50

@naltatis
Copy link
Member

autocompletion for interfaces (?)

Since we're currently still using the hacky "list as texturea" ui I'd not do autocomplete. We should upgrade the ui in da dedicated ticket and make it a list of inputs. Doing a similar thing in #26698 for zones. Could be similar.

@Maschga Maschga changed the base branch from feat/eebus-always-on to master January 28, 2026 12:53
@Maschga Maschga marked this pull request as ready for review January 28, 2026 13:19
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The new util.Masked helper takes an any parameter but compares it directly to a string literal (s != ""), which will not compile; consider changing the parameter type to string (or converting via fmt.Sprint) to avoid type errors and make its intent explicit.
  • The frontend EebusConfig TypeScript type still declares a required uri: string, while the backend now treats uri as deprecated (URI_ with no default set) and the UI does not expose it; consider either removing this field or making it optional to keep the TS model aligned with the actual JSON payload.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new util.Masked helper takes an `any` parameter but compares it directly to a string literal (`s != ""`), which will not compile; consider changing the parameter type to `string` (or converting via `fmt.Sprint`) to avoid type errors and make its intent explicit.
- The frontend `EebusConfig` TypeScript type still declares a required `uri: string`, while the backend now treats `uri` as deprecated (`URI_` with no default set) and the UI does not expose it; consider either removing this field or making it optional to keep the TS model aligned with the actual JSON payload.

## Individual Comments

### Comment 1
<location> `util/redact.go:3-4` </location>
<code_context>
+package util
+
+func Masked(s any) string {
+	if s != "" {
+		return "***"
+	}
</code_context>

<issue_to_address>
**issue (bug_risk):** The Masked helper uses `any` but compares directly to a string, which won’t compile.

Because `s` is typed as `any`, `s != ""` is an invalid comparison and the function will not compile. Either change the signature to `func Masked(s string) string` (since all call sites pass strings), or convert to string first (e.g. `str := fmt.Sprint(s)` and compare `str`). The former is likely the safest and clearest fix.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click πŸ‘ or πŸ‘Ž on each comment and I'll use the feedback to improve your reviews.

@Maschga Maschga changed the title UI: EEBUS: configure by default (2) EEBUS: configure by default Jan 28, 2026
FromYaml bool `json:"fromYaml,omitempty"`
}

func (i Info) Redacted() any {
Copy link
Member

Choose a reason for hiding this comment

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

Die redacted Methode gehΓΆrt nicht auf das Info

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wie bin ich dann in der Lage darunterliegende Structs wie hier EEBus zu redacten?

Copy link
Member

Choose a reason for hiding this comment

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

Genau wie jetzt auch oder vorher.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Info ist ein Wrapper für die Structs wie EEBus, das gabs vorher so noch nicht, soweit ich weiß.
Ich finde zumindest kein Muster im aktuellen Backend Code, wie ich EEBus ansonsten redacten kann?

Copy link
Member

Choose a reason for hiding this comment

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

Siehe letzter Commit- einfach verschoben. Was mir noch auffΓ€llt: bei Sponsor redacten wir Status, sonst Config. Ist das Objekt bei Sponsor an der richtigen Stelle?

)

// Info for publishing config, status and source to UI and external systems
type Info struct {
Copy link
Member

Choose a reason for hiding this comment

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

Can we find a better name? Info is as arbitrary as it gets.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

\cc @naltatis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ux User experience/ interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup EEBUS by default

3 participants