Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: updated FC values only considered with instance restart - periodic calls fetch outdated values #176

Open
3 tasks done
n4pstarr opened this issue Oct 6, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@n4pstarr
Copy link

n4pstarr commented Oct 6, 2024

I'm sure that

  • This issue is still present in the current beta version of this adapter
  • There is no other (open) issue with the same topic (use the search!)
  • This issue is not described in the adapter documentation / FAQ (read the docs!)

Used integration

Solcast

The problem

Hi all,

with changing from Forecast.Solar to Solcast I'm first of all happy with the gain of preciceness of solar FC that Solcast offers.
But I'm suffering from forecast values not being updated.

Attached, you can see that the values showing in the log on 14:00 were updated to the objects already late in the morning (07:26 -I perform and instance restart at dawn as a small workaround already).

The CSV and JSON from toolkit.solcast.com.au contain updated values - different ones from the API call of the adapter.

As soon as I restart the instance, the values visible in the CSV/JSON are fetched and booked to the objects.
By only updating future values and initializing the ones of the past of the current day, this is no suitable option to get a proper daily sum.

Log:
grafik

Objects:
grafik

CSV:
grafik
(note: that's only one array (10.8 kWp) - the other one is very small (0.7 kWp) and can be ignore)

Log after instance restart:
grafik

Updated objects:
grafik

As a restart updates the values, a full consumption of API calls mustn't be the reason.

Thanks in advance 4 any help!

BR
Chris

iobroker.current.log (in debug mode!)

grafik

Version of nodejs

20.17.0

Version of ioBroker js-controller

6.0.11

Version of adapter

3.0.0

Copy link

github-actions bot commented Oct 6, 2024

Thanks for reporting a new issue @n4pstarr!

  1. Please make sure your topic is not covered in the documentation
  2. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue
  3. Search for the issue topic in other/closed issues to avoid duplicates!

Otherwise this issue will be closed.

@alx785
Copy link

alx785 commented Oct 15, 2024

@n4pstarr i don´t know why there is no automatic refresh when you chose solcast, like it is in forecast.solar but for me the following workaroud helps to get new data from the api:
use a script that cron´s the refresh button. That button is located in the service folder. Try not to refresh to often, because of the maximum count of calls per day. For me it works nice with a daily cron job from 7:00 till 19:00 every two hours.

image

@klein0r klein0r added the enhancement New feature or request label Oct 15, 2024
@klein0r
Copy link
Contributor

klein0r commented Oct 15, 2024

At the moment, the data is just fetched once a day:

ioBroker.pvforecast/main.js

Lines 241 to 244 in 3ef9743

if (this.config.service === 'solcast') {
this.reqInterval = moment().startOf('day').add(1, 'days').add(1, 'hours').valueOf() - moment().valueOf();
this.log.debug(`updateServiceDataInterval (solcast) - next service refresh in ${this.reqInterval}ms`);
}

The reason is, that the response doesn't contain values in the past. Which leads to "unfilled" states.

@klein0r
Copy link
Contributor

klein0r commented Oct 15, 2024

use a script that cron´s the refresh button.

States with role button shouldn't be controlled with false. "Umschalten" is not correct. Just set true.

@alx785
Copy link

alx785 commented Oct 15, 2024

@klein0r Thank you for that little hint and your work Matthias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants