Closed ccprog closed 8 years ago
Works nicely. Thanks!
EDIT: There is one quirk, the windchill value for celsius displays the fahrenheit value. E.g. Temp of 14_C will have 59_C wind chill
There are more unit inconsistencies. The data delivered by Yahoo for Berlin today:
http://query.yahooapis.com/v1/public/yql?format=json&q=select * from weather.forecast where woeid=638242 and u="c"
"units": {
"distance": "km", "pressure": "mb", "speed": "km/h", "temperature": "C"
},
"wind": {
"chill": "46", "direction": "185", "speed": "28.97"
},
"atmosphere": {
"humidity":"88", "pressure":"33830.04", "rising":"0", "visibility":"19.79"
}
http://query.yahooapis.com/v1/public/yql?format=json&q=select * from weather.forecast where woeid=638242 and u="f"
"units": {
"distance": "mi", "pressure": "in", "speed": "mph", "temperature": "F"
},
"wind": {
"chill":"46", "direction": "185", "speed": "18"
},
"atmosphere": {
"humidity": "88", "pressure": "999.0", "rising": "0", "visibility":"12.3"
}
This is a mess.
I think I'll adapt the chill conversion, but leave the other ones alone for now.
Unfortunately, not working for me... [Cinnamon 2.8.7 @ Fedora 23] The applet will crash everytime I try to add/load it. Restarting Cinnamon does not help.
Can you take a look at the Looking Glass log? (Super+L, Tab "Log" or in raw form at ~/.cinnamon/glass.log)
Hmm, I don't know why it was not working before, but it is working for me now. Sorry for the confusion.
But I can confirm that the pressure value in mbar is out of range. Currently it is 1015 mbar, according to my phone, but the applet shows 33220.49 mbar.
Temperature, wind, humidity and wind chill seems to be OK.
I had the same problem and after update with these changes, everything worked like a charm.
Where can you get these changes? The repo at the head of these comments shows that its most recent change is 28 days ago and that was just a version bump. I have version 1.12.4, which is what that repo is. I think the change described here may fix this:
TypeError: json.get_object_member(...).get_object_member(...).get_object_member(...) is null
But I can't find where it is!
Found it - was looking at the wrong repo (needed ccprog's fork) and branch...
Good news - it works!
Works perfectly. Thanks.
Thanks for the fix, really appreciated :)
Thanks for fixing it
At pressure they mess inHg with mbar. To fix this i divided with WEATHER_CONV_MBAR_IN_INHG
switch (this._pressureUnit) { case WeatherPressureUnits.MBAR: if (this._temperatureUnit == WeatherUnits.FAHRENHEIT) { pressure = pressure * WEATHER_CONV_MBAR_IN_INHG } // Otherwise no conversion needed - already in correct units pressure = pressure / WEATHER_CONV_MBAR_IN_INHG pressure = parseFloat(pressure).toFixed(2) break
and so on for the rest
Chill data are obviously in F, unconverted for both.
Good catch.
The pressure conversion factor is the right one between inHg and mbar, but the values make no sense - it seems the mbar value is read as if it was inHg. Same for visibility: the km value is read as if it was mi Same for wind speed: the km/h value is read as if it was mph
Same here.
Merged. I'd like to figure out the unit inconsistencies before cutting a release. Please feel free to continue discussion here.
Don't work for me at all. My system: Linux Mint 17.3, 64 bit What i had done: remove ~/.local/share/cinnamon/applets/weather@mockturtl git clone https://github.com/ccprog/cinnamon-weather.git "weather@mockturtl"
The error in .cinnamon/glass.log: error t=2016-05-12T09:06:16.534Z weather@mockturtl#: TypeError: json.get_object_member(...).get_object_member(...).get_object_member(...) is null
I tried the old and new weather codes GMXX0088 and 676864 for my city Münster, Germany Some more hints?
Thanks, ikarus
@Ikarus13, If you are using my git ccprog/cinnamon-weather, you need to change the branch:
git checkout ccprog-yahoo-new-format
In mockturtl/cinnamon-weather, the changes are now part of the master branch
@mockturtl, the question is whether you would patch errors that are obviously in the realm of Yahoo. These errors are known (here and here) and you would have to track their correction and eventually remove the patches again.
I don't see a way to reliably distinguish correct and garbled data from the API response.
Now that this has been merged, is there any plans of a new release of this applet in the near future? Because in the meantime, the applet is broken to everyone (not using git), so I believe a new release should be a high priority.
Now that this has been merged, is there any plans of a new release of this applet in the near future?
Please don't make me continue to moderate your useless questions.
As described in #127, there seem to be changes to the weather API. These are reflected here, and are working for me as of 13-4-2016.
In addition, to enable users to find current WOEIDs, the "Get WOEID" button now points to http://woeid.rosselliot.co.nz/