diff --git a/charger/stiebel-isg.go b/charger/stiebel-isg.go new file mode 100644 index 0000000000..38edfb963b --- /dev/null +++ b/charger/stiebel-isg.go @@ -0,0 +1,343 @@ +package charger + +// LICENSE + +// Copyright (c) 2022 premultiply, andig + +// This module is NOT covered by the MIT license. All rights reserved. + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +import ( + "errors" + "fmt" + "math" + + "github.com/evcc-io/evcc/api" + "github.com/evcc-io/evcc/charger/stiebel" + "github.com/evcc-io/evcc/core/loadpoint" + "github.com/evcc-io/evcc/util" + "github.com/evcc-io/evcc/util/modbus" + "github.com/evcc-io/evcc/util/sponsor" + "github.com/volkszaehler/mbmd/encoding" +) + +// StiebelIsg charger implementation +type StiebelIsg struct { + *embed + log *util.Logger + conn *modbus.Connection + lp loadpoint.API + conf TempConfig +} + +type TempConfig struct { + SollAddr, IstAddr uint16 + TempDelta float64 + ModeAddr uint16 + EnableMode uint16 + DisableMode uint16 + StatusAddr uint16 + StatusBits uint16 + Speicher float64 + Wärmekoeffizient float64 +} + +func init() { + registry.Add("stiebel-isg", NewStiebelIsgFromConfig) +} + +// NewStiebelIsgFromConfig creates a Stiebel ISG charger from generic config +func NewStiebelIsgFromConfig(other map[string]interface{}) (api.Charger, error) { + cc := struct { + modbus.TcpSettings `mapstructure:",squash"` + TempConfig `mapstructure:",squash"` + embed `mapstructure:",squash"` + }{ + TcpSettings: modbus.TcpSettings{ + ID: 1, + }, + TempConfig: TempConfig{ + // temp + SollAddr: 522, // WW + IstAddr: 521, // WW + TempDelta: 5, // °C + // enable/disable + ModeAddr: 1500, // Betriebsart + EnableMode: 3, // Komfortbetrieb + DisableMode: 2, // Programmbetrieb + // status + StatusAddr: 2500, // Betriebsstatus + StatusBits: 1 << 5, // WW Betrieb + // medium + Wärmekoeffizient: 4.18, // kJ/kgK + }, + embed: embed{ + Icon_: "heatpump", + Features_: []api.Feature{api.IntegratedDevice}, + }, + } + + if err := util.DecodeOther(other, &cc); err != nil { + return nil, err + } + + return NewStiebelIsg(&cc.embed, cc.URI, cc.ID, cc.TempConfig) +} + +// NewStiebelIsg creates Stiebel ISG charger +func NewStiebelIsg(embed *embed, uri string, slaveID uint8, conf TempConfig) (api.Charger, error) { + conn, err := modbus.NewConnection(uri, "", "", 0, modbus.Tcp, slaveID) + if err != nil { + return nil, err + } + + if !sponsor.IsAuthorized() { + return nil, api.ErrSponsorRequired + } + + log := util.NewLogger("stiebel") + conn.Logger(log.TRACE) + + wb := &StiebelIsg{ + embed: embed, + log: log, + conn: conn, + conf: conf, + } + + return wb, nil +} + +func (wb *StiebelIsg) sollIst() (float64, float64, error) { + soll, err := wb.conn.ReadInputRegisters(wb.conf.SollAddr, 1) + if err != nil { + return 0, 0, err + } + + ist, err := wb.conn.ReadInputRegisters(wb.conf.IstAddr, 1) + if err != nil { + return 0, 0, err + } + + if stiebel.Invalid(soll) || stiebel.Invalid(ist) { + return 0, 0, errors.New("invalid reading") + } + + return float64(encoding.Int16(soll)) / 10, float64(encoding.Int16(ist)) / 10, nil +} + +// Status implements the api.Charger interface +func (wb *StiebelIsg) Status() (api.ChargeStatus, error) { + res := api.StatusNone + + soll, ist, err := wb.sollIst() + if err != nil { + return res, err + } + + energyRequired := (soll - ist) * wb.conf.Speicher * wb.conf.Wärmekoeffizient / 3.6e3 + wb.log.DEBUG.Printf("ist: %.1f°C, soll: %.1f°C, energy required: %.3fkWh", ist, soll, energyRequired) + + charging, err := wb.charging() + if err != nil { + return res, err + } + + // TODO StatusA + res = api.StatusB + + // become "connected" if temp is outside of temp delta + if soll-ist > wb.conf.TempDelta { + res = api.StatusB + } + + if charging { + res = api.StatusC + } + + return res, nil +} + +func (wb *StiebelIsg) charging() (bool, error) { + b, err := wb.conn.ReadInputRegisters(wb.conf.StatusAddr, 1) + if err != nil { + return false, err + } + + return encoding.Uint16(b)&wb.conf.StatusBits != 0, nil +} + +func (wb *StiebelIsg) mode() (uint16, error) { + b, err := wb.conn.ReadHoldingRegisters(wb.conf.ModeAddr, 1) + if err != nil { + return 0, err + } + + return encoding.Uint16(b), nil +} + +// Enabled implements the api.Charger interface +func (wb *StiebelIsg) Enabled() (bool, error) { + mode, err := wb.mode() + return mode == wb.conf.EnableMode, err +} + +// Enable implements the api.Charger interface +func (wb *StiebelIsg) Enable(enable bool) error { + enabled, err := wb.Enabled() + if err != nil { + return err + } + + if enabled == enable { + return nil + } + + // don't disable unless pump is silent + if enabled && !enable { + charging, err := wb.charging() + if err != nil { + return err + } + + if charging { + return api.ErrMustRetry + } + } + + // set new mode + value := map[bool]uint16{true: wb.conf.EnableMode, false: wb.conf.DisableMode}[enable] + + mode, err := wb.mode() + if mode != value && err == nil { + // TODO remove + return errors.New("forbidden") + + // _, err = wb.conn.WriteSingleRegister(wb.conf.ModeAddr, value) + } + + return err +} + +// MaxCurrent implements the api.Charger interface +func (wb *StiebelIsg) MaxCurrent(current int64) error { + return nil +} + +var _ api.Battery = (*StiebelIsg)(nil) + +func (wb *StiebelIsg) Soc() (float64, error) { + _, ist, err := wb.sollIst() + return ist, err +} + +var _ api.SocLimiter = (*StiebelIsg)(nil) + +func (wb *StiebelIsg) GetLimitSoc() (int64, error) { + soll, _, err := wb.sollIst() + return int64(soll), err +} + +var _ api.Diagnosis = (*StiebelIsg)(nil) + +// Diagnose implements the api.Diagnosis interface +func (wb *StiebelIsg) Diagnose() { + // if _, err := wb.conn.WriteSingleRegister(1510, 28*10); err != nil { + // fmt.Println(err) + // } + + // { + // fmt.Println() + // reg := stiebel.Block3[0] + // if b, err := wb.conn.ReadInputRegisters(reg.Addr(), 1); err == nil { + // wb.print(reg, b) + // } + // } + + // { + // fmt.Println() + // ist, _ := wb.conn.ReadInputRegisters(521, 1) + // soll, _ := wb.conn.ReadInputRegisters(522, 1) + + // fmt.Println((float64(encoding.Int16(soll))-float64(encoding.Int16(ist)))/10*100*4.2/3.6e3, "kWh") + // } + + for _, reg := range stiebel.Block1 { + if b, err := wb.conn.ReadInputRegisters(reg.Addr(), 1); err == nil { + wb.print(reg, b) + } + } + + fmt.Println() + for _, reg := range stiebel.Block2 { + if b, err := wb.conn.ReadHoldingRegisters(reg.Addr(), 1); err == nil { + wb.print(reg, b) + } + } + + // fmt.Println() + // for _, reg := range stiebel.Block3 { + // if b, err := wb.conn.ReadInputRegisters(reg.Addr(), 1); err == nil { + // wb.print(reg, b) + // } + // } + + fmt.Println() + for _, reg := range stiebel.Block4 { + if b, err := wb.conn.ReadInputRegisters(reg.Addr(), 1); err == nil { + wb.print(reg, b) + } + } + + fmt.Println() + for _, reg := range stiebel.Block5 { + if b, err := wb.conn.ReadHoldingRegisters(reg.Addr(), 1); err == nil { + wb.print(reg, b) + } + } + + fmt.Println() + for _, reg := range stiebel.Block6 { + if b, err := wb.conn.ReadInputRegisters(reg.Addr(), 1); err == nil { + wb.print(reg, b) + } + } +} + +func (wb *StiebelIsg) print(reg stiebel.Register, b []byte) { + name := reg.Name + if reg.Comment != "" { + name = fmt.Sprintf("%s (%s)", name, reg.Comment) + } + + switch reg.Typ { + case stiebel.Bits: + if stiebel.Invalid(b) { + return + } + fmt.Printf("\t%d %s:\t%04X\n", reg.Addr(), name, b) + + default: + f := reg.Float(b) + if math.IsNaN(f) { + return + } + + fmt.Printf("\t%d %s:\t%.1f%s\n", reg.Addr(), name, f, reg.Unit) + } +} + +// LoadpointControl implements loadpoint.Controller +func (c *StiebelIsg) LoadpointControl(lp loadpoint.API) { + c.lp = lp +} diff --git a/charger/stiebel/isg.go b/charger/stiebel/isg.go new file mode 100644 index 0000000000..5c61b2b72b --- /dev/null +++ b/charger/stiebel/isg.go @@ -0,0 +1,57 @@ +package stiebel + +import ( + "math" + + "github.com/volkszaehler/mbmd/encoding" +) + +type Type int + +const ( + _ Type = iota + Int16 + Uint16 + Bits +) + +type Register struct { + addr uint16 + Name, Comment, Unit string + Typ Type + Divider float64 +} + +func Invalid(b []byte) bool { + return encoding.Int16(b) == math.MinInt16 +} + +func (reg Register) Addr() uint16 { + return reg.addr - 1 +} + +func (reg Register) Float(b []byte) float64 { + var i int64 + + switch reg.Typ { + case Int16: + if Invalid(b) { + return math.NaN() + } + i = int64(encoding.Int16(b)) + case Uint16: + if Invalid(b) { + return math.NaN() + } + i = int64(encoding.Uint16(b)) + default: + panic("invalid register type") + } + + f := float64(i) + if reg.Divider != 0 { + f = f / reg.Divider + } + + return f +} diff --git a/charger/stiebel/sgready.go b/charger/stiebel/sgready.go new file mode 100644 index 0000000000..714fd152ee --- /dev/null +++ b/charger/stiebel/sgready.go @@ -0,0 +1,14 @@ +package stiebel + +// Note: all registers are 1-based, i.e. actual value is addr-1 + +var Block5 = []Register{ + {4001, "SG READY EIN- UND AUSSCHALTEN", "", "", Bits, 0}, + {4002, "SG READY EINGANG 1", "", "", Bits, 0}, + {4003, "SG READY EINGANG 2", "", "", Bits, 0}, +} + +var Block6 = []Register{ + {5001, "SG READY BETRIEBSZUSTAND", "", "", Uint16, 0}, + {5002, "REGLERKENNUNG", "", "", Uint16, 0}, +} diff --git a/charger/stiebel/wpm.go b/charger/stiebel/wpm.go new file mode 100644 index 0000000000..9941809f84 --- /dev/null +++ b/charger/stiebel/wpm.go @@ -0,0 +1,317 @@ +package stiebel + +var Block1 = []Register{ + {501, "ISTTEMPERATUR FE7", "", "°C", Int16, 10}, + {502, "SOLLTEMPERATUR FE7", "", "°C", Int16, 10}, + {503, "ISTTEMPERATUR FEK", "", "°C", Int16, 10}, + {504, "SOLLTEMPERATUR FEK", "", "°C", Int16, 10}, + {505, "RAUMFEUCHTE", "", "%", Int16, 10}, + {506, "TAUPUNKTTEMPERATUR", "", "°C", Int16, 10}, + {507, "AUSSENTEMPERATUR", "", "°C", Int16, 100}, + {508, "ISTTEMPERATUR HK 1", "", "°C", Int16, 10}, + {509, "SOLLTEMPERATUR HK 1", "", "°C", Int16, 10}, + {510, "SOLLTEMPERATUR HK 1", "", "°C", Int16, 10}, + {511, "ISTTEMPERATUR HK 2", "", "°C", Int16, 10}, + {512, "SOLLTEMPERATUR HK 2", "", "°C", Int16, 10}, + {513, "VORLAUFISTTEMPERATUR WP", "MFG", "°C", Int16, 10}, + {514, "VORLAUFISTTEMPERATUR NHZ", "MFG", "°C", Int16, 10}, + {515, "VORLAUFISTTEMPERATUR", "", "°C", Int16, 10}, + {516, "RUECKLAUISTTEMPERATUR", "", "°C", Int16, 10}, + {517, "FESTWERTSOLLTEMPERATUR", "", "°C", Int16, -1e3}, + {518, "PUFFERISTTEMPERATUR", "", "°C", Int16, 10}, + {519, "PUFFERSOLLTEMPERATUR", "", "°C", Int16, 10}, + {521, "VOLUMENSTROM", "MFG", "l/min", Int16, 10}, + {522, "ISTTEMPERATUR", "Warmwasser", "°C", Int16, 10}, + {523, "SOLLTEMPERATUR", "Warmwasser", "°C", Int16, 10}, + {524, "ISTTEMPERATUR GEBLÄSE", "Kühlen", "K", Int16, 10}, + {525, "SOLLTEMPERATUR GEBLÄSE", "Kühlen", "K", Int16, 10}, + {526, "ISTTEMPERATUR FLÄCHE", "Kühlen", "K", Int16, 10}, + {527, "SOLLTEMPERATUR FLÄCHE", "Kühlen", "K", Int16, 10}, + {528, "KOLLEKTORTEMPERATUR", "Solar", "°C", Int16, 10}, + {529, "SPEICHERTEMPERATUR", "Solar", "°C", Int16, 10}, + {531, "ISTTEMPERATUR", "Wärmeerzeuger extern", "°C", Int16, 10}, + {532, "SOLLTEMPERATUR", "Wärmeerzeuger extern", "K", Int16, 10}, + {533, "EINSATZGRENZE HZG", "", "°C", Int16, -1e3}, + {534, "EINSATZGRENZE WW", "", "°C", Int16, -1e3}, + {536, "QUELLENTEMPERATUR", "", "°C", Int16, 10}, + {537, "QUELLENTEMPERATUR MIN", "", "°C", Int16, 10}, + {539, "HEISSGASTEMPERATUR", "", "°C", Int16, 10}, + {540, "DRUCK HOCHDRUCK", "", "bar", Int16, 10}, + {541, "DRUCK NIEDERDRUCK", "", "bar", Int16, 10}, + {542, "RÜCKLAUFTEMPERATUR", "Wärmepumpe 1", "°C", Int16, 10}, + {543, "VORLAUFTEMPERATUR", "Wärmepumpe 1", "°C", Int16, 10}, + {544, "HEISSGASTEMPERATUR", "Wärmepumpe 1", "°C", Int16, 10}, + {548, "WP WASSERVOLUMENSTROM", "Wärmepumpe 1", "l/min", Int16, 10}, + {549, "RÜCKLAUFTEMPERATUR", "Wärmepumpe 2", "°C", Int16, 10}, + {550, "VORLAUFTEMPERATUR", "Wärmepumpe 2", "°C", Int16, 10}, + {551, "HEISSGASTEMPERATUR", "Wärmepumpe 2", "°C", Int16, 10}, + {555, "WP WASSERVOLUMENSTROM", "Wärmepumpe 2", "l/min", Int16, 10}, + {556, "RÜCKLAUFTEMPERATUR", "Wärmepumpe 3", "°C", Int16, 10}, + {557, "VORLAUFTEMPERATUR", "Wärmepumpe 3", "°C", Int16, 10}, + {558, "HEISSGASTEMPERATUR", "Wärmepumpe 3", "°C", Int16, 10}, + {562, "WP WASSERVOLUMENSTROM", "Wärmepumpe 3", "l/min", Int16, 10}, + {563, "RÜCKLAUFTEMPERATUR", "Wärmepumpe 4", "°C", Int16, 10}, + {564, "VORLAUFTEMPERATUR", "Wärmepumpe 4", "°C", Int16, 10}, + {565, "HEISSGASTEMPERATUR", "Wärmepumpe 4", "°C", Int16, 10}, + {569, "WP WASSERVOLUMENSTROM", "Wärmepumpe 4", "l/min", Int16, 10}, + {570, "RÜCKLAUFTEMPERATUR", "Wärmepumpe 5", "°C", Int16, 10}, + {571, "VORLAUFTEMPERATUR", "Wärmepumpe 5", "°C", Int16, 10}, + {572, "HEISSGASTEMPERATUR", "Wärmepumpe 5", "°C", Int16, 10}, + {576, "WP WASSERVOLUMENSTROM", "Wärmepumpe 5", "l/min", Int16, 10}, + {577, "RÜCKLAUFTEMPERATUR", "Wärmepumpe 6", "°C", Int16, 10}, + {578, "VORLAUFTEMPERATUR", "Wärmepumpe 6", "°C", Int16, 10}, + {579, "HEISSGASTEMPERATUR", "Wärmepumpe 6", "°C", Int16, 10}, + {583, "WP WASSERVOLUMENSTROM", "Wärmepumpe 6", "l/min", Int16, 10}, + {584, "ISTTEMPERATUR", "Raumtemperatur Heizkreis 1", "°C", Int16, 10}, + {585, "SOLLTEMPERATUR", "Raumtemperatur Heizkreis 1", "°C", Int16, 10}, + {586, "RAUMFEUCHTE", "Heizkreis 1", "%", Int16, 10}, + {587, "TAUPUNKTTEMPERATUR", "Heizkreis 1", "°C", Int16, 10}, + {588, "ISTTEMPERATUR", "Raumtemperatur Heizkreis 2", "°C", Int16, 10}, + {589, "SOLLTEMPERATUR", "Raumtemperatur Heizkreis 2", "°C", Int16, 10}, + {590, "RAUMFEUCHTE", "Heizkreis 2", "%", Int16, 10}, + {591, "TAUPUNKTTEMPERATUR", "Heizkreis 2", "°C", Int16, 10}, + {592, "ISTTEMPERATUR", "Raumtemperatur Heizkreis 3", "°C", Int16, 10}, + {593, "SOLLTEMPERATUR", "Raumtemperatur Heizkreis 3", "°C", Int16, 10}, + {594, "RAUMFEUCHTE", "Heizkreis 3", "%", Int16, 10}, + {595, "TAUPUNKTTEMPERATUR", "Heizkreis 3", "°C", Int16, 10}, + {596, "ISTTEMPERATUR", "Raumtemperatur Heizkreis 4", "°C", Int16, 10}, + {597, "SOLLTEMPERATUR", "Raumtemperatur Heizkreis 4", "°C", Int16, 10}, + {598, "RAUMFEUCHTE", "Heizkreis 4", "%", Int16, 10}, + {599, "TAUPUNKTTEMPERATUR", "Heizkreis 4", "°C", Int16, 10}, + {600, "ISTTEMPERATUR", "Raumtemperatur Heizkreis 5", "°C", Int16, 10}, + {601, "SOLLTEMPERATUR", "Raumtemperatur Heizkreis 5", "°C", Int16, 10}, + {602, "RAUMFEUCHTE", "Heizkreis 5", "%", Int16, 10}, + {603, "TAUPUNKTTEMPERATUR", "Heizkreis 5", "°C", Int16, 10}, + {604, "SOLLTEMPERATUR", "Raumtemperatur Kühlkreis 1", "°C", Int16, 10}, + {605, "SOLLTEMPERATUR", "Raumtemperatur Kühlkreis 2", "°C", Int16, 10}, + {606, "SOLLTEMPERATUR", "Raumtemperatur Kühlkreis 3", "°C", Int16, 10}, + {607, "SOLLTEMPERATUR", "Raumtemperatur Kühlkreis 4", "°C", Int16, 10}, + {608, "SOLLTEMPERATUR", "Raumtemperatur Kühlkreis 5", "°C", Int16, 10}, +} + +var Block2 = []Register{ + {1501, "BETRIEBSART", "", "", Bits, 0}, + {1502, "KOMFORT TEMPERATUR", "Heizkreis 1", "°C", Int16, 10}, + {1503, "ECO TEMPERATUR", "Heizkreis 1", "°C", Int16, 10}, + {1505, "KOMFORT TEMPERATUR", "Heizkreis 2", "°C", Int16, 10}, + {1506, "ECO TEMPERATUR", "Heizkreis 2", "°C", Int16, 10}, + {1508, "FESTWERTBETRIEB", "", "°C", Int16, -10}, + {1509, "BIVALENZTEMPERATUR HZG", "", "°C", Int16, 10}, + {1510, "KOMFORT TEMPERATUR", "Warmwasser", "°C", Int16, 10}, + {1511, "ECO TEMPERATUR", "Warmwasser", "°C", Int16, 10}, + {1513, "BIVALENZTEMPERATUR WW", "", "°C", Int16, 10}, + {1514, "VORLAUFSOLLTEMPERATUR", "", "°C", Int16, 10}, + {1515, "HYSTERESE VORLAUFTEMP", "", "K", Int16, 10}, + {1516, "RAUMSOLLTEMPERATUR", "", "°C", Int16, 10}, + {1517, "VORLAUFSOLLTEMPERATUR", "", "°C", Int16, 10}, + {1518, "HYSTERESE VORLAUFTEMP", "", "K", Int16, 10}, + {1519, "RAUMSOLLTEMPERATUR", "", "°C", Int16, 10}, + {1520, "RESET", "", "", Uint16, 0}, +} + +var Block3 = []Register{ + {2501, "BETRIEBSSTATUS", "", "", Bits, 0}, + {2503, "BETRIEBSSTATUS", "", "", Bits, 0}, + {2504, "FEHLERSTATUS", "", "", Bits, 0}, + {2505, "BUSSTATUS", "", "", Bits, 0}, + {2506, "ABTAUEN EINGELEITET", "Abtauen eingeleitet", "", Bits, 0}, + {2507, "aktiver Fehler", "Fehlernummer", "", Bits, 0}, + {2508, "MELDUNGSNUMMER", "Meldungsnummer", "", Bits, 0}, + {2509, "HEIZKREISPUMPE 1", "Status WPM", "", Bits, 0}, + {2510, "HEIZKREISPUMPE 2", "Status WPM", "", Bits, 0}, + {2511, "HEIZKREISPUMPE 3", "Status WPM", "", Bits, 0}, + {2512, "PUFFERLADEPUMPE 1", "Status WPM", "", Bits, 0}, + {2513, "PUFFERLADEPUMPE 2", "Status WPM", "", Bits, 0}, + {2514, "WARMWASSERLADE- PUMPE", "Status WPM", "", Bits, 0}, + {2515, "QUELLENPUMPE", "Status WPM", "", Bits, 0}, + {2516, "STÖRAUSGANG", "Status WPM", "", Bits, 0}, + {2517, "ZIRKULATIONSPUMPE", "Status WPM", "", Bits, 0}, + {2518, "2. WE WARMWASSER", "Status WPM", "", Bits, 0}, + {2519, "2. WE HEIZUNG", "Status WPM", "", Bits, 0}, + {2520, "KÜHLBETRIEB", "Status WPM", "", Bits, 0}, + {2521, "MISCHER AUF HK 2", "Status WPM", "", Bits, 0}, + {2522, "MISCHER ZU HK 2", "Status WPM", "", Bits, 0}, + {2523, "MISCHER AUF HK 3", "Status WPM", "", Bits, 0}, + {2524, "MISCHER ZU HK 3", "Status WPM", "", Bits, 0}, + {2525, "NHZ 1", "Status WPM", "", Bits, 0}, + {2526, "NHZ 2", "Status WPM", "", Bits, 0}, + {2527, "NHZ 1/2", "Status WPM", "", Bits, 0}, + {2528, "HEIZKREISPUMPE 4", "Status WPE", "", Bits, 0}, + {2529, "HEIZKREISPUMPE 5", "Status WPE", "", Bits, 0}, + {2530, "PUFFERLADEPUMPE 3", "Status WPE", "", Bits, 0}, + {2531, "PUFFERLADEPUMPE 4", "Status WPE", "", Bits, 0}, + {2532, "PUFFERLADEPUMPE 5", "Status WPE", "", Bits, 0}, + {2533, "PUFFERLADEPUMPE 6", "Status WPE", "", Bits, 0}, + {2534, "PUMPE DIFFERENZREGLER 1", "Status WPE", "", Bits, 0}, + {2535, "PUMPE DIFFERENZREGLER 2", "Status WPE", "", Bits, 0}, + {2536, "SCHWIMMBADPUMPE PRIMÄR", "Status WPE", "", Bits, 0}, + {2537, "SCHWIMMBADPUMPE SEKUNDÄR", "Status WPE", "", Bits, 0}, + {2538, "MISCHER AUF HK 4", "Status WPE", "", Bits, 0}, + {2539, "MISCHER ZU HK 4", "Status WPE", "", Bits, 0}, + {2540, "MISCHER AUF HK 5", "Status WPE", "", Bits, 0}, + {2541, "MISCHER ZU HK 5", "Status WPE", "", Bits, 0}, + {2542, "VERDICHTER 1", "Status Wärmepumpe 1", "", Bits, 0}, + {2543, "VERDICHTER 2", "Status Wärmepumpe 2", "", Bits, 0}, + {2544, "VERDICHTER 3", "Status Wärmepumpe 3", "", Bits, 0}, + {2545, "VERDICHTER 4", "Status Wärmepumpe 4", "", Bits, 0}, + {2546, "VERDICHTER 5", "Status Wärmepumpe 5", "", Bits, 0}, + {2547, "VERDICHTER 6", "Status Wärmepumpe 6", "", Bits, 0}, +} + +var Block4 = []Register{ + {3501, "VD HEIZEN TAG", "Wärmemenge aller WP", "kWh", Uint16, 0}, + {3502, "VD HEIZEN SUMME", "Wärmemenge aller WP", "kWh", Uint16, 0}, + {3503, "VD HEIZEN SUMME", "Wärmemenge aller WP", "MWh", Uint16, 0}, + {3504, "VD WARMWASSER TAG", "Wärmemenge aller WP", "kWh", Uint16, 0}, + {3505, "VD WARMWASSER SUMME", "Wärmemenge aller WP", "kWh", Uint16, 0}, + {3506, "VD WARMWASSER SUMME", "Wärmemenge aller WP", "MWh", Uint16, 0}, + {3507, "NHZ HEIZEN SUMME", "Wärmemenge aller WP", "kWh", Uint16, 0}, + {3508, "NHZ HEIZEN SUMME", "Wärmemenge aller WP", "MWh", Uint16, 0}, + {3509, "NHZ WARMWASSER SUMME", "Wärmemenge aller WP", "kWh", Uint16, 0}, + {3510, "NHZ WARMWASSER SUMME", "Wärmemenge aller WP", "MWh", Uint16, 0}, + {3511, "VD HEIZEN TAG", "Leistungsaufnahme aller WP", "kWh", Uint16, 0}, + {3512, "VD HEIZEN SUMME", "Leistungsaufnahme aller WP", "kWh", Uint16, 0}, + {3513, "VD HEIZEN SUMME", "Leistungsaufnahme aller WP", "MWh", Uint16, 0}, + {3514, "VD WARMWASSER TAG", "Leistungsaufnahme aller WP", "kWh", Uint16, 0}, + {3515, "VD WARMWASSER SUMME", "Leistungsaufnahme aller WP", "kWh", Uint16, 0}, + {3516, "VD WARMWASSER SUMME", "Leistungsaufnahme aller WP", "MWh", Uint16, 0}, + {3517, "VD HEIZEN", "", "h", Uint16, 0}, + {3518, "VD WARMWASSER", "", "h", Uint16, 0}, + {3519, "VD KÜHLEN", "", "h", Uint16, 0}, + {3520, "NHZ 1", "", "h", Uint16, 0}, + {3521, "NHZ 2", "", "h", Uint16, 0}, + {3522, "NHZ 1/2", "", "h", Uint16, 0}, + {3523, "VD HEIZEN TAG", "Wärmemenge WP 1", "kWh", Uint16, 0}, + {3524, "VD HEIZEN SUMME", "Wärmemenge WP 1", "kWh", Uint16, 0}, + {3525, "VD HEIZEN SUMME", "Wärmemenge WP 1", "MWh", Uint16, 0}, + {3526, "VD WARMWASSER TAG", "Wärmemenge WP 1", "kWh", Uint16, 0}, + {3527, "VD WARMWASSER SUMME", "Wärmemenge WP 1", "kWh", Uint16, 0}, + {3528, "VD WARMWASSER SUMME", "Wärmemenge WP 1", "MWh", Uint16, 0}, + {3529, "NHZ HEIZEN SUMME", "Wärmemenge WP 1", "kWh", Uint16, 0}, + {3530, "NHZ HEIZEN SUMME", "Wärmemenge WP 1", "MWh", Uint16, 0}, + {3531, "NHZ WARMWASSER SUMME", "Wärmemenge WP 1", "kWh", Uint16, 0}, + {3532, "NHZ WARMWASSER SUMME", "Wärmemenge WP 1", "MWh", Uint16, 0}, + {3533, "VD HEIZEN TAG", "Leistungsaufnahme WP 1", "kWh", Uint16, 0}, + {3534, "VD HEIZEN SUMME", "Leistungsaufnahme WP 1", "kWh", Uint16, 0}, + {3535, "VD HEIZEN SUMME", "Leistungsaufnahme WP 1", "MWh", Uint16, 0}, + {3536, "VD WARMWASSER TAG", "Leistungsaufnahme WP 1", "kWh", Uint16, 0}, + {3537, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 1", "kWh", Uint16, 0}, + {3538, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 1", "MWh", Uint16, 0}, + {3539, "VD 1 HEIZEN", "Laufzeit WP 1", "h", Uint16, 0}, + {3540, "VD 2 HEIZEN", "Laufzeit WP 1", "h", Uint16, 0}, + {3541, "VD 1/2 HEIZEN", "Laufzeit WP 1", "h", Uint16, 0}, + {3542, "VD 1 WARMWASSER", "Laufzeit WP 1", "h", Uint16, 0}, + {3543, "VD 2 WARMWASSER", "Laufzeit WP 1", "h", Uint16, 0}, + {3544, "VD 1/2 WARMWASSER", "Laufzeit WP 1", "h", Uint16, 0}, + {3545, "VD KÜHLEN", "Laufzeit WP 1", "h", Uint16, 0}, + {3546, "NHZ 1", "Laufzeit", "h", Uint16, 0}, + {3547, "NHZ 2", "Laufzeit", "h", Uint16, 0}, + {3548, "NHZ 1/2", "Laufzeit", "h", Uint16, 0}, + {3549, "VD HEIZEN TAG", "Wärmemenge WP 2", "kWh", Uint16, 0}, + {3550, "VD HEIZEN SUMME", "Wärmemenge WP 2", "kWh", Uint16, 0}, + {3551, "VD HEIZEN SUMME", "Wärmemenge WP 2", "MWh", Uint16, 0}, + {3552, "VD WARMWASSER TAG", "Wärmemenge WP 2", "kWh", Uint16, 0}, + {3553, "VD WARMWASSER SUMME", "Wärmemenge WP 2", "kWh", Uint16, 0}, + {3554, "VD WARMWASSER SUMME", "Wärmemenge WP 2", "MWh", Uint16, 0}, + {3555, "VD HEIZEN TAG", "Leistungsaufnahme WP 2", "kWh", Uint16, 0}, + {3556, "VD HEIZEN SUMME", "Leistungsaufnahme WP 2", "kWh", Uint16, 0}, + {3557, "VD HEIZEN SUMME", "Leistungsaufnahme WP 2", "MWh", Uint16, 0}, + {3558, "VD WARMWASSER TAG", "Leistungsaufnahme WP 2", "kWh", Uint16, 0}, + {3559, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 2", "kWh", Uint16, 0}, + {3560, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 2", "MWh", Uint16, 0}, + {3561, "VD 1 HEIZEN", "Laufzeit WP 2", "h", Uint16, 0}, + {3562, "VD 2 HEIZEN", "Laufzeit WP 2", "h", Uint16, 0}, + {3563, "VD 1/2 HEIZEN", "Laufzeit WP 2", "h", Uint16, 0}, + {3564, "VD 1 WARMWASSER", "Laufzeit WP 2", "h", Uint16, 0}, + {3565, "VD 2 WARMWASSER", "Laufzeit WP 2", "h", Uint16, 0}, + {3566, "VD 1/2 WARMWASSER", "Laufzeit WP 2", "h", Uint16, 0}, + {3567, "VD KÜHLEN", "Laufzeit WP 2", "h", Uint16, 0}, + {3568, "VD HEIZEN TAG", "Wärmemenge WP 3", "kWh", Uint16, 0}, + {3569, "VD HEIZEN SUMME", "Wärmemenge WP 3", "kWh", Uint16, 0}, + {3570, "VD HEIZEN SUMME", "Wärmemenge WP 3", "MWh", Uint16, 0}, + {3571, "VD WARMWASSER TAG", "Wärmemenge WP 3", "kWh", Uint16, 0}, + {3572, "VD WARMWASSER SUMME", "Wärmemenge WP 3", "kWh", Uint16, 0}, + {3573, "VD WARMWASSER SUMME", "Wärmemenge WP 3", "MWh", Uint16, 0}, + {3574, "VD HEIZEN TAG", "Leistungsaufnahme WP 3", "kWh", Uint16, 0}, + {3575, "VD HEIZEN SUMME", "Leistungsaufnahme WP 3", "kWh", Uint16, 0}, + {3576, "VD HEIZEN SUMME", "Leistungsaufnahme WP 3", "MWh", Uint16, 0}, + {3577, "VD WARMWASSER TAG", "Leistungsaufnahme WP 3", "kWh", Uint16, 0}, + {3578, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 3", "kWh", Uint16, 0}, + {3579, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 3", "MWh", Uint16, 0}, + {3580, "VD 1 HEIZEN", "Laufzeit WP 3", "h", Uint16, 0}, + {3581, "VD 2 HEIZEN", "Laufzeit WP 3", "h", Uint16, 0}, + {3582, "VD 1/2 HEIZEN", "Laufzeit WP 3", "h", Uint16, 0}, + {3583, "VD 1 WARMWASSER", "Laufzeit WP 3", "h", Uint16, 0}, + {3584, "VD 2 WARMWASSER", "Laufzeit WP 3", "h", Uint16, 0}, + {3585, "VD 1/2 WARMWASSER", "Laufzeit WP 3", "h", Uint16, 0}, + {3586, "VD KÜHLEN", "Laufzeit WP 3", "h", Uint16, 0}, + {3587, "VD HEIZEN TAG", "Wärmemenge WP 4", "kWh", Uint16, 0}, + {3588, "VD HEIZEN SUMME", "Wärmemenge WP 4", "kWh", Uint16, 0}, + {3589, "VD HEIZEN SUMME", "Wärmemenge WP 4", "MWh", Uint16, 0}, + {3590, "VD WARMWASSER TAG", "Wärmemenge WP 4", "kWh", Uint16, 0}, + {3591, "VD WARMWASSER SUMME", "Wärmemenge WP 4", "kWh", Uint16, 0}, + {3592, "VD WARMWASSER SUMME", "Wärmemenge WP 4", "MWh", Uint16, 0}, + {3593, "VD HEIZEN TAG", "Leistungsaufnahme WP 4", "kWh", Uint16, 0}, + {3594, "VD HEIZEN SUMME", "Leistungsaufnahme WP 4", "kWh", Uint16, 0}, + {3595, "VD HEIZEN SUMME", "Leistungsaufnahme WP 4", "MWh", Uint16, 0}, + {3596, "VD WARMWASSER TAG", "Leistungsaufnahme WP 4", "kWh", Uint16, 0}, + {3597, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 4", "kWh", Uint16, 0}, + {3598, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 4", "MWh", Uint16, 0}, + {3599, "VD 1 HEIZEN", "Laufzeit WP 4", "h", Uint16, 0}, + {3600, "VD 2 HEIZEN", "Laufzeit WP 4", "h", Uint16, 0}, + {3601, "VD 1/2 HEIZEN", "Laufzeit WP 4", "h", Uint16, 0}, + {3602, "VD 1 WARMWASSER", "Laufzeit WP 4", "h", Uint16, 0}, + {3603, "VD 2 WARMWASSER", "Laufzeit WP 4", "h", Uint16, 0}, + {3604, "VD 1/2 WARMWASSER", "Laufzeit WP 4", "h", Uint16, 0}, + {3605, "VD KÜHLEN", "Laufzeit WP 4", "h", Uint16, 0}, + {3606, "VD HEIZEN TAG", "Wärmemenge WP 5", "kWh", Uint16, 0}, + {3607, "VD HEIZEN SUMME", "Wärmemenge WP 5", "kWh", Uint16, 0}, + {3608, "VD HEIZEN SUMME", "Wärmemenge WP 5", "MWh", Uint16, 0}, + {3609, "VD WARMWASSER TAG", "Wärmemenge WP 5", "kWh", Uint16, 0}, + {3610, "VD WARMWASSER SUMME", "Wärmemenge WP 5", "kWh", Uint16, 0}, + {3611, "VD WARMWASSER SUMME", "Wärmemenge WP 5", "MWh", Uint16, 0}, + {3612, "VD HEIZEN TAG", "Leistungsaufnahme WP 5", "kWh", Uint16, 0}, + {3613, "VD HEIZEN SUMME", "Leistungsaufnahme WP 5", "kWh", Uint16, 0}, + {3614, "VD HEIZEN SUMME", "Leistungsaufnahme WP 5", "MWh", Uint16, 0}, + {3615, "VD WARMWASSER TAG", "Leistungsaufnahme WP 5", "kWh", Uint16, 0}, + {3616, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 5", "kWh", Uint16, 0}, + {3617, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 5", "MWh", Uint16, 0}, + {3618, "VD 1 HEIZEN", "Laufzeit WP 5", "h", Uint16, 0}, + {3619, "VD 2 HEIZEN", "Laufzeit WP 5", "h", Uint16, 0}, + {3620, "VD 1/2 HEIZEN", "Laufzeit WP 5", "h", Uint16, 0}, + {3621, "VD 1 WARMWASSER", "Laufzeit WP 5", "h", Uint16, 0}, + {3622, "VD 2 WARMWASSER", "Laufzeit WP 5", "h", Uint16, 0}, + {3623, "VD 1/2 WARMWASSER", "Laufzeit WP 5", "h", Uint16, 0}, + {3624, "VD KÜHLEN", "Laufzeit WP 5", "h", Uint16, 0}, + {3625, "VD HEIZEN TAG", "Wärmemenge WP 6", "kWh", Uint16, 0}, + {3626, "VD HEIZEN SUMME", "Wärmemenge WP 6", "kWh", Uint16, 0}, + {3627, "VD HEIZEN SUMME", "Wärmemenge WP 6", "MWh", Uint16, 0}, + {3628, "VD WARMWASSER TAG", "Wärmemenge WP 6", "kWh", Uint16, 0}, + {3629, "VD WARMWASSER SUMME", "Wärmemenge WP 6", "kWh", Uint16, 0}, + {3630, "VD WARMWASSER SUMME", "Wärmemenge WP 6", "MWh", Uint16, 0}, + {3631, "VD HEIZEN TAG", "Leistungsaufnahme WP 6", "kWh", Uint16, 0}, + {3632, "VD HEIZEN SUMME", "Leistungsaufnahme WP 6", "kWh", Uint16, 0}, + {3633, "VD HEIZEN SUMME", "Leistungsaufnahme WP 6", "MWh", Uint16, 0}, + {3634, "VD WARMWASSER TAG", "Leistungsaufnahme WP 6", "kWh", Uint16, 0}, + {3635, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 6", "kWh", Uint16, 0}, + {3636, "VD WARMWASSER SUMME", "Leistungsaufnahme WP 6", "MWh", Uint16, 0}, + {3637, "VD 1 HEIZEN", "Laufzeit WP 6", "h", Uint16, 0}, + {3638, "VD 2 HEIZEN", "Laufzeit WP 6", "h", Uint16, 0}, + {3639, "VD 1/2 HEIZEN", "Laufzeit WP 6", "h", Uint16, 0}, + {3640, "VD 1 WARMWASSER", "Laufzeit WP 6", "h", Uint16, 0}, + {3641, "VD 2 WARMWASSER", "Laufzeit WP 6", "h", Uint16, 0}, + {3642, "VD 1/2 WARMWASSER", "Laufzeit WP 6", "h", Uint16, 0}, + {3643, "VD KÜHLEN", "Laufzeit WP 6", "h", Uint16, 0}, + {3644, "VD HEIZEN", "Laufzeit WP 1", "h", Uint16, 0}, + {3645, "VD WARMWASSER", "Laufzeit WP 1", "h", Uint16, 0}, + {3646, "VD HEIZEN", "Laufzeit WP 2", "h", Uint16, 0}, + {3647, "VD WARMWASSER", "Laufzeit WP 2", "h", Uint16, 0}, + {3648, "VD HEIZEN", "Laufzeit WP 3", "h", Uint16, 0}, + {3649, "VD WARMWASSER", "Laufzeit WP 3", "h", Uint16, 0}, + {3650, "VD HEIZEN", "Laufzeit WP 4", "h", Uint16, 0}, + {3651, "VD WARMWASSER", "Laufzeit WP 4", "h", Uint16, 0}, + {3652, "VD HEIZEN", "Laufzeit WP 5", "h", Uint16, 0}, + {3653, "VD WARMWASSER", "Laufzeit WP 5", "h", Uint16, 0}, + {3654, "VD HEIZEN", "Laufzeit WP 6", "h", Uint16, 0}, + {3655, "VD WARMWASSER", "Laufzeit WP 6", "h", Uint16, 0}, +}