From 92611a7e574ead1831135e6d34e70a8f3638bea9 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:33:25 +0200 Subject: [PATCH] Solax: fix registers and unify X1/X3 G3/G4 (#4022) --- .../meter/{solax-x3.yaml => solax.yaml} | 39 ++++++++++++++----- .../meter/{solax-x3_0.yaml => solax_0.yaml} | 10 ++--- 2 files changed, 34 insertions(+), 15 deletions(-) rename templates/definition/meter/{solax-x3.yaml => solax.yaml} (55%) rename templates/docs/meter/{solax-x3_0.yaml => solax_0.yaml} (71%) diff --git a/templates/definition/meter/solax-x3.yaml b/templates/definition/meter/solax.yaml similarity index 55% rename from templates/definition/meter/solax-x3.yaml rename to templates/definition/meter/solax.yaml index d171880a9..e3f8e8ea5 100644 --- a/templates/definition/meter/solax-x3.yaml +++ b/templates/definition/meter/solax.yaml @@ -1,12 +1,13 @@ -template: solax-x3 +template: solax +covers: ["solax-x1", "solax-x3"] products: - brand: Solax description: - generic: Hybrid X3 + generic: Hybrid X1/X3 G3/G4 requirements: description: - de: Der Solax Inverter muss via Ethernet an das lokale Netzwerk angeschlossen sein. - en: The Solax inverter has to be connected to the local network via ethernet. + de: Der Solax Hybrid Inverter muss via Ethernet an das lokale Netzwerk angeschlossen sein. + en: The Solax Hybrid inverter has to be connected to the local network via ethernet. guidedsetup: enable: true params: @@ -24,10 +25,19 @@ render: | uri: {{ .host }}:{{ .port }} id: 1 register: # manual non-sunspec register configuration - address: 192 #(see Hybrid.X1.X3-G3.ModbusTCP.RTU.V3.21-.English.pdf) + address: 70 # 0x0046 feedin_power(meter) type: input decode: int32s scale: -1 + energy: + source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + register: # manual non-sunspec register configuration + address: 74 # 0x004A consum_energy_total(meter) + type: input + decode: uint32s + scale: 10 {{- end }} {{- if eq .usage "pv" }} source: calc @@ -36,23 +46,32 @@ render: | uri: {{ .host }}:{{ .port }} id: 1 register: # manual non-sunspec register configuration - address: 10 #(see Hybrid.X1.X3-G3.ModbusTCP.RTU.V3.21-.English.pdf) + address: 10 # 0x000A Powerdc1 type: input decode: uint16 - source: modbus uri: {{ .host }}:{{ .port }} id: 1 register: # manual non-sunspec register configuration - address: 11 #(see Hybrid.X1.X3-G3.ModbusTCP.RTU.V3.21-.English.pdf) + address: 11 # 0x000B Powerdc2 type: input decode: uint16 + energy: + source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + register: # manual non-sunspec register configuration + address: 148 # 0x0094 SolarEnergyTotal + type: input + decode: uint32s + scale: 10 {{- end }} {{- if eq .usage "battery" }} source: modbus uri: {{ .host }}:{{ .port }} id: 1 register: # manual non-sunspec register configuration - address: 22 #(see Hybrid.X1.X3-G3.ModbusTCP.RTU.V3.21-.English.pdf) + address: 22 # 0x0016 Batpower_Charge1 type: input decode: int16 scale: -1 @@ -61,7 +80,7 @@ render: | uri: {{ .host }}:{{ .port }} id: 1 register: - address: 28 #(see Hybrid.X1.X3-G3.ModbusTCP.RTU.V3.21-.English.pdf) + address: 28 # 0x001C Battery Capacity type: input - decode: Uint16 + decode: uint16 {{- end }} diff --git a/templates/docs/meter/solax-x3_0.yaml b/templates/docs/meter/solax_0.yaml similarity index 71% rename from templates/docs/meter/solax-x3_0.yaml rename to templates/docs/meter/solax_0.yaml index b0e2db423..5f71852c7 100644 --- a/templates/docs/meter/solax-x3_0.yaml +++ b/templates/docs/meter/solax_0.yaml @@ -1,27 +1,27 @@ product: brand: Solax - description: Hybrid X3 + description: Hybrid X1/X3 G3/G4 description: | - Der Solax Inverter muss via Ethernet an das lokale Netzwerk angeschlossen sein. + Der Solax Hybrid Inverter muss via Ethernet an das lokale Netzwerk angeschlossen sein. render: - usage: grid default: | type: template - template: solax-x3 + template: solax usage: grid host: 192.0.2.2 # IP-Adresse oder Hostname port: 502 # Port - usage: pv default: | type: template - template: solax-x3 + template: solax usage: pv host: 192.0.2.2 # IP-Adresse oder Hostname port: 502 # Port - usage: battery default: | type: template - template: solax-x3 + template: solax usage: battery host: 192.0.2.2 # IP-Adresse oder Hostname port: 502 # Port