question

Lucian Popescu (Victron Energy Staff) avatar image

Weather controlled Minimum discharge SOC example using Node-red

I have an interesting NodeRed project - based on next day weather, it is changing the minimum discharge SOC on the GX device. So if next day it is sunny, it will configure the SOC to a lower level, if it is cloudy it is increasing the SOC. At this moment I have only 4 levels, but it can be improved. How I'm doing this - you need to create a free account on https://openweathermap.org. After doing that use the API generated on that site, put it in the openweathermap node, add your city name or coordinates, and you will receive the details for the next 5 days. I'm looking only at next day, between 9AM-6PM and the value used is called visibility. Having the average value for next day, the system will decide (every day at 3PM) how the SOC should be for the next 24h. There are lots of things that can be added. If you need any other info, you can ask. Or if you have something similar, please share.


1614717003000.png


1614716969599.png



Node-REDSOC
1614716969599.png (25.1 KiB)
1614717003000.png (34.1 KiB)
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

lucode avatar image lucode commented ·
I would appreciate to get your flow code. I still have trouble with my flow.
0 Likes 0 ·
5 Answers
thomasw-1 avatar image
thomasw-1 answered ·

Hi Lucian,
Initially I started also with openweathermap using cloud- and UVI-index from hourly forecast with a projection between sunrise and sunset. Obviously the provided data are nice, but from my point of view a bit too unreliable. In many cases the effective weather was completely different than accounced.

1614727885419.png

In the moment I perform tests with Solcast.com. It delivers in for a 30 minute periode the estimated PV power generation (in KWh) in dependency of different parameters that you have configured in your PV profile at solcast. The service is free for 20 requests per day.1614727391771.png

First results are quite promissing and solution easy to implement. The complexity for predication is reduced a lot.

1614728444642.png

Currently I have so much PV-power available, so that the project-tuning is currently on hold.
I have some higher priorities to solve.



1614727391771.png (6.5 KiB)
1614727885419.png (6.0 KiB)
1614728444642.png (11.3 KiB)
1614727047732.png (7.3 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

lucode avatar image
lucode answered ·

I'm working on a similar solution, but with Node Red on Home Assistant. @ThomasW. thanks for the tip about Solcast. Very helpful service indeed. As I'm still learning using Node Red I would appreciate if you could share your flow code here? I can share my solution soon hopefully.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thomasw-1 avatar image thomasw-1 commented ·

Hi @lucode ,

my current priority related to PV projects is currently refining a P2H-control (1.500 liter boiler with 9.000W heater).

Therefore the weather forecast project is currently on hold.

I think it will be relaunched and completed in September latest, when PV production is reduced again and I am more dependent on weather outlook.

0 Likes 0 ·
Petr P avatar image Petr P thomasw-1 commented ·
Hi there,

it looks really promising would you be so kind and share your flow? I would like to implement it as well.

Thank you

0 Likes 0 ·
lucode avatar image
lucode answered ·

ok I finished my own flows and controls in Home-Assistant with node-red. As it is a bit a different kind of setup then the topic of this post I created another one.
https://community.victronenergy.com/questions/107655/weather-forecast-controlled-minimum-soc-setpoint-u.html

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

fish avatar image
fish answered ·

I'm really interested in doing this but having started at looking into it can someone confirm whether:

I can use just node red running on Cerbo to take forecast API data from Solcast and set the appropriate SOC level for my batteries to charge in a scheduled charge window.

It's all very new and alien to me but wondered if someone can confirm if this is doable and any help in mentoring me would be appreciated.

I wanted to avoid having to run Home Assistant etc and just deal with node red and a flow to amend the charge SOC in a nightly charge window.

It does look like a mash up of some flows I have found?

Cheers

James


1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mouthisi avatar image mouthisi commented ·
Having just begun to look at NR/solcast today, I'm wondering the same on my cerbo: it's not able to write to file, but hoping that's my fault and not a limitation of the cerbo.


NR otherwise fantastically intuitive and useful. Cheers Victron for enabling the extended functionality!


Looking forward to an answer to your question.


Hal

0 Likes 0 ·
h8mecz avatar image
h8mecz answered ·

Hello, does anyone implemented this flow with PV yield forecast from Victron API?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.