Using the API with node-red (and influxDB, Grafana)


Hi Folks,

just registered to say thank you for providing the rooftop service.
I am a new owner of a single rooftop but with solar modules oriented towards East & West and with different numbers on each side.
Using your PV-Tuning service, feeding measurements I now get real nice forecasts and estimates for my site (originally created in South orientation).

I integrated your API-service into my local setup by using node-red with influxDB and Grafana.
Hers’s a writeup I did, for others to (re.)use and adopt, over in the node-red forum:

thanks again and keep up the good work!



Welcome to the community. I’m afraid that it’s not the liveliest place. :wink:


:grin: yes, looks like you have a point there.
As long as the service is working without trouble, this can be see seen as a positive case, don’t you think? :rofl:

Besides, now two weeks in using the API on a regular basis, i found that the API service is not responding about 1 out of 10 tries, but still counting each try / access against the number of allowed API calls a day.
But with a free service, you cannot be too picky, I guess :innocent:

thank you for your reply…stay safe, these days.


I think the API limit applies to downloads only. I use it to create a schedule for the day ahead when my electricity prices are published so I’m nowhere near the daily limit unless I’m testing a software change.

I upload generation data every 5 minutes.


Yes, you are correct.
Uploading measurements does not count against the limit. I am using 5min intervals (PT5M) for measurements, but do upload data every hour (but I am able to inject / recreate an update with a different start/end-time anytime manually). If you resend data, it will simply be overridden, so no harm in doing so. I did not notice a difference to the pv-tuning algorithm, when using different uploading intervals.

I am still within the first allowance of 1000 calls and collecting forecasts multiple times a day. What I see is, as it is expected, that the forecasts do change throughout the day. My use case is for deciding on how to charge an EV (PV only or minimum load plus PV excess power) in order to maximise using available PV and charging the EV up to the desired point (SoC and Time) at the same time.
So I need a good forecast (which means gathered from short time in advance to the charging event) for early morning, afternoon/evening and the next early morning and so on.

I have build a retry in my API-calls function and will adjust the call intervals to leave some headroom for retries.

1 Like

Hi hominidae

I just created an acount for an API token a few minutes ago and reached my first hurdle, how to setup my home site - grr. My problem seems to be the same as yours. I have 10 x 300W panels facing North and 10 x 300W panels facing West. I am hoping you can help me get over the initial learning curve.

My initial use case is to simply monitor forecast vs actual to keep a check on performance. I may do some other things later. I don’t really understand what the site details are used for and therefore how important it is to get it as accurate as possible. I assume the site details need to be very accurate to get an accurate forecast. But, maybe if I push my actuals the system may learn what my site actually looks like over time. Did you set up your site pointing south and has the system learned? Thoughts?

BTW I already have my inverter data in influxDB so will take a similar approach to you to push and pull, however, rather than using NodeRed, I will probably write some python code to do the actual push and pull to the API.

Thanks in advance Steve


Hi Steve,

the forecasts will adjust, some days after you started to feed back your measurements.
For a site with a split setup in power-modules, the issue is to define a single set of parameters for azimuth and roof-tilt angle.
My suggestion for a setup, where modules are facing to two different sides, is to use the azimuth value from in between the two real values. In my case, having one side facing east and the other facing west, I choose an azimuth angel pointing south. Since my modules are distributed unevenly across the two sides, with 15% more capacity facing west, I adjusted the azimuth a little bit more towards west orientation (168 deg. instead of 180 deg). My tilt is the same for my roof sides, but if your case is different, I’d suggest to also adjust the value to one, more on the side where more power will be generated…your inverter most likely will give you some indication on the performance of each side, where the modules are installed.
But I actually don’t know if this approach will help the tuning algorithm at all… I just assumed, that this will at least do no harm :wink:

RE using python, I think there is a link to a lib for the solcast API here in the forums somewhere.

hope this helps…

1 Like

Hi Fred,

Thanks for that. I see your thinking and that makes sense. I have got plenty of data I can work with to be able to set the right bias across both arrays, so I will give that a try. I’ll look up the python lib.