Import weather data other than Wunderground
Moderators: leecollings, htilburgs, robgeerts
- HansieNL
- Posts: 957
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
@toro : OWM webpage is openweathermap.org
Maybe you can suggest your changes on GitHub?
Thanks for your addition.
Maybe you can suggest your changes on GitHub?
Thanks for your addition.
Blah blah blah
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Import weather data other than Wunderground
When I compare Rotterdam and Dordrecht weather for Monday, the first is shown as sunny, the second as light rain. The difference in rain is only 0mm versus 0.32mm.toro wrote:You'r welcome. It's probably because there actualy is light rain for the next days. You can check on openweathermaps.org if this is the case. There might be some difference, forecast for the days is on the specific day at 13:00h, 14:00h or 15:00h.
Sun and (rsin)clouds would be a better description, but I can understand that this might be difficult to do.
Feature request, the given temperature is an average, it would be nice to have the min temperature of the day as an option on a 2nd row.
-
- Posts: 47
- Joined: Wednesday 09 August 2017 23:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
The descriptions are straight from OWM. They come in the forecast, I do not change them.jake wrote: ↑Monday 14 January 2019 0:06 When I compare Rotterdam and Dordrecht weather for Monday, the first is shown as sunny, the second as light rain. The difference in rain is only 0mm versus 0.32mm.
Sun and (rsin)clouds would be a better description, but I can understand that this might be difficult to do.
Your wish is my command
I implemented it in the new version of the file weather_owm.js (Dashticz version 2.5.2)
But it can also be used in 2.5.1
Please test the code. As with the previous, this is not the official Dashticz file.
Make a backup of your weather_owm.js file and overwrite the content with the code below
- Spoiler: show
Code: Select all
config['owm_api'] = 'xxxxxxx'; // Your OWM API key
config['owm_city'] = 'Amsterdam'; // Your city or nearby city to use in OWM
config['owm_name'] = ''; // If your city is not available with OWM, you have to use a nearby city. You can type the name of your own city here to show it in Dashticz
config['owm_country'] = 'nl'; // Your country to use in OWM
config['owm_cnt'] = 4; // Number of columns to show. If showing days, max is 5, (4 is recommended )
config['owm_days'] = 1; // Enter 1 for showing forecast in days, 0 for the OWM default 3 hour forecast
config['owm_min'] = 1; // Enter 1 to show min temperature on 2nd row
config['owm_lang'] = 'nl'; // Set language for de description of the forecast (rain, cloudy, etc.). For available languages, see https://openweathermap.org/forecast5/#multi
config['static_weathericons'] = 0; // Enter 1 for animated weather icons, 0 for static icons
You are right, it's without the 's' at the end, thanks.
I would love to suggest the change on GitHub. But I have no clue on how to do that.
Maybe someone can help me with that.
Perhaps Rob can/want's to use it in a future version. And probably make it a little better
Playing with the script makes you realize how great they are, really impressive I think.
-
- Posts: 2262
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
Nice improvement for OWM.toro wrote: ↑Wednesday 16 January 2019 23:07
The descriptions are straight from OWM. They come in the forecast, I do not change them.
Your wish is my command
Daily forecast with minimum.jpg
I implemented it in the new version of the file weather_owm.js (Dashticz version 2.5.2)
But it can also be used in 2.5.1
Please test the code. As with the previous, this is not the official Dashticz file.
Make a backup of your weather_owm.js file and overwrite the content with the code below
There is also a new option, owm_min.
- Spoiler: show
Code: Select all
config['owm_api'] = 'xxxxxxx'; // Your OWM API key config['owm_city'] = 'Amsterdam'; // Your city or nearby city to use in OWM config['owm_name'] = ''; // If your city is not available with OWM, you have to use a nearby city. You can type the name of your own city here to show it in Dashticz config['owm_country'] = 'nl'; // Your country to use in OWM config['owm_cnt'] = 4; // Number of columns to show. If showing days, max is 5, (4 is recommended ) config['owm_days'] = 1; // Enter 1 for showing forecast in days, 0 for the OWM default 3 hour forecast config['owm_min'] = 1; // Enter 1 to show min temperature on 2nd row config['owm_lang'] = 'nl'; // Set language for de description of the forecast (rain, cloudy, etc.). For available languages, see https://openweathermap.org/forecast5/#multi config['static_weathericons'] = 0; // Enter 1 for animated weather icons, 0 for static icons
You are right, it's without the 's' at the end, thanks.
I would love to suggest the change on GitHub. But I have no clue on how to do that.
Maybe someone can help me with that.
Perhaps Rob can/want's to use it in a future version. And probably make it a little better
Playing with the script makes you realize how great they are, really impressive I think.
I've created the PR on github. Probably it will be merged in the next Beta.
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Import weather data other than Wunderground
Thank you, thank you! It works well, if only the font size for temperature could be decreased a little. The block is now higher than the original WU blocks, pushing my bottom block just that little bit off page, which didn't happen before.toro wrote:The descriptions are straight from OWM. They come in the forecast, I do not change them.jake wrote: ↑Monday 14 January 2019 0:06 When I compare Rotterdam and Dordrecht weather for Monday, the first is shown as sunny, the second as light rain. The difference in rain is only 0mm versus 0.32mm.
Sun and (rsin)clouds would be a better description, but I can understand that this might be difficult to do.
Your wish is my command
Other than that, excellent work and thanks for your time!
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Import weather data other than Wunderground
By looking in the topic 'show your dashboard' I saw that with WU the min temperature was a smaller font, a less prominent color and that the word 'min' wasn't there. Altogether a nice solution to save height in the block.
- HansieNL
- Posts: 957
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
I did add the following to the files to get the settings in the settings menu:
settings.js:
settings.js:
- Spoiler: show
- Spoiler: show
- Spoiler: show
Blah blah blah
-
- Posts: 47
- Joined: Wednesday 09 August 2017 23:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
- HansieNL
- Posts: 957
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
@toro: Thanks. If I choose for default 3 hour forecast the temp and rain are on the same row without space.
I think a break will make it more readable.
html += '<div class="temp"><span class="av_temp">' + Math.round(temp) + _TEMP_SYMBOL + '</span><br /><span class="rain">' + (Math.round(rain*100)/100) + " mm" + '</span></div>';
I think a break will make it more readable.
html += '<div class="temp"><span class="av_temp">' + Math.round(temp) + _TEMP_SYMBOL + '</span><br /><span class="rain">' + (Math.round(rain*100)/100) + " mm" + '</span></div>';
Blah blah blah
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Import weather data other than Wunderground
@toro, thanks again!
-
- Posts: 47
- Joined: Wednesday 09 August 2017 23:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
@HansieNL: You are right, that looks a lot better. So here's the complete code
- Spoiler: show
-
- Posts: 47
- Joined: Wednesday 09 August 2017 23:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
Thank you so much!
Updated to 2.5.3. So far so good, it's running fine.
I was also looking into why sometimes the forecast wasn't displayed.
As it turns out, from time to time OWM doesn't produce a 40 times list (8 x 3hour forecast x 5 days), but only 39.
So I guess that's where the code got confused and spend it's time looking where in the world number 40 was wandering about.
- HansieNL
- Posts: 957
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
@toro : Day view is not displayed at this moment, but 3 hour forecast is. Is there a way to solve this problem?
Blah blah blah
-
- Posts: 120
- Joined: Tuesday 18 October 2016 13:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10915
- Contact:
Import weather data other than Wunderground
I am having the same problem, could not get it work yesterday I am on the latest Dashticz_v2 betaHansieNL wrote:@toro : Day view is not displayed at this moment, but 3 hour forecast is. Is there a way to solve this problem?
-
- Posts: 47
- Joined: Wednesday 09 August 2017 23:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
Yes, there is! This was driving me nuts to. I did some more testing en finaly figured it out.
I already found out that sometimes OWM returned 39 lines instead of 40. Yesterday, when the view was not displayed I tested the response of OWM. There were only 34 lines!
I made an improvement to the code. The script will now check for the number of lines and then fill the view with this amount of lines.
I've tested this today, it works great. Now, when there are only 34 lines returned by OWM, the view is displayed correctly for 4 days. The fifth (if you set it to 5 columns) is blank.
So, long story short, there is an UPDATE. See code below.
@Lokonli: Can you use this code in the next update?
For now, replace the content of weather_owm.js with this code.
- Spoiler: show
-
- Posts: 2262
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Import weather data other than Wunderground
I've created the PR. It will be merged into beta 2.5.4.toro wrote: ↑Wednesday 23 January 2019 18:01Yes, there is! This was driving me nuts to. I did some more testing en finaly figured it out.
I already found out that sometimes OWM returned 39 lines instead of 40. Yesterday, when the view was not displayed I tested the response of OWM. There were only 34 lines!
I made an improvement to the code. The script will now check for the number of lines and then fill the view with this amount of lines.
I've tested this today, it works great. Now, when there are only 34 lines returned by OWM, the view is displayed correctly for 4 days. The fifth (if you set it to 5 columns) is blank.
So, long story short, there is an UPDATE. See code below.
@Lokonli: Can you use this code in the next update?
For now, replace the content of weather_owm.js with this code.
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Import weather data other than Wunderground
Based on the weather description the individual forecast days may have a different height, by either using 1 or 2 lines (rain versus light snow for instance).
This has an impact on the blocks underneath the weather forecast. Depending on the 1st,2nd,3rd,4th day, it throws the blocks beneath down, or start a block after the day with double line text.
Long story short, it would be nice if the block height always takes 2 text lines into account for the weather description, whether used or not.
This has an impact on the blocks underneath the weather forecast. Depending on the 1st,2nd,3rd,4th day, it throws the blocks beneath down, or start a block after the day with double line text.
Long story short, it would be nice if the block height always takes 2 text lines into account for the weather description, whether used or not.
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Import weather data other than Wunderground
I now was able to take a screenshot of my tablet. Normally, when all 4 weather boxes have the same size, the 'woonkamer' block would start underneath 'zaterdag'. Since the forecast takes 2 lines for that sub block only, the temperature block starts below 'zondag'.jake wrote: ↑Thursday 31 January 2019 15:22 Based on the weather description the individual forecast days may have a different height, by either using 1 or 2 lines (rain versus light snow for instance).
This has an impact on the blocks underneath the weather forecast. Depending on the 1st,2nd,3rd,4th day, it throws the blocks beneath down, or start a block after the day with double line text.
Long story short, it would be nice if the block height always takes 2 text lines into account for the weather description, whether used or not.
The result is that the garbage block ends up on the next line, ruining that whole column setup.
(woonkamer width =3, buiten width = 3 and garbage width = 6, making 12 to fill a column)
The bottom 3 blocks are not visible right now, but by halfway tomorrow they will, because then Saturday will be gone for the weather forecast and (hopefully) 4 sub blocks of equal height will remain.
Who is online
Users browsing this forum: No registered users and 1 guest