Page 1 of 5

Weatherbox

Posted: February 3rd, 2020, 11:51 pm
by QuakeGuy
Hello everyone,

i started this weatherskin as part of my first Conky skin back in 2013. In 2016 i adapted it to Rainmeter and made version 1.0 public.

One week ago i updated the skin to work with The Weather Channel again, after there feed wxdata is no longer available. I also added new functions like hourly forecast, and fixed the auto location feature.

Image
Weatherbox_2.1.rmskin
or https://www.deviantart.com/quakeguy44/art/Weatherbox-617208855

- shows suntrail
- shows wind direction/intensity
- 5 day forecast with rain probability
- hourly forecast with humidity and rain probability
- colorized temperature (from blue to red)
- using metric or imperial units (C, km/h or F, mph)
- shows 24 hours or 12 hours (AM/PM)
- choose language for weekdays (English, German, French, Italian, Spanish, Russian, Chinese)
- can detect location by ip-address (uses city, country code and region code in the US)
- touch friendly by changing most settings with left mouseclick

Feel free to try it and comment. ;-)

Re: Weatherbox

Posted: February 4th, 2020, 12:10 am
by jsmorley
Nicely done...

You want me to add it to this post?

https://forum.rainmeter.net/viewtopic.php?f=13&t=34469

Re: Weatherbox

Posted: February 4th, 2020, 12:38 am
by QuakeGuy
that would be great :thumbup:

Re: Weatherbox

Posted: February 5th, 2020, 4:38 am
by Cariboudjan
There's work being done on discord right now to utilize the weather channel's API to get weather info, and the results look promising. You might want to retool your skin soon. Using HTML is a pretty iffy prospect. Any small change to the website will break your skin for you and anyone out there using it.

Re: Weatherbox

Posted: February 5th, 2020, 12:44 pm
by QuakeGuy
Thanks for the hint. Luckily i won't use the html tags in the html file i get from The Weather Channel (https://weather.com/en-#Unit#/weather/today/l/#Location#). Instead there complete api data are at the end of the file in JSON.

{"SUN_V1_API_KEY":"d522aa97197fd864d36b418f39ebb323","SUN_V1_HOST_NAME":"api.weather.com",

So the parsed data will not break. Another advantage compared with the old wxdata feed is that the data will be updated more often. Formerly it were 20 minutes. Now it's like 5 minutes.

Re: Weatherbox

Posted: February 5th, 2020, 7:24 pm
by QuakeGuy
Today i updated to version 1.82.

The new written "show 24 hours" or "12 hours AM/PM" feature had a annoying bug, i just noticed after version 1.8 was released. The updated time was not always show on the skin.

Re: Weatherbox

Posted: February 6th, 2020, 7:42 pm
by QuakeGuy
I lacked testing the 12 hour AM/PM feature badly. :uhuh:

The hours at pm time were showing wrong. Now it should work fine with the new version 1.83.

Re: Weatherbox

Posted: February 6th, 2020, 9:19 pm
by jsmorley
Just a note. I don't think the routine to automatically find your location code is going to be useful in a lot of cases. For me at least, it seems to find "Alexandria", which is actually wrong to start with, and from that says, "well, it must be the FIRST Alexandria!" So that would be that little two-horse, one traffic light and a Piggly Wiggly supermarket trailer-park in Alabama, not the major city in Virginia...

;-)

Re: Weatherbox

Posted: February 7th, 2020, 6:06 pm
by QuakeGuy
Right. The auto location feature doesnt't work in all cases. Cities in the US seem to be much less unique. https://weather.codes/ finds 16 Alexandrias in the US, and of course he uses the first hit.

USAL0011Alexandria, United States of AmericaUSIN0006Alexandria, United States of AmericaUSLA0008Alexandria, United States of AmericaUSLA0009Alexandria/Esler Regional Arpt, United States of AmericaUSMN0017Alexandria, United States of AmericaUSMO0007Alexandria, United States of AmericaUSNE0006Alexandria, United States of AmericaUSNY0018Alexandria Bay, United States of AmericaUSOH0010Alexandria, United States of AmericaUSOH1018West Alexandria, United States of AmericaUSOH1193New Alexandria, United States of AmericaUSPA0021Alexandria, United States of AmericaUSPA1142New Alexandria, United States of AmericaUSSD0005Alexandria, United States of AmericaUSTN0006Alexandria, United States of AmericaUSVA0007Alexandria, United States of America

I use https://ipinfo.io/city and https://ipinfo.io/country to determine the location and the search feature of https://weather.codes/. For the US you can add the region code with https://ipapi.co/region_code. All other countries seem to have XX in this place (3 and 4 digit ot the weather code).

Is there another solution you can use without registering and making a key? https://www.ip2location.com/ has the weather station, but its not parsable.

Re: Weatherbox

Posted: February 7th, 2020, 6:31 pm
by jsmorley
QuakeGuy wrote: February 7th, 2020, 6:06 pm Right. The auto location feature doesnt't work in all cases. Cities in the US seem to be much less unique. https://weather.codes/ finds 16 Alexandrias in the US, and of course he uses the first hit.

USAL0011Alexandria, United States of AmericaUSIN0006Alexandria, United States of AmericaUSLA0008Alexandria, United States of AmericaUSLA0009Alexandria/Esler Regional Arpt, United States of AmericaUSMN0017Alexandria, United States of AmericaUSMO0007Alexandria, United States of AmericaUSNE0006Alexandria, United States of AmericaUSNY0018Alexandria Bay, United States of AmericaUSOH0010Alexandria, United States of AmericaUSOH1018West Alexandria, United States of AmericaUSOH1193New Alexandria, United States of AmericaUSPA0021Alexandria, United States of AmericaUSPA1142New Alexandria, United States of AmericaUSSD0005Alexandria, United States of AmericaUSTN0006Alexandria, United States of AmericaUSVA0007Alexandria, United States of America

I use https://ipinfo.io/city and https://ipinfo.io/country to determine the location and the search feature of https://weather.codes/. For the US you can add the region code with https://ipapi.co/region_code. All other countries seem to have XX in this place (3 and 4 digit ot the weather code).

Is there another solution you can use without registering and making a key? https://www.ip2location.com/ has the weather station, but its not parsable.
I don't know of a good, reliable way to do this. If you search some site based on your IP, that is actually going to be at the "point of presence" of your ISP, and may be a very long distance from you. Mine is probably 25 miles away from me, and is useless for this. There are sites that will use the more accurate "geolocation" stuff built into modern browsers, but WebParser is not going to support that, as it isn't a "browser", and in any case requires a "permission" that you can't get.

You can't effectively search that https://weather.codes/ site automatically, it just doesn't work. Working 1/3 of the time is exactly the same as not working at all. You can certainly manually drill down into your country and state/region and then search, but as noted, there may be 4 "Springfield" names in a single state.
The U.S. Board of Geographic Names lists 67 Springfields across the U.S.—but the name isn't just an American phenomenon. Almost every English-speaking country on earth has a town, village, or city called Springfield.
https://www.ip2location.com/ just uses the IP-based solution I mentioned and is entirely useless, even if you could parse it.

Personally, I think it is a fool's errand to try and automatically detect a user's location. Tell them how to go find it and have them plug it in...