** I live in Canada ---Chek your metrics/imperial system**
Here I want to share my httpGET profil to get values from openweathermap Forecast api.
So you want to get the api key from there https://home.openweathermap.org/users/sign_up
When you got the api key, write it at the end of this address, and replace the lat /lon values with yours
Imp ex : https://samples.openweathermap.org/data/2.5/forecast?lat=35&lon=139&appid=b6907d289e10d714a6e88b30761fae 22
----
The next profile will create 133 devices. You can poll 40 ( [0] to 39] ) different hours ( 3 hours gaps each) in the total of 5 days.
1.Here I poll 3h[0], 6h[1], 9h[2], 12h[3], 15h[4], 18h[5], 21h[6], 24h[7], 48h[15], 72h[23], 96h[31], 114h[37]
( why i do not poll 120[39]...or 117[38] ? Because sometimes they are not available...so 114h[37] seems to be safer.)
Feel free to add the ForecastTime you want!
2. The first device is your city. Then there are 11 devices per number I just listed.
Temperature moment (time of the forecast estimate)
Temperature unit ( here in Celsius)
Wheather
Description of the Wheather
Clouds %
rain (mm)
Snow (mm)
Pressure
Humidity %
WindSpeed (here in Km/h)
Wind direction in degrees
Here is my http profile :
name:
Method (outgoing) :
Url:
Device name expression (optional):
Device value expression (optional) :
NB-----The following is ONLY applicable to people that use the metric measurement system :
- the wind.speed value was in meter/sec. So i needed to multiply it by 3.6 to get a km/h value : JSON_Num(input,"list[0].wind.speed") *3.6
NB-- some values wont appears in their respective Homeseer device ( unknown). you have to change the device property to allow an interval big enough for the value you will get.
ex: if it is -5 degrees Celsius, you wont see it , you'll have to edit your device property.
Same thing for the wind direction (ex: can be 270 degrees) , so your interval most include 0-360 here.
NB-- Some device will be ''off'', that means there is no metric available for this device ( ex: here i can see 5mm of snow for the snow device, but i see nothing for the rain device). Feel free to remove the snow device if you don't have any snow at your place. But if you live in a place like Canada, keep both ( In the winter the snow device will get its value, but the rain wont (most of the time), And in summer we'll get the rain , but not the snow).
** see picture to understand the last two NBs
---
Then I create an event that will trigger every |15 minutes to poll the API.
Here I want to share my httpGET profil to get values from openweathermap Forecast api.
So you want to get the api key from there https://home.openweathermap.org/users/sign_up
When you got the api key, write it at the end of this address, and replace the lat /lon values with yours
Imp ex : https://samples.openweathermap.org/data/2.5/forecast?lat=35&lon=139&appid=b6907d289e10d714a6e88b30761fae 22
----
The next profile will create 133 devices. You can poll 40 ( [0] to 39] ) different hours ( 3 hours gaps each) in the total of 5 days.
1.Here I poll 3h[0], 6h[1], 9h[2], 12h[3], 15h[4], 18h[5], 21h[6], 24h[7], 48h[15], 72h[23], 96h[31], 114h[37]
( why i do not poll 120[39]...or 117[38] ? Because sometimes they are not available...so 114h[37] seems to be safer.)
Feel free to add the ForecastTime you want!
2. The first device is your city. Then there are 11 devices per number I just listed.
Temperature moment (time of the forecast estimate)
Temperature unit ( here in Celsius)
Wheather
Description of the Wheather
Clouds %
rain (mm)
Snow (mm)
Pressure
Humidity %
WindSpeed (here in Km/h)
Wind direction in degrees
Here is my http profile :
name:
Code:
Weather Forecast
Code:
get
Code:
http://api.openweathermap.org/data/2.5/forecast?lat=[B]999.439770[/B]&lon=[B]-999.481730[/B]&[B]units=metric[/B]&APPID=[B]MY_KEY [/B]
Device name expression (optional):
Code:
"City" && "Temperature moment 3h" && "Temperature In 3h" && "Wheather In 3h" && "Description of the Wheather In 3h" && "Clouds In 3h" && "rain In 3h" && "Snow In 3h" && "Pressure In 3h" && "Humidity In 3h" && "WindSpeed In 3h" && "Wind direction In 3h" && "Temperature moment 6h" && "Temperature In 6h" && "Wheather In 6h" && "Description of the Wheather In 6h" && "Clouds In 6h" && "rain In 6h" && "Snow In 6h" && "Pressure In 6h" && "Humidity In 6h" && "WindSpeed In 6h" && "Wind direction In 6h" && "Temperature moment 9h" && "Temperature In 9h" && "Wheather In 9h" && "Description of the Wheather In 9h" && "Clouds In 9h" && "rain In 9h" && "Snow In 9h" && "Pressure In 9h" && "Humidity In 9h" && "WindSpeed In 9h" && "Wind direction In 9h" && "Temperature moment 12h" && "Temperature In 12h" && "Wheather In 12h" && "Description of the Wheather In 12h" && "Clouds In 12h" && "rain In 12h" && "Snow In 12h" && "Pressure In 12h" && "Humidity In 12h" && "WindSpeed In 12h" && "Wind direction In 12h" && "Temperature moment 15h" && "Temperature In 15h" && "Wheather In 15h" && "Description of the Wheather In 15h" && "Clouds In 15h" && "rain In 15h" && "Snow In 15h" && "Pressure In 15h" && "Humidity In 15h" && "WindSpeed In 15h" && "Wind direction In 15h" && "Temperature moment 18h" && "Temperature In 18h" && "Wheather In 18h" && "Description of the Wheather In 18h" && "Clouds In 18h" && "rain In 18h" && "Snow In 18h" && "Pressure In 18h" && "Humidity In 18h" && "WindSpeed In 18h" && "Wind direction In 18h" && "Temperature moment 21h" && "Temperature In 21h" && "Wheather In 21h" && "Description of the Wheather In 21h" && "Clouds In 21h" && "rain In 21h" && "Snow In 21h" && "Pressure In 21h" && "Humidity In 21h" && "WindSpeed In 21h" && "Wind direction In 21h" && "Temperature moment 24h" && "Temperature In 24h" && "Wheather In 24h" && "Description of the Wheather In 24h" && "Clouds In 24h" && "rain In 24h" && "Snow In 24h" && "Pressure In 24h" && "Humidity In 24h" && "WindSpeed In 24h" && "Wind direction In 24h" && "Temperature moment 48h" && "Temperature In 48h" && "Wheather In 48h" && "Description of the Wheather In 48h" && "Clouds In 48h" && "rain In 48h" && "Snow In 48h" && "Pressure In 48h" && "Humidity In 48h" && "WindSpeed In 48h" && "Wind direction In 48h" && "Temperature moment 72h" && "Temperature In 72h" && "Wheather In 72h" && "Description of the Wheather In 72h" && "Clouds In 72h" && "rain In 72h" && "Snow In 72h" && "Pressure In 72h" && "Humidity In 72h" && "WindSpeed In 72h" && "Wind direction In 72h" && "Temperature moment 96h" && "Temperature In 96h" && "Wheather In 96h" && "Description of the Wheather In 96h" && "Clouds In 96h" && "rain In 96h" && "Snow In 96h" && "Pressure In 96h" && "Humidity In 96h" && "WindSpeed In 96h" && "Wind direction In 96h" && "Temperature moment 114h" && "Temperature In 114h" && "Wheather In 114h" && "Description of the Wheather In 114h" && "Clouds In 114h" && "rain In 114h" && "Snow In 114h" && "Pressure In 114h" && "Humidity In 114h" && "WindSpeed In 114h" && "Wind direction In 114h"
Code:
JSON(input,"city.name") && JSON(input,"list[0].dt_txt") && JSON(input,"list[0].main.temp") && JSON(input,"list[0].weather[0].main") && JSON(input,"list[0].weather[0].description") && JSON(input,"list[0].clouds.all") && JSON(input,"list[0].rain.3h") && JSON(input,"list[0].snow.3h") && JSON(input,"list[0].main.pressure") && JSON(input,"list[0].main.humidity") && JSON_Num(input,"list[0].wind.speed") *3.6 && JSON(input,"list[0].wind.deg") && JSON(input,"list[1].dt_txt") && JSON(input,"list[1].main.temp") && JSON(input,"list[1].weather[0].main") && JSON(input,"list[1].weather[0].description") && JSON(input,"list[1].clouds.all") && JSON(input,"list[1].rain.3h") && JSON(input,"list[1].snow.3h") && JSON(input,"list[1].main.pressure") && JSON(input,"list[1].main.humidity") && JSON_Num(input,"list[1].wind.speed") *3.6 && JSON(input,"list[1].wind.deg") && JSON(input,"list[2].dt_txt") && JSON(input,"list[2].main.temp") && JSON(input,"list[2].weather[0].main") && JSON(input,"list[2].weather[0].description") && JSON(input,"list[2].clouds.all") && JSON(input,"list[2].rain.3h") && JSON(input,"list[2].snow.3h") && JSON(input,"list[2].main.pressure") && JSON(input,"list[2].main.humidity") && JSON_Num(input,"list[2].wind.speed") *3.6 && JSON(input,"list[2].wind.deg") && JSON(input,"list[3].dt_txt") && JSON(input,"list[3].main.temp") && JSON(input,"list[3].weather[0].main") && JSON(input,"list[3].weather[0].description") && JSON(input,"list[3].clouds.all") && JSON(input,"list[3].rain.3h") && JSON(input,"list[3].snow.3h") && JSON(input,"list[3].main.pressure") && JSON(input,"list[3].main.humidity") && JSON_Num(input,"list[3].wind.speed") *3.6 && JSON(input,"list[3].wind.deg") && JSON(input,"list[4].dt_txt") && JSON(input,"list[4].main.temp") && JSON(input,"list[4].weather[0].main") && JSON(input,"list[4].weather[0].description") && JSON(input,"list[4].clouds.all") && JSON(input,"list[4].rain.3h") && JSON(input,"list[4].snow.3h") && JSON(input,"list[4].main.pressure") && JSON(input,"list[4].main.humidity") && JSON_Num(input,"list[4].wind.speed") *3.6 && JSON(input,"list[4].wind.deg") && JSON(input,"list[5].dt_txt") && JSON(input,"list[5].main.temp") && JSON(input,"list[5].weather[0].main") && JSON(input,"list[5].weather[0].description") && JSON(input,"list[5].clouds.all") && JSON(input,"list[5].rain.3h") && JSON(input,"list[5].snow.3h") && JSON(input,"list[5].main.pressure") && JSON(input,"list[5].main.humidity") && JSON_Num(input,"list[5].wind.speed") *3.6 && JSON(input,"list[5].wind.deg") && JSON(input,"list[6].dt_txt") && JSON(input,"list[6].main.temp") && JSON(input,"list[6].weather[0].main") && JSON(input,"list[6].weather[0].description") && JSON(input,"list[6].clouds.all") && JSON(input,"list[6].rain.3h") && JSON(input,"list[6].snow.3h") && JSON(input,"list[6].main.pressure") && JSON(input,"list[6].main.humidity") && JSON_Num(input,"list[6].wind.speed") *3.6 && JSON(input,"list[6].wind.deg") && JSON(input,"list[7].dt_txt") && JSON(input,"list[7].main.temp") && JSON(input,"list[7].weather[0].main") && JSON(input,"list[7].weather[0].description") && JSON(input,"list[7].clouds.all") && JSON(input,"list[7].rain.3h") && JSON(input,"list[7].snow.3h") && JSON(input,"list[7].main.pressure") && JSON(input,"list[7].main.humidity") && JSON_Num(input,"list[7].wind.speed") *3.6 && JSON(input,"list[7].wind.deg") && JSON(input,"list[15].dt_txt") && JSON(input,"list[15].main.temp") && JSON(input,"list[15].weather[0].main") && JSON(input,"list[15].weather[0].description") && JSON(input,"list[15].clouds.all") && JSON(input,"list[15].rain.3h") && JSON(input,"list[15].snow.3h") && JSON(input,"list[15].main.pressure") && JSON(input,"list[15].main.humidity") && JSON_Num(input,"list[15].wind.speed") *3.6 && JSON(input,"list[15].wind.deg") && JSON(input,"list[23].dt_txt") && JSON(input,"list[23].main.temp") && JSON(input,"list[23].weather[0].main") && JSON(input,"list[23].weather[0].description") && JSON(input,"list[23].clouds.all") && JSON(input,"list[23].rain.3h") && JSON(input,"list[23].snow.3h") && JSON(input,"list[23].main.pressure") && JSON(input,"list[23].main.humidity") && JSON_Num(input,"list[23].wind.speed") *3.6 && JSON(input,"list[23].wind.deg") && JSON(input,"list[31].dt_txt") && JSON(input,"list[31].main.temp") && JSON(input,"list[31].weather[0].main") && JSON(input,"list[31].weather[0].description") && JSON(input,"list[31].clouds.all") && JSON(input,"list[31].rain.3h") && JSON(input,"list[31].snow.3h") && JSON(input,"list[31].main.pressure") && JSON(input,"list[31].main.humidity") && JSON_Num(input,"list[31].wind.speed") *3.6 && JSON(input,"list[31].wind.deg") && JSON(input,"list[37].dt_txt") && JSON(input,"list[37].main.temp") && JSON(input,"list[37].weather[0].main") && JSON(input,"list[37].weather[0].description") && JSON(input,"list[37].clouds.all") && JSON(input,"list[37].rain.3h") && JSON(input,"list[37].snow.3h") && JSON(input,"list[37].main.pressure") && JSON(input,"list[37].main.humidity") && JSON_Num(input,"list[37].wind.speed") *3.6 && JSON(input,"list[37].wind.deg")
- the wind.speed value was in meter/sec. So i needed to multiply it by 3.6 to get a km/h value : JSON_Num(input,"list[0].wind.speed") *3.6
NB-- some values wont appears in their respective Homeseer device ( unknown). you have to change the device property to allow an interval big enough for the value you will get.
ex: if it is -5 degrees Celsius, you wont see it , you'll have to edit your device property.
Same thing for the wind direction (ex: can be 270 degrees) , so your interval most include 0-360 here.
NB-- Some device will be ''off'', that means there is no metric available for this device ( ex: here i can see 5mm of snow for the snow device, but i see nothing for the rain device). Feel free to remove the snow device if you don't have any snow at your place. But if you live in a place like Canada, keep both ( In the winter the snow device will get its value, but the rain wont (most of the time), And in summer we'll get the rain , but not the snow).
** see picture to understand the last two NBs
---
Then I create an event that will trigger every |15 minutes to poll the API.
Comment