# Ideas about solar production forecasting

**URL:** https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168
**Category:** General
**Created:** [8 July 2021 05:48 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168 "2021-07-08T05:48:44Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [8 July 2021 05:48 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/1 "2021-07-08T05:48:44Z")

</div>

Hi folks,

HomeAssistant had a new release yesterday, and one of their new features is _ **solar production forecasting** _ (see [here](https://www.home-assistant.io/integrations/forecast_solar/)). Which is some of those things that immediately gets my attention ...

It is based on the [https://forecast.solar](https://forecast.solar/) cloud service, which offers a free and payable account (with higher resolution). Calling the service is nothing more than executing a http-request:

```auto
https://forecast.solar/<your-API-key>/estimate/54.9/25.3/37/0/1

```

I wanted to share it because I thought it might be interesting for some users.  
But I also have some questions about this:

1. Are there other ways to do this?
2. Has anybody already used this or another way? And what are the experiences?
3. You can simply use a http-request node to call this service. But I was wondering if it would be useful to create a _ **node-red-contrib-solar-forecast** _ node? Not sure at the moment what could be the added value of such a node. So if somebody has some creative ideas, please share it here!

Thanks!!  
Bart

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [8 July 2021 07:23 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/2 "2021-07-08T07:23:11Z")

</div>

Bart,

In the past i have used Solcast for this - but they recently dropped their system that allowed you to backfeed your results into their system and hence train it on your realworld system.

I have been through a few others looking for something better and the best i have found so far is

> **[krywenko/Prediction](https://github.com/krywenko/Prediction)**
>
> Contribute to krywenko/Prediction development by creating an account on GitHub.

The Author - Stephen is incredibly responsive and he hangs out on the OpenEnergy Monitor Forum.

> **[Script for predictive solar output](https://community.openenergymonitor.org/t/script-for-predictive-solar-output/17038)**
>
> hi there not sure who would be interested in my predictive script for solar output you need to install – https://pysolar.org/ pip install pysolar in the script called cloudcover is where you enter your location variables longitude,latitude,...

If you follow his thread you will see how he has evolved his system and his responses to questions i have asked etc.

I am still in the playing around with it stage (and as i am not a Python Developer) everything is very slow going - but getting there !!

Craig

---

<div class="post-metadata">

### Author: ![FireWizard52](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/firewizard52/32/34508_2.png) [@FireWizard52](https://discourse.nodered.org/u/FireWizard52)
#### Post date: [8 July 2021 14:48 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/3 "2021-07-08T14:48:14Z")

</div>

Hello @BartButenaers

Interesting idea, but are you aware that a similar node already exists for Node Red.  
See: [node-red-contrib-solar-power-forecast (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-solar-power-forecast)

However I do not use this node, as I use for approx 2 years forecast.solar.  
I use simple http access to [https://api.forecast.solar](https://api.forecast.solar)

The output is in some respect somewhat complex and it will require some parsing.  
See the picture below:

 ![Screenshot_solar-forecast](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/f/8f2fe0b5c1b5235e73defd3cab9527cf9e16da7d.png)

As I use Domoticz and not Home Assistant, I got from someone a dzVents script, which does exactly the same .

But is it useful? Honestly I do not often look to it.  
Example the currently estimated energy is: 9,444 kWh and the real generated energy is: 9,316 kWh. So this time quite accurate, but sometimes it deviates 50%.

Summing up:  
Yes it works, but the practical use??

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [8 July 2021 15:18 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/4 "2021-07-08T15:18:38Z")

</div>

> [@FireWizard52](#):
>
> are you aware that a similar node already exists for Node Red

Hi @FireWizard52 ,  
Thanks for joining! Yes I had seen that node. But its last npm update is 5 years and 9 months ago. So not really actively developed...

> [@FireWizard52](#):
>
> sometimes it deviates 50%

Ah that is a pitty... I had hoped it would be a bit accurate.

> [@FireWizard52](#):
>
> but the practical use?

I would like to do some experiments with scheduling electrical appliances, so then it 'might' become useful. But perhaps not...

> [@FireWizard52](#):
>
> The output is in some respect somewhat complex and it will require some parsing.

That "could" perhaps be a reason to build a custom node...

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [8 July 2021 18:17 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/5 "2021-07-08T18:17:14Z")

</div>

I'm sure `solar production forecasting` has a use, but I can't really think of one that has any degree of accuracy.  
The calculation should be accurate provided that there are no passing clouds, mists, rain, snow, or anything else that would even temporarily impede sunlight.

This is the effect that clouds had on my solar production yesterday;

![solar](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1cec13f442a8c940da0707477f9c157cbcdaf49c.jpeg)

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [8 July 2021 19:28 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/6 "2021-07-08T19:28:40Z")

</div>

> [@Paul-Reed](#):
>
> passing clouds, mists, rain, snow, or anything else that would even temporarily impede sunlight

Ah ok, I (incorrectly) assumed that this kind of stuff was somehow already integrated into the forecast. Then it becomes complex again ...

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [8 July 2021 19:37 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/7 "2021-07-08T19:37:31Z")

</div>

Although I already have solar monitoring, I keep getting tempted to order & play with the PZEM-004T modules...

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [8 July 2021 19:39 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/8 "2021-07-08T19:39:06Z")

</div>

Like when they say 30% chance of rain… does it mean it will rain for 30% of the time, or the chance of getting wet in a particular location is 30% ?

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [8 July 2021 19:58 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/9 "2021-07-08T19:58:49Z")

</div>

> [@Paul-Reed](#):
>
> play with the PZEM-004T

Paul, not sure how that PZEM-004T module is related to solar production forecasting?

> [@dceejay](#):
>
> Like when they say 30% chance of rain…

I find it very strange that this kind of calulations isn't part of such a cloud service. The above comments absolutely make sense, but when the data is that bad I don't understand how those cloud services find any customers that are willing to pay for it...

---

<div class="post-metadata">

### Author: ![Jan\_Coopman](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jan\_Coopman](https://discourse.nodered.org/u/Jan_Coopman)
#### Post date: [8 July 2021 19:59 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/10 "2021-07-08T19:59:42Z")

</div>

Hi, i was very interested in this solution and tried it immediatly but bounced on following parsing problem:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/469c7f329ebaa381ed9ddb0953a82c06279212a8.png)  
since I'm only interested in the total 'day' value, i would like to take this value by typing: result.watt\_hours\_day.2021-07-08 but this doesn't work off course. How does one solve this?

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [8 July 2021 20:15 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/11 "2021-07-08T20:15:44Z")

</div>

> [@BartButenaers](#):
>
> not sure how that PZEM-004T module is related to solar production forecasting?

Well, you could put the PZEM-004T CT clamp on the feed from the solar panels, and monitor production in real time, with a degree of accuracy.  
Then you could use that as an indicator when to run appliances in your home.

For example - [https://www.youtube.com/watch?v=WJtNEPrSSvg](https://www.youtube.com/watch?v=WJtNEPrSSvg)

---

<div class="post-metadata">

### Author: ![FireWizard52](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/firewizard52/32/34508_2.png) [@FireWizard52](https://discourse.nodered.org/u/FireWizard52)
#### Post date: [8 July 2021 20:30 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/12 "2021-07-08T20:30:34Z")

</div>

Hello @Jan_Coopman,

You should use:

> msg.payload.result.watt\_hours\_day["2021-07-08"]

In this case, you will have the value and you can continue.

Regards

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [9 July 2021 03:21 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/13 "2021-07-09T03:21:32Z")

</div>

Yes the script i linked to allows you to train it over time (as did the old Solcast API) - the idea being that it learns how far from a perfect solution your setup is.

Yes there will be some variation as to the accuracy of the forecast - but as an example a number of the services return information about % of cloud cover at various heights - and they will do this on an hourly basis.

There is a very good thread on this forum from one of the other members where he shows the effectiveness/accuracy of the Solcast model once it has been trained against your realworld system.

The benefit of these types of systems (if you can get them accurate) is to be able to schedule various load at different times of the day

I know for instance that the default cycle for my dishwasher takes 3 hours - it uses very little (comparatively) electricity anywhere in the first two hours of the cycle, in the last hour quite a bit more because of the hot rinse and then drying cycle.

I would usually turn this on at 9am - knowing my peak solar is from 11AM to 2:30PM in winter, but in the case of a couple of days last week - my solar forecast said that i would get poor production at that time due to predicted cloud cover, so instead we put the machine on at 7AM.

Same with things such as the pool pump, usually comes on at 11:30 to 1:30 in winter - but due to low Solar forecast for today (but better for tomorrow) - my system has bypassed the pool pump running today - but currently scheduled to run for 4 hours tomorrow.

Craig

---

<div class="post-metadata">

### Author: ![Jean-Luc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jean-luc/32/89996_2.png) [@Jean-Luc](https://discourse.nodered.org/u/Jean-Luc)
#### Post date: [9 July 2021 20:45 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/14 "2021-07-09T20:45:02Z")

</div>

This is a very interesting subject.  
I have a comment. The solar panels provide DC current, but this PZEM-004T module is made to measure AC current if I understood.  
So it should work if you have mini inverters on each solar panel.  
Moreover, some inverters (hybrid without injection of current in the grid) provide only what the consumer (the electrical load requested by the house) asks at a moment T, but not more.  
This makes it very difficult to know how much your solar panels would be able to provide at each moment.  
One way would be to switch on consumers via home automation, but you have to be able to stop before the power supplied is not enough anymore. This is complicated.

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [9 July 2021 22:59 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/15 "2021-07-09T22:59:02Z")

</div>

> [@Jean-Luc](#):
>
> provide only what the consumer (the electrical load requested by the house) asks at a moment T, but not more.

Not so with most PV installs in the UK.  
Usually, the electrical load requested by the house is given priority, but if there is excess is sold back to the grid, so nothing that the panels generated is wasted, and the inverters always run at 100%.  
So it makes it easy to measure the inverter output with a PZEM-004T, to determine what power is currently being generated.

I understand that is not the case in all countries.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [10 July 2021 04:00 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/16 "2021-07-10T04:00:47Z")

</div>

And the same here in Australia - although in some locations houses are exported limited.

If you want ultimate visibility on your whole house power consumption - have a look at the IOTAWATT - it provides 14 channels of monitoring and can be queried through a simple rest interface or can output to various locations such as influx etc

Craig

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [10 July 2021 05:54 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/17 "2021-07-10T05:54:02Z")

</div>

Thanks to everybody already for joining this discussion. I learned a lot from it already.

I have two major questions at the moment:

1. Is it correct that such cloud services only do a calculation of the sun's angle relative to the inclination and orientation of the solar panels? But they don't provide other information that is required to have good solar production (like e.g. cloud percentage and so on...)? Thanks to @Paul-Reed to provide me his thoughts about this!

2. I would love to have some ideas to create a useful node for this, to make sure it has advantages compared to a simple http-request node to call this cloud service.

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [10 July 2021 08:12 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/18 "2021-07-10T08:12:29Z")

</div>

> [@BartButenaers](#):
>
> Is it correct that such cloud services only do a calculation of the sun's angle relative to the inclination and orientation of the solar panels?

I looked into this some years ago whilst with [openenergymonitor.org](http://openenergymonitor.org), but things appear to have moved on somewhat since I last looked...

Since you raised this topic, I've been looking at [Solcast](https://solcast.com/) (which Craig mentioned above) which appears to also take into account atmospheric conditions as well as the relationship between solar panels and the sun's azimuth.  
They have a free tier, and I'm in the process of setting up a flow to compare Solcast's forecasts, with actual data, to see if there is a comparison.

![solar](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c331ac7eebcc49f503a6ef61f80fc0ee1a2133ba.jpeg)

---

<div class="post-metadata">

### Author: ![Jean-Luc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jean-luc/32/89996_2.png) [@Jean-Luc](https://discourse.nodered.org/u/Jean-Luc)
#### Post date: [10 July 2021 10:11 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/19 "2021-07-10T10:11:23Z")

</div>

In France, everything is very complicated at the administrative level with the state electricity supplier.  
If you want to produce without going through them, you have to be in self-consumption. And it's a pity because it's forbidden to send power to the Grid ☹  
On my inverter, there was no software provided for the follow-up, just a small LCD screen. But there is a serial communication port 🙂  
As a result, I was able to develop a software suite that allows you to monitor but also to act on the parameters of the inverter live.  
If you want to see what it looks like →[here](https://youtu.be/_FttuSWLpbk)  
And guess what, without being a programmer at all, I was able to achieve all this thanks to **NodeRed** and this **forum**. It's really a wonderful tool for everyone to use!!! 🌟

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [10 July 2021 11:28 UTC](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168/20 "2021-07-10T11:28:13Z")

</div>

> [@Jean-Luc](#):
>
> If you want to see what it looks like

Wow! very impressive!  
You've done a great job.

[Next page](https://discourse.nodered.org/t/ideas-about-solar-production-forecasting/48168.md?page=2)
