|
1 | 1 | # KSTAR Hybrid Inverter |
2 | 2 | # Modbus information taken from "MODBUS RS485 Communication Protocol V2.5" document provided by KSTAR |
3 | 3 |
|
4 | | -#INPUT_REGISTERS = 3000 - 3660 # 0x0BB8 - 0x0E4C |
5 | | -#HOLDING_REGISTERS = 3200 - 3237 # 0x0C80 - 0x0C9B |
| 4 | +# This inverter exposes its data in the following registers (although not all of them are used by this definition file): |
| 5 | +# |
| 6 | +# - INPUT_REGISTERS 3000 - 3660 decimal, 0x0BB8 - 0x0E4C hexadecimal |
| 7 | +# - HOLDING_REGISTERS 3200 - 3237 decimal. 0x0C80 - 0x0C9B hexadecimal |
| 8 | +# |
| 9 | +# Each request can get a maximum of 125 registers as per modbus protocol (start and end included), so we need to |
| 10 | +# split up the list of used registers into multiple requests of maximum 125 registers each. |
6 | 11 |
|
7 | 12 | requests: |
8 | | - # Input registers 3000 - 3667 |
| 13 | + # Start requesting from the first needed register (3000) |
9 | 14 | - start: 3000 |
10 | | - end: 3125 |
| 15 | + end: 3124 |
11 | 16 | mb_functioncode: 0x04 |
12 | 17 |
|
13 | | - # Input registers 3200 - 3228 not read as they would clash with holding registers |
| 18 | + # Input registers 3200 - 3227 can't be read as they would clash with holding registers of same number |
14 | 19 | - start: 3125 |
15 | | - end: 3200 |
| 20 | + end: 3199 |
16 | 21 | mb_functioncode: 0x04 |
17 | 22 |
|
| 23 | + # Change to holding registers 3200 - 3237 (mb_functioncode 3) for the inverter system information. |
| 24 | + - start: 3200 |
| 25 | + end: 3217 |
| 26 | + mb_functioncode: 0x03 |
| 27 | + |
| 28 | + # Continue with the needed input registers |
18 | 29 | - start: 3228 |
19 | | - end: 3250 |
| 30 | + end: 3249 |
20 | 31 | mb_functioncode: 0x04 |
21 | 32 |
|
| 33 | + # Last input register currently used by this definition file is 3301, so we can skip the rest for now. |
22 | 34 | - start: 3250 |
23 | | - end: 3375 |
24 | | - mb_functioncode: 0x04 |
25 | | - |
26 | | - - start: 3375 |
27 | | - end: 3500 |
| 35 | + end: 3301 |
28 | 36 | mb_functioncode: 0x04 |
29 | 37 |
|
30 | | - # Holding registers 3200 - 3237. Inverter system information. |
31 | | - - start: 3200 |
32 | | - end: 3218 |
33 | | - mb_functioncode: 0x03 |
34 | | - |
35 | 38 | parameters: |
36 | 39 | - group: solar |
37 | 40 | items: |
@@ -699,7 +702,7 @@ parameters: |
699 | 702 | scale: 0.01 |
700 | 703 | rule: 1 |
701 | 704 | registers: [ 3098 ] |
702 | | - icon: 'mdi:home-lightning-bolt' |
| 705 | + icon: 'mdi:sine-wave' |
703 | 706 |
|
704 | 707 | - name: "R-phase Meter Current" |
705 | 708 | class: "current" |
@@ -744,7 +747,7 @@ parameters: |
744 | 747 | scale: 0.01 |
745 | 748 | rule: 1 |
746 | 749 | registers: [ 3125 ] |
747 | | - icon: 'mdi:home-lightning-bolt' |
| 750 | + icon: 'mdi:sine-wave' |
748 | 751 |
|
749 | 752 | - name: "R-phase Inverter Power" |
750 | 753 | class: "power" |
|
0 commit comments