It is currently April 27th, 2024, 2:42 pm

Error when applying a weather and temperature

Get help with creating, editing & fixing problems with skins
Dapperkevin
Posts: 20
Joined: January 7th, 2024, 4:36 pm

Error when applying a weather and temperature

Post by Dapperkevin »

I am currently changing the location from this skin: https://www.deviantart.com/zivallh/art/Small-Clean-Weather-Animated-846548068
After downloading from it, it doesn't show an exact number of current temperatures and can not even change the time and location, either icons or numbers

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1
AccurateText=1
DynamicWindowSize=1
;LeftMouseDoubleClickAction=[!ActivateConfig "SmallCleanWeather" "SmallCleanWeather Eight High Low.ini"]
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh] 
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]

;RightMouseUpAction=[!SkinCustomMenu]
ContextTitle=Location: [@LocationName]
ContextAction=["https://weather.com/weather/today"]
ContextTitle2=Time: [@CurrentObservationTime] [@LocationTimezoneAbbreviation]
ContextAction2=[]
ContextTitle3=----
ContextAction3=[]
ContextTitle4=Edit Weather Variables
ContextAction4=["#@#WeatherComJSONVariables.inc"]
ContextTitle5=Open Weather Codes
ContextAction5=["https://weather.codes/"]
ContextTitle6=Edit Langauge
ContextAction6=["#@#Variables.inc"]
ContextTitle7=----
ContextAction7=[]
ContextTitle8=Fahrenheit
ContextAction8=[!WriteKeyValue Variables Units e "#@#WeatherComJSONVariables.inc"][!Refresh]
ContextTitle9=Celsius
ContextAction9=[!WritekeyValue Variables Units m "#@#WeatherComJSONVariables.inc"][!Refresh]
ContextTitle10=----
ContextAction10=[]
ContextTitle11=Change Color
ContextAction11=["#@#Addons\RainRGB4.exe" "VarName=FontColor" "FileName=#@#Variables.inc"]

[Metadata]
Name=Small Clean Weather
Author=Abruzzi
Information=Weather skin, using the weather.com website.||Right-Click skin to change Location or Language.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=Octobar 25, 2020

[Variables]
@Include1=#@#WeatherComJSONVariables.inc
@Include2=#@#WeatherComJSONMeasures.inc
@Include3=#@#Variables.inc

Scale=1
ScrollMouseIncrement=0.05

ImagePath=#@#Images\SA Suite
;Hiphopium
;SA Suite

StringAlign=left
StringStyle=Normal
;Italic
StringCase=None
;Upper
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontSize=(9*#Scale#)
FontFace=Segoe UI
Font=Gilroy ExtraBold
;Century Gothic
;Quicksand

;[DISPLAY CURRENT]=================================

[MeterIcon]
MeasureName=@CurrentIcon
Meter=IMAGE
ImagePath=#ImagePath#
X=(0*#Scale#)
Y=(7*#Scale#)
W=(70*#Scale#)
ImageTint=#FontColor#
DynamicVariables=1

[MeterTempe]
MeasureName=@CurrentTemperature
;MeasureName2=@UnitsTemperature
Meter=STRING
X=(10*#Scale#)R
Y=(10*#Scale#)
FontColor=#FontColor#
StringStyle=Normal
FontSize=(40*#Scale#)
StringAlign=Left
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontFace=Gilroy ExtraBold
Antialias=1
DynamicVariables=1
Text=%1 
LeftMouseUpAction=[!ToggleMeterGroup "BigConditions"][PLAY #@#Sounds\Hardware Remove.wav][!Redraw]

[MeterDesc]
MeasureName=@CurrentConditions
Meter=STRING
X=(10*#Scale#)R
Y=(7*#Scale#)r
FontColor=#FontColor#
FontSize=(18*#Scale#)
StringAlign=#StringAlign#
StringStyle=#StringStyle#
StringCase=#StringCase#
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontFace=#Font#
Antialias=1
Hidden=0
Group=BigConditions
DynamicVariables=1
LeftMouseUpAction=[!ToggleMeterGroup "Conditions"][PLAY #@#Sounds\Hardware Remove.wav][!Redraw]

[MeterLocation]
MeasureName=@LocationName
Meter=STRING
X=(0*#Scale#)r
Y=(0*#Scale#)r
FontColor=#FontColor#
FontSize=(18*#Scale#)
StringAlign=#StringAlign#
StringStyle=#StringStyle#
StringCase=#StringCase#
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontFace=#Font#
Antialias=1
Hidden=1

[MeterStyle]
X=(0*#Scale#)r
Y=(20*#Scale#)r
FontColor=#FontColor#,200
FontSize=#FontSize#
StringAlign=#StringAlign#
StringStyle=#StringStyle#
StringCase=#StringCase#
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontFace=#FontFace#
Antialias=1
Hidden=1
Group=Conditions
DynamicVariables=1

[MeterRealFeel]
MeasureName=@CurrentFeelsLike
Meter=STRING
MeterStyle=MeterStyle
Y=(32*#Scale#)r
Text=#Feels Like# %1 
Hidden=0
Group=BigConditions
LeftMouseUpAction=[!ToggleMeterGroup "Conditions"][PLAY #@#Sounds\Hardware Remove.wav][!Redraw]

[MeterHumidity]
MeasureName=@CurrentHumidity
Meter=STRING
MeterStyle=MeterStyle
Text=#Humidity# %1%

[MeterSunriseTime]
MeasureName=@CurrentSunriseTime
Meter=STRING
MeterStyle=MeterStyle
Text=#Sunrise# %1

[MeterSunsetTime]
MeasureName=@CurrentSunsetTime
Meter=STRING
MeterStyle=MeterStyle
Text=#Sunset# %1

[MeterVisibility]
MeasureName=@CurrentVisibilityDistance
MeasureName2=@UnitsDistance 
Meter=STRING
MeterStyle=MeterStyle
Text=#Visibility# %1 %2

[MeterWindSpeed]
MeasureName=@CurrentWindSpeed
MeasureName2=@UnitsSpeed
MeasureName3=@CurrentWindDirectionCompass
MeasureName4=@CurrentWindDirectionDegrees
Meter=STRING
MeterStyle=MeterStyle
Text=#Wind# %1 %2 %3 %4

[MeterUVIndex]
MeasureName=@CurrentUVIndex
Meter=STRING
MeterStyle=MeterStyle
Text=#UV Index# %1

I just wanna figure out the problem in this code while trying to add the location and current weather
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Error when applying a weather and temperature

Post by Yincognito »

See the discussion here (disregard the translation parts):
https://forum.rainmeter.net/viewtopic.php?t=40442&start=20#p220103
I wouldn't recommend using that skin, for the completely crazy polling of the weather.com site for any variant except the "static" one. Personally, I couldn't make it work, and I wouldn't even bother, unless the excessive requesting of data from weather.com is corrected first.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Dapperkevin
Posts: 20
Joined: January 7th, 2024, 4:36 pm

Re: Error when applying a weather and temperature

Post by Dapperkevin »

Are there any skins still working perfectly?
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Error when applying a weather and temperature

Post by Yincognito »

Dapperkevin wrote: January 8th, 2024, 1:43 pm Are there any skins still working perfectly?
Sure there are, see here:
https://forum.rainmeter.net/viewtopic.php?t=34689
However, if you DO use the "static" variant of that skin, as it seems from your code (or if you applied the correction I mentioned in the linked thread above for the other variants), then the "fix" is as simple as:
https://forum.rainmeter.net/viewtopic.php?t=39617#p202725
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Dapperkevin
Posts: 20
Joined: January 7th, 2024, 4:36 pm

Re: Error when applying a weather and temperature

Post by Dapperkevin »

IDK where to put API key
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Error when applying a weather and temperature

Post by Yincognito »

Dapperkevin wrote: January 8th, 2024, 2:00 pm it seems like some skins using weather.com doesn't work in my country anymore :(
Ah, I see - if you have that problem, then you can either try other weather skins that use alternative sources (i.e. other than weather.com). Eclectic-tech and Xenium wrote some of them:
https://forum.rainmeter.net/viewtopic.php?t=43158#p219372
https://forum.rainmeter.net/viewtopic.php?t=43064
https://forum.rainmeter.net/viewtopic.php?t=34614#p171434
https://forum.rainmeter.net/viewtopic.php?t=36471
https://forum.rainmeter.net/viewtopic.php?t=36479
Or, you can check the weather skins section of the forum and see which one works for you:
https://forum.rainmeter.net/viewforum.php?f=134
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Error when applying a weather and temperature

Post by Yincognito »

Dapperkevin wrote: January 8th, 2024, 2:00 pm IDK where to put API key
For the static variant of Small Clean Weather, just right click for the context menu, then choose:
Weather Variables.jpg
Look for the APIKey variable in the WeatherComJSONVariables.inc file that just opened for editing, change it as described, save the file and close it, then right click on the skin and choose Refresh Skin.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Dapperkevin
Posts: 20
Joined: January 7th, 2024, 4:36 pm

Re: Error when applying a weather and temperature

Post by Dapperkevin »

Where is WeatherComJSONVariables.inc located?
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Error when applying a weather and temperature

Post by Yincognito »

Dapperkevin wrote: January 8th, 2024, 2:43 pm Where is WeatherComJSONVariables.inc located?
[YourSkinsFolder]\SmallCleanWeather\@Resources\WeatherComJSONVariables.inc.
[YourSkinsFolder] is typically C:\Users\[User]\Documents\Rainmeter\Skins for a standard Rainmeter installation.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Dapperkevin
Posts: 20
Joined: January 7th, 2024, 4:36 pm

Re: Error when applying a weather and temperature

Post by Dapperkevin »

It seems like there's no way to add the location and current temperature by this method
:(