Modernize invertergui: MQTT write support, HA integration, UI updates
Some checks failed
build / inverter_gui_pipeline (push) Has been cancelled
Some checks failed
build / inverter_gui_pipeline (push) Has been cancelled
This commit is contained in:
@@ -76,3 +76,29 @@ type Mk2 interface {
|
||||
C() chan *Mk2Info
|
||||
Close()
|
||||
}
|
||||
|
||||
type PanelSwitchState byte
|
||||
|
||||
const (
|
||||
// PanelSwitchChargerOnly enables charging only.
|
||||
PanelSwitchChargerOnly PanelSwitchState = 0x01
|
||||
// PanelSwitchInverterOnly enables inverter output and disables charging.
|
||||
PanelSwitchInverterOnly PanelSwitchState = 0x02
|
||||
// PanelSwitchOn enables both inverter and charger.
|
||||
PanelSwitchOn PanelSwitchState = 0x03
|
||||
// PanelSwitchOff disables inverter and charger.
|
||||
PanelSwitchOff PanelSwitchState = 0x04
|
||||
)
|
||||
|
||||
type SettingsWriter interface {
|
||||
// WriteRAMVar writes a signed 16-bit value to a RAM variable id.
|
||||
WriteRAMVar(id uint16, value int16) error
|
||||
// WriteSetting writes a signed 16-bit value to a setting id.
|
||||
WriteSetting(id uint16, value int16) error
|
||||
// SetPanelState sends the MK2 "S" command using a virtual panel switch state.
|
||||
// If currentLimitA is nil, the command does not update the AC current limit.
|
||||
SetPanelState(switchState PanelSwitchState, currentLimitA *float64) error
|
||||
// SetStandby configures the remote panel standby line.
|
||||
// When enabled, the inverter is prevented from sleeping while switched off.
|
||||
SetStandby(enabled bool) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user