Add Victron VRM solar forecast (#20882)

This commit is contained in:
jlegen 2025-05-04 12:23:55 +02:00 • committed by GitHub
parent 422a58dbdb
commit 64664f0abf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,61 @@
template: victron
products:
- brand: Victron
description:
generic: VRM Solar Forecast
requirements:
description:
en: >-
[vrm.victronenergy.com](https://vrm.victronenergy.com) get the
2-days-forecast from your installation in VRM portal. You need a free user
access token.
de: >-
[vrm.victronenergy.com](https://vrm.victronenergy.com) abrufen der
2-Tage-Prognose einer Installation im VRM-Portal. Es wird ein kostenloses
User Access Token benoetigt.
evcc: ["skiptest"]
group: solar
params:
- name: idsite
description:
en: VRM Site ID of the installation
de: VRM-Installations-ID der Installation
help:
en: The VRM Site ID is displayed in the intallation settings under "General"
de: Die VRM-Installations-ID wird in den Einstellungen der Installation unter "Allgemeines" angezeigt
example: 123456
required: true
- name: token
description:
en: API access token
de: API Zugriffstoken
help:
en: Tokens can be created in VRM in Preferences->Integrations
de: Token können im VRM erstellt werden unter Präferenzen->Integrationen
required: true
- name: interval
default: 1h
advanced: true
render: >
{{- $n := now -}}
{{- $start := $n | unixEpoch | int -}}
{{- $end := add $start 172800 -}}
type: custom
tariff: solar
forecast:
source: http
uri: >-
https://vrmapi.victronenergy.com/v2/installations/{{ .idsite }}
/stats?start={{ $start }}&end={{ $end }}
&interval=hours&type=forecast
method: "GET"
headers:
- X-Authorization: "Token {{ .token }}"
jq: |
.records.solar_yield_forecast | map({
"start": ((.[0] / 1000) | todateiso8601),
"end": (((.[0] + 3600000) / 1000 ) | todateiso8601),
"value": .[1]
}) | tostring
interval: {{ .interval }}