Hello,
I want to use the weather service openweathermap.org for my forecast.
For this I use the following API-Key:
"http://api.openweathermap.org/data/2.5/weather?id=2953364&units=metric&APPID=<your_api_key>"
In response, I get:
"{"coord":{"lon":10.56, "lat":51.59}, "weather":[{"id":800, "main": "Clear", "description": "clear sky", "icon": "01d"}], "base": "stations", "main":{"temp":12.7, "pressure":997.53, "humidity":46, "temp_min":12.7, "temp_max":12.7, "sea_level":1039.94, "grnd_level":997.53}, "wind":{"speed":2.38, "deg":244.5}, "clouds":{"all":0}, "dt":1550314352, "sys":{"message":0.0031, "country": "DE", "sunrise":1550298585, "sunset":1550334880}, "id":2953364, "name": "Bad Sachsa", "cod":200}"
How can I display the current temperature?
I use the skin Arista
Thank you very much.
Jörg
It is currently April 30th, 2024, 11:16 am
Weather Forecast
-
- Posts: 7
- Joined: February 16th, 2019, 10:46 am
- Location: Germany
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Forecast
Well if I take you at your word that that is exactly what is returned by the site, then:
Test.html:
I don't have your API key of course, so I can't test in on the real site, so I just created a local file that contains the information. I don't know anything about any skin called Arista, so I can't help with that.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasureSite]
Measure=WebParser
URL=file://#CURRENTPATH#Test.html
RegExp=(?siU){"temp":(.*),
StringIndex=1
[MeterTemp]
Meter=String
MeasureName=MeasureSite
FontSize=30
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1° C
Test.html:
Code: Select all
"{"coord":{"lon":10.56, "lat":51.59}, "weather":[{"id":800, "main": "Clear", "description": "clear sky", "icon": "01d"}], "base": "stations", "main":{"temp":12.7, "pressure":997.53, "humidity":46, "temp_min":12.7, "temp_max":12.7, "sea_level":1039.94, "grnd_level":997.53}, "wind":{"speed":2.38, "deg":244.5}, "clouds":{"all":0}, "dt":1550314352, "sys":{"message":0.0031, "country": "DE", "sunrise":1550298585, "sunset":1550334880}, "id":2953364, "name": "Bad Sachsa", "cod":200}"
I don't have your API key of course, so I can't test in on the real site, so I just created a local file that contains the information. I don't know anything about any skin called Arista, so I can't help with that.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 7
- Joined: February 16th, 2019, 10:46 am
- Location: Germany
Re: Weather Forecast
Thank you for your help