It is currently March 28th, 2024, 8:26 pm

Help with weather icons

Get help with creating, editing & fixing problems with skins
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Help with weather icons

Post by Crash »

Im setting up my own Weather icon skin for personal use and I want it to only have images, the issue im having is said images are "Gifs" I've gotten the gif portions to work and the "Weather updating" to some degree, atm it gets the weather and sets the according icons but the issue is I dont know any way to get all the correct icon folder names (Cloudy is n400, while sunny is d100)

Code: Select all

[Rainmeter]
Author=xxenium
AppVersion=1.0


[Variables]
UpdateRateSeconds=100
FontFace=Subpear
URL=https://www.foreca.com/United_States/Texas/Katy?tenday
URL1=https://www.foreca.com/United_States/Texas/Katy

;=============Measure=============
[MeasureName]
Measure=WebParser
Url=#URL#
RegExp="(?siU)<h1>(.*)</h1>.*"
UpdateRate=#UpdateRateSeconds#
Substitute="&deg;":""
StringIndex=1

[MeasureSymbol]
Measure=WebParser
Url=#URL1#
RegExp="(?siU)<div class="symbol_70x70.* symbol_(.*)_70x70 cc_symb".*"
StringIndex=1
UpdateRate=#UpdateRateSeconds#
FinishAction=[!EnableMeasureGroup Counters][!UpdateMeasure MeasureSetCounter]

[MeasureConditions]
Measure=WebParser
Url=#URL1#
RegExp="(?siU)<div class="right txt-tight">(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
RegExpSubstitute=1
Substitute="\t":"","#CRLF#":""

[ImageNumberCalc]
Measure=Calc
Formula=Counter % 3

[MeasureSetCounter]
Measure=String
Group=Counters
String=[MeasureSymbol]
DynamicVariables=1
Disabled=1
UpdateDivider=-1

;==============Meter===================

[MeterSymbol]
Meter=Image
ImageName=#@#Images\[MeasureSymbol]\Frame[ImageNumberCalc].png
X=0
Y=0
DynamicVariables=1

[MeterConditions]
Meter=String
MeasureName=MeasureSymbol
X=30
Y=80
W=355
H=150
FontColor=250,250,250,250
FontSize=22
FontFace=Calibri
StringStyle=BOLD
StringAlign=Left
StringEffect=SHADOW
FontEffectColor=0,0,0,80
ClipString=1
AntiAlias=1
This code is a modified variant of another users code on here, any help would be much appreciated!
I fear the issue is with the site itself but im not sure what site to use as other sites seem outdated in this scenario...
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Help with weather icons

Post by Mor3bane »

Hi
Instead of using the live site icons, use the string values for comparison for the names of your local icons. This can be done several ways. For example the string "sunny" would be Substituted with d100.gif
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Help with weather icons

Post by xenium »

Crash wrote: February 12th, 2020, 1:59 am but the issue is I dont know any way to get all the correct icon folder names (Cloudy is n400, while sunny is d100)
These are the names of the conditions for "day":
>Day<

"d000">="Clear">
"d100">="Mostly clear">
"d200">="Partly cloudy">
"d300">="Cloudy">
"d400">="Overcast">
"d500">="Thin high clouds">
"d600">="Fog">

"d210">="Partly cloudy and light rain">
"d310">="Cloudy and light rain">
"d410">="Overcast and light rain">

"d220">="Partly cloudy and showers">
"d320">="Cloudy and showers">
"d420">="Overcast and showers">

"d430"><abbr title="Overcast and rain">

"d240">="Partly cloudy, possible thunderstorms with rain">
"d340">="Cloudy, thunderstorms with rain">
"d440">="Overcast, thunderstorms with rain">

"d211">="Partly cloudy and light wet snow">
"d311">="Cloudy and light wet snow">
"d411">="Overcast and light wet snow">

"d221">="Partly cloudy and wet snow showers">
"d321">="Cloudy and wet snow showers">
"d421">="Overcast and wet snow showers">

"d431">="Overcast and wet snow">

"d212">="Partly cloudy and light snow">
"d312">="Cloudy and light snow">
"d412">="Overcast and light snow">

"d222">="Partly cloudy and snow showers"
"d322">="Cloudy and snow showers">
"d422">="Overcast and snow showers">

"d432">="Overcast and snow">
For the night, the conditions have the same name and the icons have "n" in front instead of "d
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Help with weather icons

Post by Crash »

xenium wrote: February 12th, 2020, 10:01 am These are the names of the conditions for "day":
>Day<

"d000">="Clear">
"d100">="Mostly clear">
"d200">="Partly cloudy">
"d300">="Cloudy">
"d400">="Overcast">
"d500">="Thin high clouds">
"d600">="Fog">

"d210">="Partly cloudy and light rain">
"d310">="Cloudy and light rain">
"d410">="Overcast and light rain">

"d220">="Partly cloudy and showers">
"d320">="Cloudy and showers">
"d420">="Overcast and showers">

"d430"><abbr title="Overcast and rain">

"d240">="Partly cloudy, possible thunderstorms with rain">
"d340">="Cloudy, thunderstorms with rain">
"d440">="Overcast, thunderstorms with rain">

"d211">="Partly cloudy and light wet snow">
"d311">="Cloudy and light wet snow">
"d411">="Overcast and light wet snow">

"d221">="Partly cloudy and wet snow showers">
"d321">="Cloudy and wet snow showers">
"d421">="Overcast and wet snow showers">

"d431">="Overcast and wet snow">

"d212">="Partly cloudy and light snow">
"d312">="Cloudy and light snow">
"d412">="Overcast and light snow">

"d222">="Partly cloudy and snow showers"
"d322">="Cloudy and snow showers">
"d422">="Overcast and snow showers">

"d432">="Overcast and snow">
For the night, the conditions have the same name and the icons have "n" in front instead of "d
I see, Thanks a ton!
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Help with weather icons

Post by Crash »

Now im getting a smaller issue that seems more site sided, that there is no icon being displayed for the weather, the folder name is just XXX https://www.foreca.com/United_States/Texas/Katy
However another weather skin im using (Windows 10 Weather Enterprise) that uses the https://weather.com/ setup dosnt have this issue, would i be better off using weather.com instead of forca? and if so how would i make these changes?
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Help with weather icons

Post by Crash »

I would also assume weather.com would work better because I also want to get some things like "Local pollen warning"
<span class="warning-text" classname="warning-text">Local Pollen Alert</span>
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Help with weather icons

Post by xenium »

Crash wrote: February 12th, 2020, 12:08 pm Now im getting a smaller issue that seems more site sided, that there is no icon being displayed for the weather, the folder name is just XXX https://www.foreca.com/United_States/Texas/Katy
However another weather skin im using (Windows 10 Weather Enterprise) that uses the https://weather.com/ setup dosnt have this issue, would i be better off using weather.com instead of forca? and if so how would i make these changes?
This issue occurs because Foreca displays the weather data according to the selected observation station.
There are cases when the station does not provide all the weather parameters.
We recently updated the LiveWeather skin and now you can select the station (when one station does not provide all the data you can choose another station).
Weather.com does not display data by station and thus there are no cases to not display data.

Below is a skin that contains the code to work with Weather.com.
If the image does not appear, look for a location where the condition is SUNNY and replace the location code in the URL link
SkinGif_.rmskin
See the Liveweather skin to see how to add gifs for other weather conditions
You need to replace the numbers of folders in Foreca (d100, n300 ...) with the numbers of icons used by weather.com (0-47)


PS:
At Weather.com, different weather conditions can be displayed for the same icon, so the image displayed may not match the text of the weather condition.
At Foreca for every condition there is an icon.
You do not have the required permissions to view the files attached to this post.
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Help with weather icons

Post by Crash »

xenium wrote: February 12th, 2020, 3:03 pm This issue occurs because Foreca displays the weather data according to the selected observation station.
There are cases when the station does not provide all the weather parameters.
We recently updated the LiveWeather skin and now you can select the station (when one station does not provide all the data you can choose another station).
Weather.com does not display data by station and thus there are no cases to not display data.

Below is a skin that contains the code to work with Weather.com.
If the image does not appear, look for a location where the condition is SUNNY and replace the location code in the URL link
SkinGif_.rmskin
See the Liveweather skin to see how to add gifs for other weather conditions
You need to replace the numbers of folders in Foreca (d100, n300 ...) with the numbers of icons used by weather.com (0-47)


PS:
At Weather.com, different weather conditions can be displayed for the same icon, so the image displayed may not match the text of the weather condition.
At Foreca for every condition there is an icon.
Ahh i see, This works! thanks a ton! I'll have too add some more minor modifications to show pollen warning and the rain alerts (Which may take a bit to get what each one should be shortcutted as) but overall this should work for now! thanks!
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Help with weather icons

Post by Crash »

So I guess now is a better time than ever to try to set this up with the conditions going on here right now, in Katy texas theres a local pollen warning, I would want to check if thats up via something somehow looking for the line
<span class="warning-text" classname="warning-text">Local Pollen Alert</span>

I am aware I should use something like RegExp however being relativly new I'm unsure how I would make a form if it says X show Y image...
How would i go about opening an image based on what this warning-text shows?
Thanks in advance!
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Help with weather icons

Post by xenium »

Crash wrote: February 12th, 2020, 8:45 pm So I guess now is a better time than ever to try to set this up with the conditions going on here right now, in Katy texas theres a local pollen warning, I would want to check if thats up via something somehow looking for the line
<span class="warning-text" classname="warning-text">Local Pollen Alert</span>

I am aware I should use something like RegExp however being relativly new I'm unsure how I would make a form if it says X show Y image...
How would i go about opening an image based on what this warning-text shows?
Thanks in advance!
I added the Pollen Alert
SkinGif+PollenAlert_.rmskin
You do not have the required permissions to view the files attached to this post.