Skip to content

Commit

Permalink
feat: Add SmartLoad/Gen voltage and power entities
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Jul 14, 2024
1 parent bdb8705 commit f1b80fa
Show file tree
Hide file tree
Showing 3 changed files with 226 additions and 19 deletions.
81 changes: 75 additions & 6 deletions custom_components/solarman/inverter_definitions/deye_sg01hp3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ parameters:
registers: [0x025E, 0x02BE]
icon: "mdi:transmission-tower"

# Grid internal - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid internal - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Internal Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1156,7 +1156,7 @@ parameters:
registers: [0x026A, 0x02C3]
icon: "mdi:transmission-tower"

# Grid external - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid external - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "External Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1201,7 +1201,7 @@ parameters:
registers: [0x0270, 0x02B1]
icon: "mdi:transmission-tower"

# Grid - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Grid Power"
realtime:
class: "measurement"
Expand Down Expand Up @@ -1302,7 +1302,7 @@ parameters:
rule: 4
registers: [0x027B, 0x02B5]

# Inverter output - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Inverter output - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Inverter Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1377,7 +1377,7 @@ parameters:
registers: [0x0282, 0x02BA]
icon: "mdi:home-lightning-bolt"

# UPS output - Total active power is U16bit (low 16 bits) + U16bit (high 16 bits)
# UPS output - The power is U16bit (low 16 bits) + U16bit (high 16 bits)
- name: "UPS Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1445,7 +1445,7 @@ parameters:
rule: 2
registers: [0x028C, 0x0292]

# Load - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Load - The Power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Load Power"
realtime:
class: "power"
Expand All @@ -1455,6 +1455,75 @@ parameters:
rule: 2
registers: [0x028D, 0x0293]

- group: SmartLoad/Generator
items:
# SmartLoad/Generator - The voltage of phase A
- name: "SmartLoad L1 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0295]

# SmartLoad/Generator - The voltage of phase B
- name: "SmartLoad L2 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0296]

# SmartLoad/Generator - The voltage of phase C
- name: "SmartLoad L3 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0297]

# Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L1 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x0298, 0x029C]

# SmartLoad/Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L2 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x0299, 0x029D]

# SmartLoad/Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L3 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x029A, 0x029E]

# SmartLoad/Generator - The Power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x029B, 0x029F]

- group: Photovoltaic
items:
# Photovoltaic - The combined power of Input 1 & 2
Expand Down
83 changes: 76 additions & 7 deletions custom_components/solarman/inverter_definitions/deye_sg04lp3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ parameters:
registers: [0x025E, 0x02BE]
icon: "mdi:transmission-tower"

# Grid internal - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid internal - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Internal Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1132,7 +1132,7 @@ parameters:
registers: [0x026A, 0x02C3]
icon: "mdi:transmission-tower"

# Grid external - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid external - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "External Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1177,7 +1177,7 @@ parameters:
registers: [0x0270, 0x02B1]
icon: "mdi:transmission-tower"

# Grid - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Grid Power"
realtime:
class: "measurement"
Expand Down Expand Up @@ -1274,7 +1274,7 @@ parameters:
rule: 4
registers: [0x027B, 0x02B5]

# Inverter output - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Inverter output - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Inverter Power"
realtime:
class: "power"
Expand All @@ -1301,7 +1301,7 @@ parameters:
signed:
registers: [0x027C, 0x02B6]

# Inverter output - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Inverter - Frequency
- name: "Inverter Frequency"
realtime:
class: "frequency"
Expand Down Expand Up @@ -1346,7 +1346,7 @@ parameters:
registers: [0x0282, 0x02BA]
icon: "mdi:home-lightning-bolt"

# UPS output - Total active power is U16bit (low 16 bits) + U16bit (high 16 bits)
# UPS output - The power is U16bit (low 16 bits) + U16bit (high 16 bits)
- name: "UPS Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1414,7 +1414,7 @@ parameters:
rule: 2
registers: [0x028C, 0x0292]

# Load - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Load - The Power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Load Power"
realtime:
class: "power"
Expand All @@ -1424,6 +1424,75 @@ parameters:
rule: 2
registers: [0x028D, 0x0293]

- group: SmartLoad/Generator
items:
# SmartLoad/Generator - The voltage of phase A
- name: "SmartLoad L1 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0295]

# SmartLoad/Generator - The voltage of phase B
- name: "SmartLoad L2 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0296]

# SmartLoad/Generator - The voltage of phase C
- name: "SmartLoad L3 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0297]

# Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L1 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x0298, 0x029C]

# SmartLoad/Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L2 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x0299, 0x029D]

# SmartLoad/Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L3 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x029A, 0x029E]

# SmartLoad/Generator - The Power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x029B, 0x029F]

- group: Photovoltaic
items:
# Photovoltaic - The combined power of Input 1 & 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ parameters:
registers: [0x025E, 0x02BE]
icon: "mdi:transmission-tower"

# Grid internal - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid internal - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Internal Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1194,7 +1194,7 @@ parameters:
registers: [0x026A, 0x02C3]
icon: "mdi:transmission-tower"

# Grid external - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid external - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "External Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1239,7 +1239,7 @@ parameters:
registers: [0x0270, 0x02B1]
icon: "mdi:transmission-tower"

# Grid - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Grid - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Grid Power"
realtime:
class: "measurement"
Expand Down Expand Up @@ -1337,7 +1337,7 @@ parameters:
rule: 4
registers: [0x027B, 0x02B5]

# Inverter output - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Inverter output - The power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Inverter Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1409,7 +1409,7 @@ parameters:
registers: [0x0282, 0x02BA]
icon: "mdi:home-lightning-bolt"

# UPS output - Total active power is U16bit (low 16 bits) + U16bit (high 16 bits)
# UPS output - The power is U16bit (low 16 bits) + U16bit (high 16 bits)
- name: "UPS Power"
realtime:
class: "power"
Expand Down Expand Up @@ -1477,7 +1477,7 @@ parameters:
rule: 2
registers: [0x028C, 0x0292]

# Load - Total active power is S16bit (low 16 bits) + S16bit (high 16 bits)
# Load - The Power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "Load Power"
realtime:
class: "power"
Expand All @@ -1487,6 +1487,75 @@ parameters:
rule: 2
registers: [0x028D, 0x0293]

- group: SmartLoad/Generator
items:
# SmartLoad/Generator - The voltage of phase A
- name: "SmartLoad L1 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0295]

# SmartLoad/Generator - The voltage of phase B
- name: "SmartLoad L2 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0296]

# SmartLoad/Generator - The voltage of phase C
- name: "SmartLoad L3 Voltage"
class: "voltage"
state_class: "measurement"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0297]

# Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L1 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x0298, 0x029C]

# SmartLoad/Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L2 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x0299, 0x029D]

# SmartLoad/Generator - The power of phase A is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad L3 Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x029A, 0x029E]

# SmartLoad/Generator - The Power is S16bit (low 16 bits) + S16bit (high 16 bits)
- name: "SmartLoad Power"
realtime:
class: "power"
state_class: "measurement"
uom: "W"
scale: 1
rule: 2
registers: [0x029B, 0x029F]

- group: Photovoltaic
items:
# Photovoltaic - The combined power of Input 1 & 2
Expand Down

0 comments on commit f1b80fa

Please sign in to comment.