From 02d7b9a3d2d22510615b8b153b770261ac35850c Mon Sep 17 00:00:00 2001 From: NANI Date: Fri, 25 Apr 2025 15:36:07 +0000 Subject: [PATCH 1/3] New integration: Victron VRM Forecasts --- source/_integrations/vrm_forecasts.markdown | 90 +++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 source/_integrations/vrm_forecasts.markdown diff --git a/source/_integrations/vrm_forecasts.markdown b/source/_integrations/vrm_forecasts.markdown new file mode 100644 index 000000000000..f4ab019b9eba --- /dev/null +++ b/source/_integrations/vrm_forecasts.markdown @@ -0,0 +1,90 @@ +--- +title: Victron VRM Forecasts +description: Instructions for implementation of Victron VRM Forecasts into Home Assistant. +ha_category: + - Energy +ha_release: 2025.5 +ha_iot_class: Cloud Polling +ha_config_flow: true +ha_codeowners: + - '@AndyTempel' +ha_domain: vrm_forecasts +ha_platforms: + - sensor +ha_integration_type: service +--- + +The Victron VRM Forecasts integration pulls solar production and consumption forecasts from [Victron Energy](https://www.victronenergy.com/) VRM portal into Home Assistant. It provides day-ahead and next-hour estimates for both production and consumption, plus peak-time predictions. Forecast data is available once you have at least 30 days of historical data in your VRM installation. The integration uses the VRM REST API (v2) and leverages Home Assistant’s sensor platform to expose forecast values directly in the Energy dashboard and as individual sensors for automation and visualization. + +--- + +## Prerequisites + +- **Victron VRM installation** with a solar system and all consumption routed through inverters or a grid meter. +- **At least 30 days of data** in VRM before forecasts appear. +- **VRM access token** (keep this secret!). Create one in the VRM Portal at **Preferences → Integrations → Access tokens** or use [this link](https://vrm.victronenergy.com/access-tokens). +- **VRM Site ID**: found under **Settings → General** in your site’s VRM Portal page. +{% important %}Your VRM access token grants full access to your VRM portal, including system control and data retrieval. Treat it like a password: + +- Do not share it. +- Rotate it immediately if you suspect compromise. +{% endimportant %} + +--- + +{% include integrations/config_flow.md %} + +--- + +## Sensor Entities + +### Solar Production Forecast + +- `sensor.energy_production_estimate_yesterday`: Estimated energy production — Yesterday +- `sensor.energy_production_estimate_today`: Estimated energy production — Today +- `sensor.energy_production_estimate_today_remaining`: Remaining production — Today +- `sensor.energy_production_estimate_tomorrow`: Estimated energy production — Tomorrow +- `sensor.energy_production_current_hour`: Production — Current hour +- `sensor.energy_production_next_hour`: Production — Next hour +- `sensor.power_highest_peak_time_yesterday`: Peak production time — Yesterday +- `sensor.power_highest_peak_time_today`: Peak production time — Today +- `sensor.power_highest_peak_time_tomorrow`: Peak production time — Tomorrow + +### Consumption Forecast + +- `sensor.energy_consumption_estimate_yesterday`: Estimated energy consumption — Yesterday +- `sensor.energy_consumption_estimate_today`: Estimated energy consumption — Today +- `sensor.energy_consumption_estimate_today_remaining`: Remaining consumption — Today +- `sensor.energy_consumption_estimate_tomorrow`: Estimated energy consumption — Tomorrow +- `sensor.energy_consumption_current_hour`: Consumption — Current hour +- `sensor.energy_consumption_next_hour`: Consumption — Next hour +- `sensor.consumption_highest_peak_time_yesterday`: Peak consumption time — Yesterday +- `sensor.consumption_highest_peak_time_today`: Peak consumption time — Today +- `sensor.consumption_highest_peak_time_tomorrow`: Peak consumption time — Tomorrow + +--- + +## Adding to the Energy Dashboard + +1. Go to **Dashboards** in the settings. +2. Select the **Energy** dashboard. +3. Under **Solar panels**, click the edit button of your solar installation. +4. Select **Forecast production** and choose previously set up VRM Forecasts. +5. Save; your dashboard will show forecasted values. + +--- + +## Troubleshooting + +- **No sensors**: Confirm you completed the UI flow and see no errors in logs. +- **Forecasts not available**: Verify you have ≥30 days of VRM data. +- **Invalid auth**: Regenerate your token in VRM Portal and update the integration. +- **Site not found**: Make sure you've entered the correct site/installation ID. + +--- + +## Useful links + +1. [VRM JSON API v2 documentation](https://vrm-api-docs.victronenergy.com/#/) +2. [VRM Portal manual](https://www.victronenergy.com/media/pg/VRM_Portal_manual/en/introduction.html) +3. [Victron VRM Portal](https://vrm.victronenergy.com/) From 9af825e12526bf3f29a039bfd251061f060382a2 Mon Sep 17 00:00:00 2001 From: NANI Date: Fri, 25 Apr 2025 18:43:20 +0000 Subject: [PATCH 2/3] Addressed nits and issues --- source/_integrations/vrm_forecasts.markdown | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/_integrations/vrm_forecasts.markdown b/source/_integrations/vrm_forecasts.markdown index f4ab019b9eba..9c52daa7e018 100644 --- a/source/_integrations/vrm_forecasts.markdown +++ b/source/_integrations/vrm_forecasts.markdown @@ -14,7 +14,7 @@ ha_platforms: ha_integration_type: service --- -The Victron VRM Forecasts integration pulls solar production and consumption forecasts from [Victron Energy](https://www.victronenergy.com/) VRM portal into Home Assistant. It provides day-ahead and next-hour estimates for both production and consumption, plus peak-time predictions. Forecast data is available once you have at least 30 days of historical data in your VRM installation. The integration uses the VRM REST API (v2) and leverages Home Assistant’s sensor platform to expose forecast values directly in the Energy dashboard and as individual sensors for automation and visualization. +The Victron VRM Forecasts integration pulls solar production and consumption forecasts from [Victron Energy](https://www.victronenergy.com/) VRM portal into Home Assistant. It provides day‑ahead, next‑hour, and six‑day outlooks for both production and consumption, plus peak‑time predictions. It fetches forecasts from the day before, today, next hour, tomorrow, and provides six-day outlooks once you have at least 30 days of VRM history. --- @@ -24,11 +24,12 @@ The Victron VRM Forecasts integration pulls solar production and consumption for - **At least 30 days of data** in VRM before forecasts appear. - **VRM access token** (keep this secret!). Create one in the VRM Portal at **Preferences → Integrations → Access tokens** or use [this link](https://vrm.victronenergy.com/access-tokens). - **VRM Site ID**: found under **Settings → General** in your site’s VRM Portal page. -{% important %}Your VRM access token grants full access to your VRM portal, including system control and data retrieval. Treat it like a password: +{% hint style="important" %} +Your VRM access token grants full access to your VRM portal, including system control and data retrieval. Treat it like a password: - Do not share it. - Rotate it immediately if you suspect compromise. -{% endimportant %} +{% endhint %} --- @@ -36,6 +37,10 @@ The Victron VRM Forecasts integration pulls solar production and consumption for --- +## Data updates + +The Victron VRM Forecasts fetches fresh data from the VRM API every 60 minutes. + ## Sensor Entities ### Solar Production Forecast @@ -79,6 +84,8 @@ The Victron VRM Forecasts integration pulls solar production and consumption for - **No sensors**: Confirm you completed the UI flow and see no errors in logs. - **Forecasts not available**: Verify you have ≥30 days of VRM data. - **Invalid auth**: Regenerate your token in VRM Portal and update the integration. +- **Token expired or insufficient scopes**: Ensure your access token is still valid and includes the required scopes (read:forecast, read:site). +- **API errors in Home Assistant logs**: Inspect `home-assistant.log` for VRM API fetch errors (timeouts, 401/403 responses) to pinpoint connectivity or permission issues. - **Site not found**: Make sure you've entered the correct site/installation ID. --- From 67e3a16f23900734326dd5071726721f62f5fa99 Mon Sep 17 00:00:00 2001 From: NANI Date: Fri, 25 Apr 2025 18:50:11 +0000 Subject: [PATCH 3/3] Fixed important hint --- source/_integrations/vrm_forecasts.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_integrations/vrm_forecasts.markdown b/source/_integrations/vrm_forecasts.markdown index 9c52daa7e018..5d5d6178472e 100644 --- a/source/_integrations/vrm_forecasts.markdown +++ b/source/_integrations/vrm_forecasts.markdown @@ -24,12 +24,12 @@ The Victron VRM Forecasts integration pulls solar production and consumption for - **At least 30 days of data** in VRM before forecasts appear. - **VRM access token** (keep this secret!). Create one in the VRM Portal at **Preferences → Integrations → Access tokens** or use [this link](https://vrm.victronenergy.com/access-tokens). - **VRM Site ID**: found under **Settings → General** in your site’s VRM Portal page. -{% hint style="important" %} +{% important %} Your VRM access token grants full access to your VRM portal, including system control and data retrieval. Treat it like a password: - Do not share it. - Rotate it immediately if you suspect compromise. -{% endhint %} +{% endimportant %} --- @@ -39,7 +39,7 @@ Your VRM access token grants full access to your VRM portal, including system co ## Data updates -The Victron VRM Forecasts fetches fresh data from the VRM API every 60 minutes. +The Victron VRM Forecasts integration fetches fresh data from the VRM API every 60 minutes. ## Sensor Entities