I'm trying to create a basic weather skin using data from the Open-Meteo API, which returns data in JSON format. I’ve managed to get the JSON downloaded using WebParser, but I’m struggling with parsing out the temperature value.
Here’s a snippet of what I have so far:
And in the meter:But all I’m getting is either nothing or just the whole string after "temperature":. I'm not sure if my regex is wrong or if I should be using lookaheads/lookbehinds?
Does anyone have experience parsing Open-Meteo’s output or know a cleaner way to extract just the current temperature?
Here’s a snippet of what I have so far:
Code:
[MeasureWeather]Measure=PluginPlugin=WebParserURL=https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41¤t_weather=trueRegExp=(?siU)"temperature":(.*?),"UpdateRate=600
Code:
[MeterTemp]Meter=StringMeasureName=MeasureWeather
Does anyone have experience parsing Open-Meteo’s output or know a cleaner way to extract just the current temperature?
Statistics: Posted by Discompard78 — Yesterday, 9:37 am — Replies 1 — Views 2892