It is currently January 17th, 2019, 1:31 am

Weather not working?

Help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 7426
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

balala » May 30th, 2017, 3:11 pm

picasso21 wrote:Please skin Enigma weather update , error thank you :welcome:
Not very sure what is the problem. Have you updated the skin? Where from? Did it work before and now it doesn't?
Please give us some more information.
User avatar
picasso21
Posts: 13
Joined: July 28th, 2009, 11:58 pm

Re: Weather not working?

picasso21 » May 31st, 2017, 2:22 am

balala wrote:Not very sure what is the problem. Have you updated the skin? Where from? Did it work before and now it doesn't?
Please give us some more information.
Enigma weather

Code: Select all

https://enigma.kaelri.com/downloads/
User avatar
picasso21
Posts: 13
Joined: July 28th, 2009, 11:58 pm

Re: Weather not working?

picasso21 » May 31st, 2017, 7:48 am

I have another weather skin I could not work for pais brasil sp ,thanks :confused:

Code: Select all

http://toastbrotpascal.deviantart.com/art/SDT-161064442
User avatar
balala
Rainmeter Sage
Posts: 7426
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

balala » May 31st, 2017, 11:49 am

picasso21 wrote:I have another weather skin I could not work for pais brasil sp ,thanks :confused:

Code: Select all

http://toastbrotpascal.deviantart.com/art/SDT-161064442
This skin is very old and it uses Yahoo Weather and as such, although mak_kawa said in an earlier post that it is still working, I couldn't figure out how can it be made to properly work. So, probably the code of the skin should be completely rewritten, to make it to work.

About the Enigma Weather, it also used Yahoo Weather. A while ago I (partially) rewrote it, to make it to use the Weather.com.
So, I think the only thing which should be done is to replace the code of the YahooWeather.inc file (within the @Resources\Measures folder), with the following one:

Code: Select all

[MeasureYahooWeather]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#Unit#&dayf=4
RegExp=(?siU)<weather ver="(.*)">.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)</up>.*<ur>(.*)</ur>.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)</r>.*<d>(.*)</d>.*</bar>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*</wind>.*<hmid>(.*)</hmid>.*<vis>(.*)</vis>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>
StringIndex=1

;-----------------------
; LOCATION
 
[MeasureWeatherLocation]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=7

[MeasureWeatherCity]
Measure=String
String=[MeasureWeatherLocation]
RegExpSubstitute=1
Substitute="^(.*), (.*), (.*)$":"\1"
DynamicVariables=1

[MeasureWeatherRegion]
Measure=String
String=[MeasureWeatherLocation]
RegExpSubstitute=1
Substitute="^(.*), (.*), (.*)$":"\2"
DynamicVariables=1

[MeasureWeatherCountry]
Measure=String
String=[MeasureWeatherLocation]
RegExpSubstitute=1
Substitute="^(.*), (.*), (.*)$":"\3"
DynamicVariables=1

;-----------------------
; UNITS

[MeasureWeatherUnitTemp]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=2

[MeasureWeatherUnitDistance]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=3

[MeasureWeatherUnitPressure]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=5

[MeasureWeatherUnitSpeed]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=4

;-----------------------
; WIND

[MeasureWeatherWindChill]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=14

[MeasureWeatherWindDirection]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=21

[MeasureWeatherWindDirectionCardinal]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=22
;Measure=Calc
;Formula=FLOOR(((MeasureWeatherWindDirection/11.25)+1.5) < 33 ? ((MeasureWeatherWindDirection/11.25)+1.5) : ((MeasureWeatherWindDirection/11.25)+1.5)-32)
;Substitute="10":"EbS","11":"ESE","12":"SEbE","13":"SE","14":"SEbS","15":"SSE","16":"SbE","17":"S","18":"SbW","19":"SSW","20":"SWbS","21":"SW","22":"SWbW","23":"WSW","24":"WbSW","25":"W","26":"WbN","27":"WNW","28":"NWbW","29":"NW","30":"NWbN","31":"NNW","32":"NbW","1":"N","2":"NbE","3":"NNE","4":"NEbN","5":"NE","6":"NEbE","7":"ENE","8":"EbN","9":"E"

[MeasureWeatherWindSpeed]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=19

;-----------------------
; ATMOSPHERE

[MeasureWeatherAtmoHumidity]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=23

[MeasureWeatherAtmoVisibility]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=24

[MeasureWeatherAtmoPressure]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=17

;--------------------------------
; SUN

[MeasureWeatherSunrise]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=10

[MeasureWeatherSunset]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=11

;--------------------------------
; REGION

[MeasureWeatherTimeZone]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=12

[MeasureWeatherLatitude]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=8

[MeasureWeatherLongitude]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=9

;--------------------------------
; CURRENT

[MeasureWeatherDesc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=15

[MeasureWeatherIcon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=16

[MeasureWeatherTemp]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=13

;-------------------------
; DAY 2

[MeasureWeatherDay2Date]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=33
;Substitute="Sun":"Sunday","Mon":"Monday","Tue":"Tuesday","Wed":"Wednesday","Thu":"Thursday","Fri":"Friday","Sat":"Saturday"

[MeasureWeatherDay2Low]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=36

[MeasureWeatherDay2High]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=35

[MeasureWeatherDay2Average]
Measure=Calc
Formula=ROUND((MeasureWeatherDay2Low+MeasureWeatherDay2High)/2)

[MeasureWeatherDay2Desc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=38

[MeasureWeatherDay2Icon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=37

;-------------------------
; DAY 3

[MeasureWeatherDay3Date]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=39
;Substitute="Sun":"Sunday","Mon":"Monday","Tue":"Tuesday","Wed":"Wednesday","Thu":"Thursday","Fri":"Friday","Sat":"Saturday"

[MeasureWeatherDay3Low]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=42

[MeasureWeatherDay3High]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=41

[MeasureWeatherDay3Average]
Measure=Calc
Formula=ROUND((MeasureWeatherDay3Low+MeasureWeatherDay3High)/2)

[MeasureWeatherDay3Desc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=44

[MeasureWeatherDay3Icon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=43

;-----------------------
; LOGO
; Yahoo! Weather requires that any application which uses their API include the Y!W logo and a link to their website. This section will automatically insert those elements into any skin which uses this measure module. Please do not remove these elements if you are redistributing this file with your own skin.

[YahooWeatherLogo]
Meter=IMAGE
MeterStyle=Style#Variant#Icon
Group=EnigmaMouseover
ImageName=#@#Images\MoxaWeather\Logo.png
H=25
W=25
Hidden=1
LeftMouseUpAction=["http://weather.yahoo.com/"][!Redraw]
ToolTipText=Powered by Yahoo! Weather.
Check the LocationCode and Unit variables. The first is your location code, which can be found here: https://weather.codes/
The Unit can be either m (metric - temperatures in Celsius degrees), or i (imperial - temperatures in Fahrenheit degrees). These variables are located into the @Resources\User\Options.inc file, you should replace them there.
sierratango
Posts: 2
Joined: December 27th, 2016, 1:21 am

Re: Weather not working?

sierratango » January 8th, 2019, 4:31 am

balala wrote:
May 31st, 2017, 11:49 am
This skin is very old and it uses Yahoo Weather and as such, although mak_kawa said in an earlier post that it is still working, I couldn't figure out how can it be made to properly work. So, probably the code of the skin should be completely rewritten, to make it to work.

About the Enigma Weather, it also used Yahoo Weather. A while ago I (partially) rewrote it, to make it to use the Weather.com.
So, I think the only thing which should be done is to replace the code of the YahooWeather.inc file (within the @Resources\Measures folder), with the following one:
Thank you very much for revising Enigma Weather to use Weather.com, it works perfectly! Yahoo recently ended their weather API so it is great to be able to switch to Weather.com.
User avatar
balala
Rainmeter Sage
Posts: 7426
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

balala » January 8th, 2019, 8:42 am

sierratango wrote:
January 8th, 2019, 4:31 am
Yahoo recently ended their weather API so it is great to be able to switch to Weather.com.
Yes, Yahoo Weather in the meantime indeed hanged up. Some other users (I'm thinking about eclectic-tech right now) also rewrote Enigma Weather: https://forum.rainmeter.net/viewtopic.php?f=5&t=30807#p157183. Review his reply too, especially that it's newer then my one and a half year old post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3129
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Weather not working?

eclectic-tech » January 8th, 2019, 8:14 pm

balala wrote:
January 8th, 2019, 8:42 am
Yes, Yahoo Weather in the meantime indeed hanged up. Some other users (I'm thinking about eclectic-tech right now) also rewrote Enigma Weather: https://forum.rainmeter.net/viewtopic.php?f=5&t=30807#p157183. Review his reply too, especially that it's newer then my one and a half year old post.
@ balala
I didn't realize you had posted this a year ago, when I posted my recent corrections. If I had known I would have definitely pointed to this post for the correction. :confused:

I did add a few other "tweaks" to Enigma's related skins, but this post will help get the weather working. Either method is going to get the skin working. Nicely done! :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 7426
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

balala » January 8th, 2019, 8:21 pm

eclectic-tech wrote:
January 8th, 2019, 8:14 pm
@ balala
I didn't realize you had posted this a year ago, when I posted my recent corrections. If I had known I would have definitely pointed to this post for the correction. :confused:

I did add a few other "tweaks" to Enigma's related skins, but this post will help get the weather working. Either method is going to get the skin working. Nicely done! :thumbup:
Don't worry, it's a good thing you've posted your own solution, this way sierratango can choose the solution he likes more.