Page 1 of 3

weather

Posted: February 1st, 2017, 8:07 pm
by OneProGamer14
Hi i am currently using the "encoded" weather addon but the temperature is not showing even when i have set woeid. here is the code,

Code: Select all

[Rainmeter]
Author=lilshizzy@gmail.com
Update=1000
MouseOverAction=!Execute [!RainmeterShowMeter TempActive][!RainmeterHideMeter Temp][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter TempActive][!RainmeterShowMeter Temp][!RainmeterRedraw]
MiddleMouseDownAction=!RainmeterActivateConfig #CURRENTCONFIG# Weather_black_div-top.ini
@include=#SKINSPATH#Encoded\Variables\Fonts.inc

[Metadata]
Name=Encoded - Weather White (Divider-top)
Config=
Description=
Instructions=The default weather code is set to Los Angeles, to get your Weather Code visit (weather.yahoo.com) type in your Zip, click the RSS button, your code will be in the address bar. Click on "Edit Skin" below to enter your code.
Version=1000
Tags=
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=
Preview=

[Variables]
@include=#SKINSPATH#Encoded\Variables\Default.inc

[Styles]
@include=#SKINSPATH#Encoded\Variables\Styles.inc

;----------------------------------------------------------

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid=3500 AND u="M"
RegExp=(?siU).*distance="(.*)".*pressure="(.*)".*speed="(.*)".*temperature="(.*)".*city="(.*)".*country="(.*)".*region="(.*)".*chill="(.*)".*direction="(.*)".*speed="(.*)".*humidity="(.*)".*pressure="(.*)".*rising="(.*)".*visibility="(.*)".*sunrise="(.*)".*sunset="(.*)".*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*condition.*code="(.*)".*temp="(.*)".*text="(.*)".*forecast.*day="(.*)".*code="(.*)".*high="(.*)".*low="(.*)".*text="(.*)".*forecast.*day="(.*)".*code="(.*)".*high="(.*)".*low="(.*)".*text="(.*)".*

[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=21


;----------------------------------------------------------
;SolidColor=0,0,0,50
W=300
H=50
X=0
Y=0

[Temp]
MeasureName=MeasureWeatherTemp
Meter=STRING
MeterStyle=whtboldr
FontSize=23
X=290
Y=15
Postfix="°"

[Desc]
MeasureName=MeasureWeatherDesc
Meter=STRING
MeterStyle=whtlightr
;SolidColor=0,0,0,150
FontSize=23
X=-55r
Y=r
W=230
H=30
ClipString=1

[TempActive]
Meter=STRING
MeasureName=MeasureWeatherTemp
MeterStyle=whtboldr
FontSize=23
X=290
Y=r
FontColor=#Color4#
LeftMouseDownAction=!Execute [[MeasureWeatherRSS]]
Postfix="°"
Hidden=1

[Spacer]
Meter=IMAGE
MeterStyle=styleSeperator
SolidColor=#color2#
X=35
Y=5
W=255
H=1

Re: weather

Posted: February 1st, 2017, 8:44 pm
by sephirotess
Hi,

Please look this link.

Re: weather

Posted: February 1st, 2017, 9:21 pm
by balala
OneProGamer14 wrote:Hi i am currently using the "encoded" weather addon but the temperature is not showing even when i have set woeid. here is the code,
I think Yahoo Weather is not working any more. Although it seems that something is messed up in your URL, I'd be tempted to say to replace the URL with the proper Weather.com URL. For this, try to replace the URL and the RegExp options of the [MeasureWeatherRSS] measure with the following ones:

Code: Select all

[MeasureWeatherRSS]
...
Url=http://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Unit#&dayf=1
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>
You didn't post the content of the Variables\Default.inc file. To can use my above posted URL and RegExp options, add to the [Variables] section, the Location and Unit variables. Location is your weather location code, while Unit is equal either with m (metric - for temperatures in Celsius degrees), either with i (imperial - temperatures in Fahrenheit degrees).
If you do so, you also will have to replace the StringIndex options of the [MeasureWeatherDesc] and [MeasureWeatherTemp] measures. Use the following values:

Code: Select all

[MeasureWeatherDesc]
...
StringIndex=10

[MeasureWeatherTemp]
...
StringIndex=8
Two other observations:
  • I think something is missing from your code. The

    Code: Select all

    ;SolidColor=0,0,0,50
    W=300
    H=50
    X=0
    Y=0
    options, below the [MeasureWeatherTemp] measure, don't belongs anywhere. Especially not to a measure, these being options of a meter.
  • The Author options don't belong anymore to the [Rainmeter] section, but to [Metadata]. Move it there, because in the [Rainmeter] section it is deprecated.

Re: weather

Posted: February 2nd, 2017, 8:50 pm
by OneProGamer14
Hi i copied your instructions but no luck code is below and thanks 4 your time

Code: Select all

[Rainmeter]
Author=lilshizzy@gmail.com
Update=1000
MouseOverAction=!Execute [!RainmeterShowMeter TempActive][!RainmeterHideMeter Temp][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter TempActive][!RainmeterShowMeter Temp][!RainmeterRedraw]
MiddleMouseDownAction=!RainmeterActivateConfig #CURRENTCONFIG# Weather_black_div-top.ini
@include=#SKINSPATH#Encoded\Variables\Fonts.inc

[Metadata]
Name=Encoded - Weather White (Divider-top)
Config=
Description=
Instructions=The default weather code is set to Los Angeles, to get your Weather Code visit (weather.yahoo.com) type in your Zip, click the RSS button, your code will be in the address bar. Click on "Edit Skin" below to enter your code.
Version=1000
Tags=
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=
Preview=

[Variables]
@include=#SKINSPATH#Encoded\Variables\Default.inc

[Styles]
@include=#SKINSPATH#Encoded\Variables\Styles.inc

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=21

;----------------------------------------------------------

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=http://wxdata.weather.com/wxdata/weather/local/35300?cc=*&unit=m&dayf=1
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>
[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22

;----------------------------------------------------------
;SolidColor=0,0,0,50
W=300
H=50
X=0
Y=0

[Temp]
MeasureName=MeasureWeatherTemp
Meter=STRING
MeterStyle=whtboldr
FontSize=23
X=290
Y=15
Postfix="°"

[Desc]
MeasureName=MeasureWeatherDesc
Meter=STRING
MeterStyle=whtlightr
;SolidColor=0,0,0,150
FontSize=23
X=-55r
Y=r
W=230
H=30

Re: weather

Posted: February 2nd, 2017, 8:51 pm
by OneProGamer14
balala wrote:I think Yahoo Weather is not working any more. Although it seems that something is messed up in your URL, I'd be tempted to say to replace the URL with the proper Weather.com URL. For this, try to replace the URL and the RegExp options of the [MeasureWeatherRSS] measure with the following ones:

Code: Select all

[MeasureWeatherRSS]
...
Url=http://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Unit#&dayf=1
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>
You didn't post the content of the Variables\Default.inc file. To can use my above posted URL and RegExp options, add to the [Variables] section, the Location and Unit variables. Location is your weather location code, while Unit is equal either with m (metric - for temperatures in Celsius degrees), either with i (imperial - temperatures in Fahrenheit degrees).
If you do so, you also will have to replace the StringIndex options of the [MeasureWeatherDesc] and [MeasureWeatherTemp] measures. Use the following values:

Code: Select all

[MeasureWeatherDesc]
...
StringIndex=10

[MeasureWeatherTemp]
...
StringIndex=8
Two other observations:
  • I think something is missing from your code. The

    Code: Select all

    ;SolidColor=0,0,0,50
    W=300
    H=50
    X=0
    Y=0
    options, below the [MeasureWeatherTemp] measure, don't belongs anywhere. Especially not to a measure, these being options of a meter.
  • The Author options don't belong anymore to the [Rainmeter] section, but to [Metadata]. Move it there, because in the [Rainmeter] section it is deprecated.

Hi i copied your instructions but no luck code is below and thanks 4 your time

Code: Select all

[Rainmeter]
Author=lilshizzy@gmail.com 
Update=1000
MouseOverAction=!Execute [!RainmeterShowMeter TempActive][!RainmeterHideMeter Temp][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter TempActive][!RainmeterShowMeter Temp][!RainmeterRedraw]
MiddleMouseDownAction=!RainmeterActivateConfig #CURRENTCONFIG# Weather_black_div-top.ini
@include=#SKINSPATH#Encoded\Variables\Fonts.inc

[Metadata]
Name=Encoded - Weather White (Divider-top)
Config=
Description=
Instructions=The default weather code is set to Los Angeles, to get your Weather Code visit (weather.yahoo.com) type in your Zip, click the RSS button, your code will be in the address bar. Click on "Edit Skin" below to enter your code.
Version=1000
Tags=
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=
Preview=

[Variables]
@include=#SKINSPATH#Encoded\Variables\Default.inc

[Styles]
@include=#SKINSPATH#Encoded\Variables\Styles.inc

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=21

;----------------------------------------------------------

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=http://wxdata.weather.com/wxdata/weather/local/35300?cc=*&unit=m&dayf=1
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>
[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22

;----------------------------------------------------------
;SolidColor=0,0,0,50
W=300
H=50
X=0
Y=0

[Temp]
MeasureName=MeasureWeatherTemp
Meter=STRING
MeterStyle=whtboldr
FontSize=23
X=290
Y=15
Postfix="°"

[Desc]
MeasureName=MeasureWeatherDesc
Meter=STRING
MeterStyle=whtlightr
;SolidColor=0,0,0,150
FontSize=23
X=-55r
Y=r
W=230
H=30

Re: weather

Posted: February 2nd, 2017, 9:30 pm
by balala
OneProGamer14 wrote:Hi i copied your instructions but no luck code is below and thanks 4 your time
There are two problems with the posted code:
  • The location must have the XXXXNNNN form, where XXXX are four letters and NNNN are four digits. You can use the following site to find the needed code worldwide: https://weather.codes/. If you found it, just replace the value 35300 in the URL option of the [MeasureWeatherRSS] measure with the new one.
  • You've forgot to replace the StringIndex values of the [MeasureWeatherTemp] and [MeasureWeatherDesc] measures. Once again, use the following values:

    Code: Select all

    [MeasureWeatherTemp]
    ...
    StringIndex=8
    
    [MeasureWeatherDesc]
    ...
    StringIndex=10
And a few more, smaller problems:
  • Remove the

    Code: Select all

    ;SolidColor=0,0,0,50
    W=300
    H=50
    X=0
    Y=0
    options, below the [MeasureWeatherDesc] measure, because they are options of a meter, but above you have a measure.
  • The Author option should be moved from the [Rainmeter] section to [Metadata]. Once it belonged to [Rainmeter], but newly it's deprecated there, belonging to the [Metadata] section.
  • The !Exceute bang and the !Rainmeter prefix are also deprecated. Remove them.

Re: weather

Posted: February 3rd, 2017, 4:24 pm
by OneProGamer14
balala wrote:There are two problems with the posted code:
  • The location must have the XXXXNNNN form, where XXXX are four letters and NNNN are four digits. You can use the following site to find the needed code worldwide: https://weather.codes/. If you found it, just replace the value 35300 in the URL option of the [MeasureWeatherRSS] measure with the new one.
  • You've forgot to replace the StringIndex values of the [MeasureWeatherTemp] and [MeasureWeatherDesc] measures. Once again, use the following values:

    Code: Select all

    [MeasureWeatherTemp]
    ...
    StringIndex=8
    
    [MeasureWeatherDesc]
    ...
    StringIndex=10
And a few more, smaller problems:
  • Remove the

    Code: Select all

    ;SolidColor=0,0,0,50
    W=300
    H=50
    X=0
    Y=0
    options, below the [MeasureWeatherDesc] measure, because they are options of a meter, but above you have a measure.
  • The Author option should be moved from the [Rainmeter] section to [Metadata]. Once it belonged to [Rainmeter], but newly it's deprecated there, belonging to the [Metadata] section.
  • The !Exceute bang and the !Rainmeter prefix are also deprecated. Remove them.

Thank you very much it is working now

Re: weather

Posted: February 3rd, 2017, 6:53 pm
by balala
Glad to help.

Re: weather

Posted: February 3rd, 2017, 9:21 pm
by OneProGamer14
balala wrote:Glad to help.
Hi again, now it doesn't show the full description here is pic http://imgur.com/a/8efZO

code is here,

Code: Select all

[Rainmeter]
Author=lilshizzy@gmail.com
Update=1000
MouseOverAction=!Execute [!RainmeterShowMeter TempActive][!RainmeterHideMeter Temp][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter TempActive][!RainmeterShowMeter Temp][!RainmeterRedraw]
MiddleMouseDownAction=!RainmeterActivateConfig #CURRENTCONFIG# Weather_black_div-top.ini
@include=#SKINSPATH#Encoded\Variables\Fonts.inc

[Metadata]
Name=Encoded - Weather White (Divider-top)
Config=
Description=
Instructions=The default weather code is set to Los Angeles, to get your Weather Code visit (weather.yahoo.com) type in your Zip, click the RSS button, your code will be in the address bar. Click on "Edit Skin" below to enter your code.
Version=1000
Tags=
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=
Preview=

[Variables]
@include=#SKINSPATH#Encoded\Variables\Default.inc

[Styles]
@include=#SKINSPATH#Encoded\Variables\Styles.inc

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=8

;----------------------------------------------------------

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=http://wxdata.weather.com/wxdata/weather/local/UKXX0924?cc=*&unit=m&dayf=1
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>
[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=10

;----------------------------------------------------------

[Temp]
MeasureName=MeasureWeatherTemp
Meter=STRING
MeterStyle=whtboldr
FontSize=23
X=290
Y=15
Postfix="°"

[Desc]
MeasureName=MeasureWeatherDesc
Meter=STRING
MeterStyle=whtlightr
;SolidColor=0,0,0,150
FontSize=23
X=-55r
Y=r
W=230
H=30
ClipString=1

[TempActive]
Meter=STRING
MeasureName=MeasureWeatherTemp
MeterStyle=whtboldr
FontSize=23
X=290
Y=r
FontColor=#Color4#
LeftMouseDownAction=!Execute [[MeasureWeatherRSS]]
Postfix="°"
Hidden=1

[Spacer]
Meter=IMAGE
MeterStyle=styleSeperator
SolidColor=#color2#
X=35
Y=5
W=255
H=1

thanks again

Re: weather

Posted: February 3rd, 2017, 9:49 pm
by balala
OneProGamer14 wrote:Hi again, now it doesn't show the full description here is pic http://imgur.com/a/8efZO
Many times the code is not enough (for example now), because this one for example, has a lot of included files (like Default.inc or Styles.inc). Not knowing them, is hard to figure out a good solution. However I'll try.
So, try to modify the values of the W and H options of the [Desc] meter. These options set the width and height of the string meters. If these are set too small and the string is long enough, it has no place to be entirely shown, that's why it's clipped. Try to increase them. Give it a few tries to see if you can find a good value.
If you don't succeed, please pack the whole config and upload it. It'd be much easier for me to check what's happening.