tipichris / bbcwx

A Cinnamon desklet displaying weather from a variety of sources
http://www.oak-wood.co.uk/oss/bbcwx
11 stars 15 forks source link

display of metric units is wrong #23

Closed sacrileger closed 8 years ago

sacrileger commented 8 years ago

perhaps due to truncating, trimming or dropping digits, the values for pressure, windspeed and daily forecast temperatures supplied by accuweather.com are wrong: for example, pressure 1026.60 mb is displayed as 103 mb, windspeed 13 km/h is displayed in the desklet as 3 km/h. also, the forecast daily temperatures in centigrades do not correspond to what is shown on accuweather.com website. the values displayed in the desklet appear to be a combination of "feels-like" values of the forecast "low". it would make sense if the desklet displayed the temperature plus the "low" in winter and "high" in the summer. unless this is fixed, it is of little practical use.

tipichris commented 8 years ago

The Weather Desklet does not, and never has, have support for accuweather.com. Are you sure you're reporting this bug to the right desklet? Perhaps you meant AccuWeather Desklet

sacrileger commented 8 years ago

well, that's embarrassing. it is the AccuWeather Desklet that i have an issue with.

tipichris commented 8 years ago

:)
You could always switch to the Weather Desklet

sacrileger commented 8 years ago

chris: thnsk for suggestion. i did tried to switch to your desklet and am having problems w config. i only got it going w/ bbc. couldnt get it going w/ yahoo or open weather (no api) for example yahoo - your example:

https://weather.yahoo.com/deutschland/bundesland-berlin/berlin-638242/ location "638242" gives error 401.

another code for berlin is here: https://weather.codes/search/?q=berlin

code : GMXX0007 gives error: invalid location format

coord: |using 51.51,-0.13 gives error: could not resolve location|

not sure what the problem is. can you assist? thanks

On 16-04-05 08:37 AM, Chris Hastie - notifications@github.com wrote:

:)

You could always switch to the Weather Desklet https://cinnamon-spices.linuxmint.com/desklets/view/20

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tipichris/bbcwx/issues/23#issuecomment-205781029

tipichris commented 8 years ago

Hi

Yahoo! restricted their geo lookup api a while ago, which is why you can no longer use latitude and longitude. It seems they have now restricted at least part of their weather API too, although I have managed to find an RSS feed that does still seem to be public. For how long is another question...

I don't have time to do an update and release it right now, but if you want to hack, here's how. Open the desklet file (~/.local/share/cinnamon/desklets/bbcwx@oak-wood.co.uk/desklet.js) and find a line at about 1825 that begins

_baseURL: 'http://weather.yahooapis.com/forecastrss?u=c&w=',

change it to _baseURL: 'http://xml.weather.yahoo.com/forecastrss?u=c&w=',

save. Restart cinnamon (Alt + F2, then type r). Things should then work if you supply the WOEID (the 638242 in your example)

I'll try and do a proper update soon, but it won't be this week.

Cheers

tipichris commented 8 years ago

You may want to follow issue #24 to be notified when this is sorted.

sacrileger commented 8 years ago

ok. thanks. i'll follow the #24. also, the docs could use some clean-up. i didnt go to all links but this didnt work for me: http://openweathermap.org/login (page not found)

openweather doesnt work as outlined in docs. i.e. berlin [2950159] err: 401

http://openweathermap.org/city/2950159

i submitted that as an issue - you can delete it if it's not accurate or fixed w/ the api. i didnt use api for that.

On 16-04-05 12:24 PM, Chris Hastie - notifications@github.com wrote:

You may want to follow issue #24 https://github.com/tipichris/bbcwx/issues/24 to be notified when this is sorted.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tipichris/bbcwx/issues/23#issuecomment-205882501

sacrileger commented 8 years ago

ok, thanks. that worked. however, it would appear that the location variable in your code has a fixed length (as opposed to dynamically allocated) and is unable to work with yahoo locations that exceed the set length of the location variable in your code; i.e. 91982069 or 12582548 generates error 502. also, humidity and pressure is missing from the yahoo data?? cheers

On 16-04-05 12:20 PM, Chris Hastie - notifications@github.com wrote:

Hi

Yahoo! restricted their geo lookup api a while ago, which is why you can no longer use latitude and longitude. It seems they have now restricted at least part of their weather API too, although I have managed to find an RSS feed that does still seem to be public. For how long is another question...

I don't have time to do an update and release it right now, but if you want to hack, here's how. Open the desklet file (~/.local/share/cinnamon/desklets/bbcwx@oak-wood.co.uk/desklet.js) and find a line at about 1825 that begins

|_baseURL: 'http://weather.yahooapis.com/forecastrss?u=c&w=',|

change it to |_baseURL: 'http://xml.weather.yahoo.com/forecastrss?u=c&w=',|

save. Restart cinnamon (Alt + F2, then type r). Things should then work if you supply the WOEID (the 638242 in your example)

I'll try and do a proper update soon, but it won't be this week.

Cheers

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tipichris/bbcwx/issues/23#issuecomment-205880268

tipichris commented 8 years ago

Hi Yahoo seem to be returning 502 at the moment. This is a problem at the Yahoo end, not in desklet. I suspect Yahoo maybe in the process of closing the service down I'm afraid.

Yahoo have only ever supported a limited number of attributes. If you need more, try weather.com. Yahoo's data comes from them anyway, and the feed is more complete. That said, weather.com announced some time ago that they are withdrawing the service, so I can't guarantee that it will keep working for long.

sacrileger commented 8 years ago

thanks. that makes sense. btw, accuweather desklet - same problem w/ yahoo. weather.com works for now but i guess the're the ones not providing the humidity and pressure indices. i'll try some of the api's for more.

On 16-04-13 10:16 AM, Chris Hastie - notifications@github.com wrote:

Hi Yahoo seem to be returning 502 at the moment. This is a problem at the Yahoo end, not in desklet. I suspect Yahoo maybe in the process of closing the service down I'm afraid.

Yahoo have only ever supported a limited number of attributes. If you need more, try weather.com. Yahoo's data comes from them anyway, and the feed is more complete. That said, weather.com announced some time ago that they are withdrawing the service, so I can't guarantee that it will keep working for long.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tipichris/bbcwx/issues/23#issuecomment-209467419

sacrileger commented 8 years ago

re the humidity and pressure, perhaps weather desklet doesnt display that data. comparing accuweather - weather desklets, the accuweather extracted the humidity and pressure provided at weather.com;
nevertheless, comparing all three (website + 2 desklets) side by side i get 3 slightly different datasets. not sure why. perhaps some delay in data updates? quite interesting. anyway, just thought you might be interested in some user feedback.

On 16-04-13 10:16 AM, Chris Hastie - notifications@github.com wrote:

Hi Yahoo seem to be returning 502 at the moment. This is a problem at the Yahoo end, not in desklet. I suspect Yahoo maybe in the process of closing the service down I'm afraid.

Yahoo have only ever supported a limited number of attributes. If you need more, try weather.com. Yahoo's data comes from them anyway, and the feed is more complete. That said, weather.com announced some time ago that they are withdrawing the service, so I can't guarantee that it will keep working for long.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tipichris/bbcwx/issues/23#issuecomment-209467419

tipichris commented 8 years ago

There is a list of which service supports which data here. Weather Desklet will display humidity from weather.com if you configure it to do so. Weather.com does not provide forecast pressure data (but it does provide current pressure). The most complete sets of data are from the BBC (although only for three days) and forecast.io

sacrileger commented 8 years ago

thnks for the suggestion, forecast.io. nice. very nice in fact.

On 16-04-13 11:10 AM, Chris Hastie - notifications@github.com wrote:

There is a list of which service supports which data here http://www.oak-wood.co.uk/oss/bbcwx#servicecaps. Weather Desklet will display humidity from weather.com if you configure it to do so. Weather.com does not provide forecast pressure data (but it does provide current pressure). The most complete sets of data are from the BBC (although only for three days) and forecast.io

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tipichris/bbcwx/issues/23#issuecomment-209498799