Cfos: add wakeup (#12033)

This commit is contained in:
andig 2024-02-03 13:28:34 +01:00 • committed by GitHub
parent 5627f57ebb
commit 589da6fa57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,12 +11,13 @@ import (
)
const (
cfosRegRelaySelect = 8087 // Holding
cfosRegStatus = 8092 // Holding
cfosRegMaxCurrent = 8093 // Holding
cfosRegEnable = 8094 // Holding
cfosRegLastRfid = 8096 // Holding
cfosRegSolarEnabled = 8113 // Holding
cfosRegDisconnectCp = 8086
cfosRegRelaySelect = 8087
cfosRegStatus = 8092
cfosRegMaxCurrent = 8093
cfosRegEnable = 8094
cfosRegLastRfid = 8096
cfosRegSolarEnabled = 8113
)
// CfosPowerBrain is an charger implementation for cFos PowerBrain wallboxes.
@ -149,6 +150,14 @@ func (wb *CfosPowerBrain) phases1p3p(phases int) error {
return err
}
var _ api.Resurrector = (*CfosPowerBrain)(nil)
// WakeUp implements the api.Resurrector interface
func (wb *CfosPowerBrain) WakeUp() error {
_, err := wb.conn.WriteSingleRegister(cfosRegDisconnectCp, uint16(5))
return err
}
var _ api.Identifier = (*CfosPowerBrain)(nil)
// Identify implements the api.Identifier interface