# Solar Forecast PV

**URL:** <https://community.openhab.org/t/solar-forecast-pv/137681>\
**Category:** Bundles\
**Tags:** binding, stable, published\
**Created:** [July 27, 2022, 7:09pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681 "2022-07-27T19:09:21Z")\
**Posts on this page:** 20\
**Page:** 16

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [February 4, 2025, 10:55am UTC](https://community.openhab.org/t/solar-forecast-pv/137681/303 "2025-02-04T10:55:26Z")

</div>

Hi @ollo ,

from your questions I assume we’re talking about different persistences. This change stores the raw forecast data in jsondb `/var/lib/openhab/jsondb/solarforecast.json`. This has nothing to do with item persistence. To make it more clear let’s check the use case openhab restart

**Current released version**

1. Binding startup - 2 API calls to get solcast data
2. TimeSeries items updated _only with future forecast data_  
a) In case of `InMemory` persistence past data is lost! Future data is updated  
b) In case of `InfluxDB` past & future is persitet in database

**Marketplace version**

1. Binding startup - restore solcast data from jsondb = zero API calls!
2. same behavior as before

> [@ollo](#):
>
> may I suggest to (initially) pull historic data for (at least) the current day at startup?!

What do you mean exactly with **startup**?  
Do you really mean **openhab restart** or **start of the day**?  
If you mean openhab restart it’s described as above - InMemory will loose all it’s past data competely. That’s more than a gap.  
If you mean start of the day there will be no gaps at all.

---

<div class="post-metadata">

**Author:** ![ollo](https://community.openhab.org/letter_avatar_proxy/v4/letter/o/5daacb/32.png) [@ollo](https://community.openhab.org/u/ollo)\
**Post date:** [February 4, 2025, 2:57pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/304 "2025-02-04T14:57:20Z")

</div>

Hi Bernd,

thanks for explaining. I was not aware about the possibility of storing data in jsondb. This certainly helps to regain current data.

With restart I indeed mean OH restart where all InMemory data is gone. If it can be restored from jsondb, great. What is the system was down for multiple days so the data stored in jsondb “expired”? I’m asking for a way to get the data for the full current day in case the is no data available locally.

BTW, historic data is persisted in rrjd4 in my case as all Items get persisted by default.

Let me try the Marketplace version and play with it.

Thanks!

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [February 4, 2025, 10:26pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/305 "2025-02-04T22:26:27Z")

</div>

> [@ollo](#):
>
> What is the system was down for multiple days so the data stored in jsondb “expired”?

In this case 2 API calls will be performed. This is the only scenario where I cannot _“guess the actuals”_ This scenario only occurs if the system is down for more than 7 days.

> [@ollo](#):
>
> I’m asking for a way to get the data for the full current day in case the is no data available locally.

There’s always the full day available. You can check this with the rule actions [getForecastBegin](https://github.com/weymann/OH3-SolarForecast-Drops?tab=readme-ov-file#getforecastbegin) and [getForecastEnd](https://github.com/weymann/OH3-SolarForecast-Drops?tab=readme-ov-file#getforecastend). Note: It’s showing UTC date time, not your local date time. You can execute them via UI which is quite handy!

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/f/2/f265932a15f64d56d0b92a9c0689e296429c0fd8.png)

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [February 16, 2025, 12:00am UTC](https://community.openhab.org/t/solar-forecast-pv/137681/306 "2025-02-16T00:00:00Z")

</div>

I would interpret the silence in this thread as **“good news”** and would prepare a pull request with these changes for the next release.

Happy with that?

---

<div class="post-metadata">

**Author:** ![pjgregory](https://community.openhab.org/letter_avatar_proxy/v4/letter/p/6f9a4e/32.png) [@pjgregory](https://community.openhab.org/u/pjgregory)\
**Post date:** [February 20, 2025, 3:56pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/307 "2025-02-20T15:56:50Z")

</div>

Hi

Yesterday, I installed your Solar Forecast PV binding from the market place. I then created a Hobby account for Solcast, got my API and Roof id and the binding worked. This morning I found that it had stopped sometime during the night owing to too many requests.

After finding this thread, I upgraded by OpenHabian 4.0 to the the latest 4.3.2 and installed the .JAR version given at the top of the thread. I have recreated the Solcast Site and Solcast PV Plane things but they are currently showing “Not Yet Ready” and “Error:Coms” as a direct call to the url from the Solcast site still gives “Too many requests”.

Assuming this clears tomorrow (does the counter reset at any specific time?), I still cannot see how to use the information. When it was working yesterday, I managed to import the Actual, Remaining and Total Energy values into my model. Are these values related to the current day with Actual being what I should have generated each time the data is accessed (150mins) etc. ?

What I would like to have is a set of forecasts of the energy available for each of the next 6 hours ahead so that I can proactively manage a number of loads such as EV charger, Pool pump, Washing machine etc. to maximize the amount of electricity I use in house rather than supplying to the grid. Is this possible with this binding?

PJG

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [February 20, 2025, 11:25pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/308 "2025-02-20T23:25:58Z")

</div>

Sure, if you’ve installed on older version you’ll run quickly out of the call budget restricted to 10 calls per day per PV plane.

> [@pjgregory](#):
>
> Assuming this clears tomorrow (does the counter reset at any specific time?),

Budget is resetted by Solcast for all users at 0:00 UTC. It’s described in readme and shown as tooltip on the item.

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/1/5/157076bbc7dab458f94ff08bd1bbf49350f2abce.png)

> [@pjgregory](#):
>
> Are these values related to the current day with Actual being what I should have generated each time the data is accessed (150mins) etc. ?

Hopefully this is also well described in [readme](https://github.com/weymann/OH3-SolarForecast-Drops?tab=readme-ov-file#solcast-channels).

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/f/e/fef9cdb9fc04e5027e07d5e5430daa02b5b0a3ac.png)  
While the _green_ highlighted channels are showing actual/today values the `blue` channels are showing the future. You can visualize them [using this tutorial](https://community.openhab.org/t/displaying-the-weather-forecast-with-charts-openweathermap/156348).  
 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/7/7/77394e73facab3c2cbb3ad69f87f3416516c069f.png)  
The items attached to channels are nice to create a dashboard and graphs but I personally don’t use them for calculations.

> [@pjgregory](#):
>
> What I would like to have is a set of forecasts of the energy available for each of the next 6 hours ahead so that I can proactively manage a number of loads such as EV charger, Pool pump,

Now let me forward you to the [rule action section of readme](https://github.com/weymann/OH3-SolarForecast-Drops?tab=readme-ov-file#getenergy) and the corresponding [examples](https://github.com/weymann/OH3-SolarForecast-Drops?tab=readme-ov-file#actions-rule-with-arguments).

You can easily transform the example into _ **next 6 hours energy forecast** _ adapting the `endTimestamp`. Feel free to define start point, end point and duration of your energy query.

```auto
 // Query forecast via Actions
val solarforecastActions = getActions("solarforecast","solarforecast:sc-site:homeSite")
val startTimestamp = Instant.now
val endTimestamp = Instant.now.plus(6, ChronoUnit.HOURS)
val sixHourForecast = solarforecastActions.getEnergy(startTimestamp,endTimestamp)
logInfo("SF Tests","Forecast Average 6 hours "+ sixHourForecast )

```

---

<div class="post-metadata">

**Author:** ![pjgregory](https://community.openhab.org/letter_avatar_proxy/v4/letter/p/6f9a4e/32.png) [@pjgregory](https://community.openhab.org/u/pjgregory)\
**Post date:** [February 21, 2025, 11:38am UTC](https://community.openhab.org/t/solar-forecast-pv/137681/309 "2025-02-21T11:38:49Z")

</div>

Hi Bernd

Thank you for your quick reply. I have found the new documentation on the readme link you posted to GitHub. I will look at it later today. In the meantime, my system started working this morning. At the moment, I am only looking at the average values. Actual, Remaing and Total Energy together with Actual Power give sensible values. Energy Forecast, Power Forecast and latest update all show NULL.

The API Request Count is {“200”:6,“other”:0,“429”:1}, so the binding has made 6 requests from 8:30 till 11:45 am this morning when I reinstalled the new binding. The graph of the Energy values shows that they are being updated very 30min, not the 150min set as default in the Solar PV plane thing. Why is the binding making so many requests? I expect it will stop working soon.

PJG

 ![30min Forecasts](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/4/b/4b0fea8c371fa6b7aedfac3ca0fca0cfb077cac8.jpeg)

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [February 23, 2025, 9:52pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/310 "2025-02-23T21:52:44Z")

</div>

Please enable `TRACE` log level to check the `sc-plane` updates.

---

<div class="post-metadata">

**Author:** ![stfn82](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stfn82](https://community.openhab.org/u/stfn82)\
**Post date:** [March 7, 2025, 9:47am UTC](https://community.openhab.org/t/solar-forecast-pv/137681/311 "2025-03-07T09:47:10Z")

</div>

I noticed a typo in your “Latest Update” channel:

![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/2/d/2de55b8d77e8dbc424909412e14bf3faab1f780a.png)

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [March 7, 2025, 2:22pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/312 "2025-03-07T14:22:58Z")

</div>

Thanks, I’ll fix this quickly

---

<div class="post-metadata">

**Author:** ![jlikonen](https://community.openhab.org/letter_avatar_proxy/v4/letter/j/ee59a6/32.png) [@jlikonen](https://community.openhab.org/u/jlikonen)\
**Post date:** [March 24, 2025, 6:43pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/313 "2025-03-24T18:43:08Z")

</div>

I’m also having problems with calculation of tomorrow’s forecast. I have looked at the discussion above but still the rule is not running.

My rule is:

```auto
configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: ForecastSolar_Site_Todays_Energy_Forecast
    type: core.ItemStateUpdateTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      type: application/vnd.openhab.dsl.rule
      script: >-
                  
        val solarforecastActions =
        getActions("solarforecast","solarforecast:sc-site:homeSite:1d1d6127c4")

        val energyState =
        solarforecastActions.getEnergyOfDay(LocalDate.now.plusDays(1))

        Solcast_Site_Tomorrow.postUpdate(energyState as Number)
          
        val solarforecastActions1 =
        getActions("solarforecast","solarforecast:sc-site:homeSite:1d1d6127c4")

        val energyState1 =
        solarforecastActions1.getEnergyOfDay(LocalDate.now.plusDays(2))

        Solcast_Site_DayAfterTomorrow.postUpdate(energyState1 as Number)
          
        logInfo("SF Tests","{}",energyState as Number)
    type: script.ScriptAction

```

and in the log file I have the following error:

```auto
2025-03-24 20:32:43.337 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID '1bb9dfb927' failed: 
  
val solarforecastActions = getActions("solarforecast","solarforecast:sc-site:homeSite:1d1d6127c4")
val energyState = solarforecastActions.getEnergyOfDay(LocalDate.now.plusDays(1))
Solcast_Site_Tomorrow.postUpdate(energyState as Number)
  
val solarforecastActions1 = getActions("solarforecast","solarforecast:sc-site:homeSite:1d1d6127c4")
val energyState1 = solarforecastActions1.getEnergyOfDay(LocalDate.now.plusDays(2))
Solcast_Site_DayAfterTomorrow.postUpdate(energyState1 as Number)
  
logInfo("SF Tests","{}",energyState as Number)
   1. The method getEnergyOfDay(LocalDate) is undefined for the type ThingActions; line 4, column 194, length 14
   2. The method getEnergyOfDay(LocalDate) is undefined for the type ThingActions; line 8, column 436, length 14

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [March 25, 2025, 3:23pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/314 "2025-03-25T15:23:03Z")

</div>

Maybe you run version smaller than OH 4.3?

There’s a change of ThingAction names from [4.2.x (getDay)](https://v42.openhab.org/addons/bindings/solarforecast/#getday) to [4.3.x (getEnergyOfDay)](https://www.openhab.org/addons/bindings/solarforecast/#getenergyofday).

---

<div class="post-metadata">

**Author:** ![jlikonen](https://community.openhab.org/letter_avatar_proxy/v4/letter/j/ee59a6/32.png) [@jlikonen](https://community.openhab.org/u/jlikonen)\
**Post date:** [March 25, 2025, 6:36pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/315 "2025-03-25T18:36:25Z")

</div>

@weymann. Yes, this did the trick. For some reason I had 4.2.0 jar file. Many thanks for your help.

I removed the binding and reinstalled it. Now for some reason the channel lists for Solcast Site, Solcast PV plane, Forecast Site and Forecast PV plane are empty, see e.g. the screen copy for Solcast Site

 ![Capture](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/0/b/0b46b1ebe3941541c569da3ff077b7c24f9e5ad0.png)

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [March 25, 2025, 7:41pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/316 "2025-03-25T19:41:20Z")

</div>

> [@jlikonen](#):
>
> @weymann. Yes, this did the trick. For some reason I had 4.2.0 jar file. Many thanks for your help.
> 
> I removed the binding and reinstalled it.

Okay, but if’s working why do you reinstalled the bundle? Bindings are mostly coupled with the running OH version because there are dependencies.  
Any trace output after reinstalling the binding?

For analysis which OH version do you run and which binding version (Marketplace, official version/ addons folder) did you install?

---

<div class="post-metadata">

**Author:** ![jlikonen](https://community.openhab.org/letter_avatar_proxy/v4/letter/j/ee59a6/32.png) [@jlikonen](https://community.openhab.org/u/jlikonen)\
**Post date:** [March 25, 2025, 8:08pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/317 "2025-03-25T20:08:55Z")

</div>

I’m running OH4.3.3. and for some reason I had 4.2.0 jar file in the addons folder. I deleted this file and then I restarted OH. When I looked at the Add-on Store Solarforecast binding was not installed so I installed the binding under Add-on Store.

---

<div class="post-metadata">

**Author:** ![jlikonen](https://community.openhab.org/letter_avatar_proxy/v4/letter/j/ee59a6/32.png) [@jlikonen](https://community.openhab.org/u/jlikonen)\
**Post date:** [March 27, 2025, 1:39pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/318 "2025-03-27T13:39:34Z")

</div>

I managed to solve this problem. I just deleted the Solarforecast Items and recreated them. Everything is now working.

---

<div class="post-metadata">

**Author:** ![stfn82](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stfn82](https://community.openhab.org/u/stfn82)\
**Post date:** [March 27, 2025, 5:35pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/319 "2025-03-27T17:35:48Z")

</div>

![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/1/4/14a3b895f5adda70972c23948ed771228c66937a.jpeg)

It looks like the forecast (orange) is running +1h compared to my actual production (blue). This is SolcastHomeAveragePowerEstimate.

I’ve check my timezone in OH, it’s set correctly to GMT +1.

### Solcast Bridge Configuration

| Name | Type | Description | Default | Required | Advanced |
| --- | --- | --- | --- | --- | --- |
| apiKey | text | API Key | N/A | yes | no |
| timeZone | text | Time Zone of forecast location | empty | no | yes |

What format does ‘timeZone’ take?

---

<div class="post-metadata">

**Author:** ![jlikonen](https://community.openhab.org/letter_avatar_proxy/v4/letter/j/ee59a6/32.png) [@jlikonen](https://community.openhab.org/u/jlikonen)\
**Post date:** [April 3, 2025, 3:48am UTC](https://community.openhab.org/t/solar-forecast-pv/137681/320 "2025-04-03T03:48:33Z")

</div>

I’m having again some issues with this great binding. For some reason my forecast data is not persisted in InfluxDB any more. I have checked that my other Items are persisted correctly and my influxdb.persist file has the Solcast Items. My both Things (Solcast Site and Solcast PV Plane) are online. Any ideas?

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [April 3, 2025, 2:00pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/321 "2025-04-03T14:00:27Z")

</div>

> [@stfn82](#):
>
> It looks like the forecast (orange) is running +1h compared to my actual production (blue).

From the graph showing a week it’s hard for me to see a 1 hour drift. Can you please zoom in into the graph, espacially showing which time the forecast starts and which time the forecast ends?

---

<div class="post-metadata">

**Author:** ![weymann](https://community.openhab.org/user_avatar/community.openhab.org/weymann/32/90673_2.png) [@weymann](https://community.openhab.org/u/weymann)\
**Post date:** [April 3, 2025, 2:11pm UTC](https://community.openhab.org/t/solar-forecast-pv/137681/322 "2025-04-03T14:11:39Z")

</div>

> [@jlikonen](#):
>
> I just deleted the Solarforecast Items and recreated them. Everything is now working.

In your previous post you deleted items and recreated them. Please double check if the new items are still configured to be persisted into influxdb.  
Don’t know how you configured this. Maybe in a influxdb group or items directly configured in influxdb binding?

[Previous page](https://community.openhab.org/t/solar-forecast-pv/137681.md?page=15)

[Next page](https://community.openhab.org/t/solar-forecast-pv/137681.md?page=17)
