Daheimladen: add rfid (#27282)

This commit is contained in:
VolkerK62 2026-02-09 09:02:40 +01:00 • committed by GitHub
parent 5a8607fbba
commit 7bbfad1ccf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 3 deletions

View file

@ -45,6 +45,7 @@ const (
dlRegEvseMaxCurrent = 32 // Uint16 RO 0.1A
dlRegCableMaxCurrent = 36 // Uint16 RO 0.1A
dlRegStationId = 38 // Chr[16] RO UTF16
dlRegCardId = 54 // Chr[16] RO UTF16
dlRegChargedEnergy = 72 // Uint16 RO 0.1kWh
dlRegChargingTime = 78 // Uint32 RO 1s
dlRegSafeCurrent = 87 // Uint16 WR 0.1A
@ -289,6 +290,17 @@ func (wb *DaheimLaden) Voltages() (float64, float64, float64, error) {
return wb.getPhaseValues(dlRegVoltages)
}
var _ api.Identifier = (*DaheimLaden)(nil)
// Identify implements the api.Identifier interface. Only usable with PRO
func (wb *DaheimLaden) Identify() (string, error) {
b, err := wb.conn.ReadHoldingRegisters(dlRegCardId, 16)
if err != nil {
return "", err
}
return utf16BEBytesAsString(b)
}
// phases1p3p implements the api.PhaseSwitcher interface
func (wb *DaheimLaden) phases1p3p(phases int) error {
b := make([]byte, 2)
@ -341,6 +353,10 @@ func (wb *DaheimLaden) Diagnose() {
s, _ := utf16BEBytesAsString(b)
fmt.Printf("\tStation ID:\t%s\n", s)
}
if b, err := wb.conn.ReadHoldingRegisters(dlRegCardId, 16); err == nil {
s, _ := utf16BEBytesAsString(b)
fmt.Printf("\tCard ID:\t%s\n", s)
}
if b, err := wb.conn.ReadHoldingRegisters(dlRegSafeCurrent, 1); err == nil {
fmt.Printf("\tSafe Current:\t%.1fA\n", float64(binary.BigEndian.Uint16(b)/10))
}

View file

@ -4,9 +4,9 @@ products:
- { brand: DaheimLaden, description: { generic: Business } }
requirements:
description:
de: Firmware-Anforderungen= Smart/Touch Pro ab "M3W_3.11STP", Business ab "M3W_3.09PTB". Während der Phasen-Umschaltung pausiert die Ladung für zwei Minuten.
en: Firmware requirements= Smart/Touch Pro from "M3W_3.11STP", Business from "M3W_3.09PTB". Charging pauses for two minutes during phase switching.
capabilities: ["1p3p", "mA"]
de: Firmware-Anforderungen= Smart/Touch Pro ab "M3W_3.11STP", Business ab "M3W_3.09PTB". Während der Phasen-Umschaltung pausiert die Ladung für zwei Minuten. Informationen zur Ladefreigabe (AutoStart, App, RFID, Button), bitte der Wallbox Dokumentation von DaheimLaden entnehmen.
en: Firmware requirements= Smart/Touch Pro from "M3W_3.11STP", Business from "M3W_3.09PTB". Charging pauses for two minutes during phase switching. For information regarding charging authorization (AutoStart, App, RFID, Button), please refer to the DaheimLaden wallbox documentation.
capabilities: ["1p3p", "mA", "rfid"]
params:
- name: host
- name: port