Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 104 additions & 76 deletions templates/definition/meter/fronius-gen24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ params:
deprecated: true # read from nameplate
- preset: battery-params
- name: maxchargerate
- name: watchdog
default: 60s
render: |
type: custom
# sunspec model 20x (int+sf)/ 21x (float) meter
Expand Down Expand Up @@ -250,89 +252,115 @@ render: |
id: 1
value: 124:0:ChaState
batterymode: # model 124
source: switch
switch:
- case: 1 # normal
set:
source: sequence
source: watchdog
timeout: {{ .watchdog }}
reset: 1 # reset watchdog on normal
set:
source: switch
switch:
- case: 1 # normal
set:
- source: const
value: 0
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 100 # %
source: sequence
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 2 # hold
set:
source: sequence
- source: const
value: 0
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 100 # %
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 2 # hold
set:
- source: const
value: 2
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 0 # %
source: sequence
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 3 # charge
set:
source: sequence
# device reverts to normal unless refreshed by the watchdog
- source: const
value: {{ durationSeconds .watchdog }} # s
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:InOutWRte_RvrtTms
- source: const
value: 2
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 0 # %
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 3 # charge
set:
- source: const
value: 1 # off
source: sequence
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:ChaGriSet
- source: const
value: 2
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: {{ if .maxchargerate }}-{{ .maxchargerate }}{{ end }} # %
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 4 # holdcharge
set:
source: sequence
- source: const
value: 1 # off
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:ChaGriSet
- source: const
value: {{ durationSeconds .watchdog }} # s
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:InOutWRte_RvrtTms
- source: const
value: 2
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: {{ if .maxchargerate }}-{{ .maxchargerate }}{{ end }} # %
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 4 # holdcharge
set:
- source: const
value: 1
set:
source: sunspec
uri: {{ .host }}:{{ .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 0 # %
source: sequence
set:
source: sunspec
uri: {{ .host }}:{{ .port }}
id: 1
value: 124:0:InWRte
default:
source: error
error: ErrNotAvailable
- source: const
value: {{ durationSeconds .watchdog }} # s
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:InOutWRte_RvrtTms
- source: const
value: 1
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 0 # %
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:InWRte
default:
source: error
error: ErrNotAvailable
{{- include "battery-params" . }}
{{- end }}
Loading
Loading