chpro/fronius-grafana-dashboard

Forecast API not working

Schmiddi1008 opened this issue · 7 comments

Hi,
the Forecast API isnt working.

In influxdb i cant see the measurement.

My telegraf.conf:

image

Photovoltaik: East/West

chpro commented

can you also give me info how you configured the [[outputs.influxdb_v2]] and [agent]

chpro commented

It seems that everything is configured the right way.

Is there some error in the log /var/log/telegraf/telegraf.log?

Can you also check if the data is maybe written to another bucket e.g. the bucket inverter which is the default one. This could happen if the override of bucket name does not work.

chpro commented

I had a closer look at the config and log. Found nothing obvious why it should not work, sorry.

May be it helps to find the problem when I describe the workflow to you:

  • inputs.http reads the desired forecast every 8h. The large interval was necessary because of rate limit of the free tier.
  • no processors should be applied before sending data to output
  • in the outputs.influxdb_v2 writes the data to influx by default to the inverter bucket this is overwritten by the tag influxdb_bucket in the case of the forecast the bucket pvforecast is used.

As next steps I would recommend the following:

  • check for any typos of bucket names in influx and telegraph
  • check permission of the token
  • turn on debug logging in telegraf to see what's happening. For that you can use following config for [agent]
   ## Log at debug level.
  debug = true
  ## Log only error level messages.
  quiet = false

Be aware of the high refresh interval this may need to be changed for easier debugging. I would also recommend to only have the forecast inputs.http enabled while debugging.

If you got some more insights or solution don't hesitate to contact me.

Hi,
dont know why, but its working. Ive changed the token....

Do you know how i can create a link for East / West ? Or is it possible to use 2 links ? One for east and one for west

chpro commented

You can use two urls in the inputs.http block with comma separation

  urls = [
    "https://api.forecast.solar/estimate/watthours/day/46.0/15.0/45/0/10.2?time=utc",
    "https://api.forecast.solar/estimate/watthours/day/46.0/15.0/45/90/10.2?time=utc"
  ]

Then you will end up with also additional measures for each day in INFLUXDB. It is possible to distinguish the East / West measure by url field.

Screenshot 2024-01-15 at 06 46 53

Hence, you have also adapt the panel current queries and add additional queries. To current queries you have to add a restriction url = 'YOUR_FORECAST_URL' in where clause.

e.g.

SELECT first("value") FROM "autogen"."pv_forecast_watt_hours_day" WHERE $timeFilter and url = 'https://api.forecast.solar/estimate/watthours/day/46.0/15.0/45/0/10.2?time=utc' tz('${tz:raw}')

The panel would look like
Screenshot 2024-01-15 at 06 53 23
when you change queries as follows
Screenshot 2024-01-15 at 06 55 37