Skip to content

Commit 9362b61

Browse files
committed
Add configurable timeout for modbus sensors
1 parent 22f4ac0 commit 9362b61

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

templates/definition/meter/saj-h1.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ params:
88
choice: ["grid", "pv", "battery"]
99
- name: modbus
1010
choice: ["tcpip"]
11+
- name: timeout
12+
default: 5s
1113
- name: capacity
1214
advanced: true
1315
render: |
@@ -16,13 +18,15 @@ render: |
1618
power:
1719
source: modbus
1820
{{- include "modbus" . | indent 2 }}
21+
timeout: {{ .timeout }}
1922
register:
2023
address: 0x40A1 # SmartMeterTotalGridPowerWatt (undocumented)
2124
type: holding
2225
decode: int16
2326
energy:
2427
source: modbus
2528
{{- include "modbus" . | indent 2 }}
29+
timeout: {{ .timeout }}
2630
register:
2731
address: 0x40FD # Total_FeedInEnergy
2832
type: holding
@@ -33,13 +37,15 @@ render: |
3337
power:
3438
source: modbus
3539
{{- include "modbus" . | indent 2 }}
40+
timeout: {{ .timeout }}
3641
register:
3742
address: 0x40A5 # TotalPVPower
3843
type: holding
3944
decode: int16
4045
energy:
4146
source: modbus
4247
{{- include "modbus" . | indent 2 }}
48+
timeout: {{ .timeout }}
4349
register:
4450
address: 0x40C5 # Total PVEnergy
4551
type: holding
@@ -50,13 +56,15 @@ render: |
5056
power:
5157
source: modbus
5258
{{- include "modbus" . | indent 2 }}
59+
timeout: {{ .timeout }}
5360
register:
5461
address: 0x40A6 # TotalBatteryPower
5562
type: holding
5663
decode: int16
5764
energy:
5865
source: modbus
5966
{{- include "modbus" . | indent 2 }}
67+
timeout: {{ .timeout }}
6068
register:
6169
address: 0x40D5 # Total BatDisEnergy
6270
type: holding
@@ -65,6 +73,7 @@ render: |
6573
soc:
6674
source: modbus
6775
{{- include "modbus" . | indent 2 }}
76+
timeout: {{ .timeout }}
6877
register:
6978
address: 0x406F # BatEnergyPercent
7079
type: holding

0 commit comments

Comments
 (0)