chpro / fronius-grafana-dashboard

Setting up and visualizing data from your Fronius Symo GEN24 10.0 inverter and Smart Meter TS 65A-3 using InfluxDB and Grafana.
MIT License
34 stars 2 forks source link

Forecast API not working #5

Closed Schmiddi1008 closed 5 months ago

Schmiddi1008 commented 5 months ago

Hi, the Forecast API isnt working.

In influxdb i cant see the measurement.

My telegraf.conf:

image

Photovoltaik: East/West

chpro commented 5 months ago

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

Schmiddi1008 commented 5 months ago

image

chpro commented 5 months ago

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.

Schmiddi1008 commented 5 months ago

image

chpro commented 5 months ago

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:

As next steps I would recommend the following:

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

Schmiddi1008 commented 5 months ago

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 5 months ago

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