Skip to content

Daheimladen: fix autostart after charger reboot#30942

Draft
premultiply wants to merge 1 commit into
masterfrom
premultiply/issue30934
Draft

Daheimladen: fix autostart after charger reboot#30942
premultiply wants to merge 1 commit into
masterfrom
premultiply/issue30934

Conversation

@premultiply

Copy link
Copy Markdown
Member

Fixes #30934

@premultiply premultiply added the devices Specific device support label Jun 16, 2026
Comment thread charger/daheimladen.go
}

if _, err := wb.conn.ReadHoldingRegisters(dlRegSafeCurrent, 1); err != nil {
curr, err := wb.getCurrent()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

sorry für die falschen (heartbeat) Fährte.
Bei den Pro Modellen ist failsafe-timeout = 0. Dann wird heartbeat doch gar nicht aufgerufen, oder?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nein, dann nicht.

@VolkerK62 VolkerK62 Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Könnte man diese Ladestromprüfung in der Status Funktion unterbringen?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dann macht das im heartbeat keine Sinn.

@evcc-io evcc-io deleted a comment from VolkerK62 Jun 17, 2026
@VolkerK62

VolkerK62 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Wäre stattdessen diese Ergänzung eine Option?

func (wb *DaheimLaden) getCurrent() (uint16, error) {
    b, err := wb.conn.ReadHoldingRegisters(dlRegCurrentLimit, 1)
    if err != nil {
        return 0, err
    }

    curr := binary.BigEndian.Uint16(b)

    // change 0 to 1 to avoid autostart after charger reboot
    if curr == 0 {
        _ = wb.setCurrent(1)
        curr = 1
    }

    return curr, nil
}

@premultiply

Copy link
Copy Markdown
Member Author

Die Herausforderung ist, dass es eigentlich nur Getter oder Setter gibt.
Durch das Lesen und ggf. Schreiben in einer Funktion würden wir diese Trennung aufheben.

Ich denke nochmal drüber nach.

@VolkerK62

Copy link
Copy Markdown
Collaborator

Ok. Nachdem ich mich über Getter und Setter schlau gemacht habe, verstehe ich prinzipiell den Einwand.
Allerdings ist es doch klar abgegrenzt und hat keine Nebeneffekte.

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

Labels

devices Specific device support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Daheimladen: Prüfung Ladestromregister

2 participants