It is currently April 20th, 2024, 3:10 am

Weatherbox

Weather skins
Moat
Posts: 3
Joined: May 15th, 2023, 5:57 pm

Re: Weatherbox

Post by Moat »

Hello Quakeguy & folks,

I'm curious if anyone else has noticed that within the past 3-4 days, Weatherbox has for some reason "switched" to showing temperatures and wind speed in *Metric only* - i.e.; Celsius and km/h. Selecting "Imperial (F)" from the "Custom skin actions" context menu has no effect. The log displays no errors. I've downloaded and (re)installed the latest Weatherbox 2.02 version from the first page of this thread with no change in behavior (still only Celsius/km/h will display). Other weather.com Rainmeter widgets running at the same time are functioning/displaying normally.

I'm in the U.S. (Michigan), this is on Windows 7 with an older Rainmeter version (v 4.2.0 r3111 64-bit/English 1033 - which I prefer as its CPU usage seems noticeably lower than later versions). Interestingly, this exact same setup works normally (shows Imperial; Fahrenheit & mph) on another old laptop running Windows 11... :???:

I suppose I'll have to live with it, as long as I run this older Rainmeter version on an old operating system (I won't give up my Win7!! :lol: ). But I *am* curious as to what may have changed (likely a change in weather.com's web code, I'm thinking) and, of course, would prefer to fix it somehow.

Thanks,

Bob
User avatar
Yincognito
Rainmeter Sage
Posts: 7128
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weatherbox

Post by Yincognito »

Moat wrote: May 15th, 2023, 6:25 pmInterestingly, this exact same setup works normally (shows Imperial; Fahrenheit & mph) on another old laptop running Windows 11... :???: [...] But I *am* curious as to what may have changed (likely a change in weather.com's web code, I'm thinking) and, of course, would prefer to fix it somehow.
I'll let the author fix this as it's his domain, but the reason for it is that the en-US part of the address used to retrieve data from weather.com in [MeasureWeather]:

Code: Select all

URL=https://weather.com/en-#Unit#/weather/today/l/#Location#
does not specify the units, but the language. The said option should be something like:

Code: Select all

URL=https://weather.com/#Language#/weather/today/l/#Location#?unit=#Unit#
assuming that setting both the language and / or the unit is desired in the skin. Of course, as I said, this alone won't do what you want, it's up for the author to correct it, but you can easily notice what I mentioned by using, say:

Code: Select all

https://weather.com/en-US/weather/today/l/GMXX0007
which will not use imperial (US) units for Berlin, while:

Code: Select all

https://weather.com/en-US/weather/today/l/GMXX0007?unit=e
will do it (e=imperial units, h=hybrid units, m=metric units).

Basically, some of the code where Unit is encountered (there are 13 occurrences of it in the skin) has to be adjusted so that it uses m, e, h instead of the current IE, GB, US, while taking care to use the unit variable in the indicated place after the ?unit= part of the (also to be adjusted) URL address. Not that big of a deal.

And yes, it happens to me too.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Moat
Posts: 3
Joined: May 15th, 2023, 5:57 pm

Re: Weatherbox

Post by Moat »

Thanks, Yincognito - I've gone and replaced the URL with your last ?unit=e example above, using my own location code - that appears to work perfectly well for the time being, until (if/when) Quakeguy gets around to tweaking this himself.

I'm fairly inept at Rainmeter coding, but believe I get the gist of your (well written!) explanation above and will use those pointers in some further tinkering to see where it goes. But all's good for now.

Thanks again!

Bob
User avatar
Yincognito
Rainmeter Sage
Posts: 7128
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weatherbox

Post by Yincognito »

Moat wrote: May 16th, 2023, 2:58 am Thanks, Yincognito - I've gone and replaced the URL with your last ?unit=e example above, using my own location code - that appears to work perfectly well for the time being, until (if/when) Quakeguy gets around to tweaking this himself.

I'm fairly inept at Rainmeter coding, but believe I get the gist of your (well written!) explanation above and will use those pointers in some further tinkering to see where it goes. But all's good for now.

Thanks again!

Bob
No problem - glad you got it working! Hopefully the author will adjust the few details needed to implement this in a fix or newer version. I would have done it myself, but I have no idea how the author will want to tackle this, as it's his skin. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
QuakeGuy
Posts: 36
Joined: February 3rd, 2020, 11:15 pm
Location: Germany

Re: Weatherbox

Post by QuakeGuy »

Thx Yincognito for pointing the change in unit mode detection out. I released a new version. Now imperial mode works again with proper color coding from hot (red) to cold (blue).

Long weather codes are also properly supportded. 64 characters can be input as weather location code and i shortened the displayed code, so the skin is not moved in its position.
User avatar
Yincognito
Rainmeter Sage
Posts: 7128
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weatherbox

Post by Yincognito »

QuakeGuy wrote: May 20th, 2023, 5:22 pm Thx Yincognito for pointing the change in unit mode detection out.
No problem - glad it resulted in something positive for your skin. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Moat
Posts: 3
Joined: May 15th, 2023, 5:57 pm

Re: Weatherbox

Post by Moat »

From here, the new version 2.04 indeed appears to be working perfectly again. YaY! :) Thanks much for the quick fix, QuakeGuy!! :thumbup:

Bob
User avatar
QuakeGuy
Posts: 36
Joined: February 3rd, 2020, 11:15 pm
Location: Germany

Re: Weatherbox

Post by QuakeGuy »

Today i released a small fix. The name displayed changed to the city district. This only happened if you used the short weather code.
User avatar
QuakeGuy
Posts: 36
Joined: February 3rd, 2020, 11:15 pm
Location: Germany

Re: Weatherbox

Post by QuakeGuy »

After fiddling with the new behaviour of the location names, i made a proper release.

In version 2.1 you can configure the displayed location name as city or district. Use the according custom skin action or just right click the location name. Lately Unicode code point values are used for special characters like German Umlaute (\u00f6 - ö), so i bumped the required Rainmeter version to 4.4 revision 3400.