Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1605

Weather • Re: Open-Meteo Weather API

$
0
0
You are correct about the bracketed number in the query line; it represents the item number of the source array.
[xxx]
Because each array contains unique values you would only specify the index of each item in your query [0] to [x] (x=number of indexes in the arrays).
Confirmed! :D
  • My skin working basis is your "OpenMeteo Win10 Widgets Weather" skin using the default measures in "OpenMeteoAPIMeasures7Day.inc"
  • Tested with the example measure [@CurrentUVIndex] findings as follows
  • Query='hourly.uv_index[X]'
  • [X] = hour in an array of 7 days, from 0 to 167 !!
  • Whereby for Today X=0 to 23 // Day1 X=24 to 47 // Day2 X=48 to 71 // Day3 X=72 to 95 // Day4 X=96 to 119 // Day5 X=120 to 143 // Day6 X=144 to 167
This means I can really use your skin as a basis to query the HOURLY weather data for certain parameters (my project = irradiance trend for PV power production predictions)! EXCELLENT --> this is much easier and more robust than using RexExp! Am I on the right track?

Ok, my first goal is to display a trend graph of this 7 day hourly data. However, is it true that I now have to write 167 (one-hundred-sixty-seven?!) measures copy/pasted "only" counting up the X and setting up unique measure names? This seems super-inefficient, ism't there a more simple way to query the complete array in one measure and then use this single array-measure in a meter drawing the trend line graph and also for calculating e.g. the daily peak or daily sum of irradiance etcpp...?

Yes, I know that practically all weather skins are actually using such series of unique measures for such purposes, but maybe there is a better way thanks to the JSON parser or other tricks? I mean in any other programming language you'd write a simple loop to "cover it all".

Everythings possible, right? Thanks for any hints... :???:

Statistics: Posted by emp00 — Today, 8:20 pm



Viewing all articles
Browse latest Browse all 1605

Trending Articles