It is currently March 28th, 2024, 9:09 am

Weather of my city is not working

Get help with installing and using Rainmeter.
SiriusEye
Posts: 7
Joined: September 14th, 2012, 9:07 pm

Weather of my city is not working

Post by SiriusEye »

I noticed that weather forecast code of my city (Kazan', Russia) is not working. The code is RSXX0043. Any other code is working well. I can't understand how it may be. The code is proper and perfectly worked before. The problem appeared just a week ago.
RSXX0043 - code of Kazan'.
That is my city - https://en.wikipedia.org/wiki/Kazan
Please help!
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Weather of my city is not working

Post by mak_kawa »

Are you using weather.com's data feed? If so, current feed for http://wxdata.weather.com/wxdata/weather/local/RSXX0043?cc=*&unit=m&dayf=1 does not match with "RegExp=" expression working for other locations, so causes RegExp matching error.

I think, it is possibly a temporary flaw in weather.com's feed. It is possible to modify/adapt "RegExp=" expression for current (flawed?) feed. But it may become wasted effort when weather feed went back to correct form as in other location.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather of my city is not working

Post by balala »

mak_kawa wrote:I think, it is possibly a temporary flaw in weather.com's feed. It is possible to modify/adapt "RegExp=" expression for current (flawed?) feed. But it may become wasted effort when weather feed went back to correct form as in other location.
This kind of errors affect many times the weather.com data feed. As we saw many times before, usually these issues are fixed within a few days / one week. I don't think it would worth to work with it now, instead I'd recommend to wait up to one or two weeks, to see if the issue is fixed by the provider.
SiriusEye
Posts: 7
Joined: September 14th, 2012, 9:07 pm

Re: Weather of my city is not working

Post by SiriusEye »

Okay, thank you! :welcome: I will wait some days and hope this all will get normal.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather of my city is not working

Post by balala »

SiriusEye wrote:I will wait some days and hope this all will get normal.
And if not, come back and we'll help you to rewrite the RegExp to work for your location.
SiriusEye
Posts: 7
Joined: September 14th, 2012, 9:07 pm

Re: Weather of my city is not working

Post by SiriusEye »

Code: Select all

[Rainmeter]
BackgroundMode=0

[MeterBlack]
Meter=String
x=0
Y=0
W=960
H=190
SolidColor=0,0,0,0

[Variables]
Url=http://wxdata.weather.com/wxdata/weather/local/RSXX0043?cc=*&unit=m&dayf=8
StringIndex=1
FontColor2=255,255,255,205
Font=Calibri

;================================================================

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=#URL#
RegExp="(?siU)<weather ver="(.*)">(.*)<tmp>(.*)</tmp>(.*)<t>(.*)</t>(.*)<icon>(.*)</icon>(.*)<day d="1" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="2" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="3" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="4" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="5" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="6" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="7" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)"
StringIndex=1
IfAboveValue=1
IfAboveAction=!execute [!RainmeterHideMeter MeterIconNA][!RainmeterShowMeter MeterIcon]
;Debug=1
;--------------------------------

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

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

[MeasureWeatherIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=7
;-------------------------

;tomorrow's weather description, id=18
;tomorrow's day, id=9
;tomorrow's date, id=10, you can redefine the StringIndex value below with the id#
[MeasureWeatherDate1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=10

;tomorrow's Hi-temp, id=12
;tomorrow's Lo-temp, id=14, you can redefine the StringIndex value below with the id#
[MeasureWeatherTemp1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=12

;tomorrow's weather icon, id=16
[MeasureWeatherIcon1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=16
;-------------------------

;D+2, weather description, id=29
;D+2, day of week, id=20
;D+2, date, id=21
[MeasureWeatherDate2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=21

;D+2, Hi-temp, id=23
;D+2, Lo-temp, id=25
[MeasureWeatherTemp2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=23

;D+2, weather icon, id=27
[MeasureWeatherIcon2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=27

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

;D+3, weather description, id=40
;D+3, day of week, id=31
;D+3, date, id=32
[MeasureWeatherDate3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=32

;D+3, Hi-temp, id=34
;D+3, Lo-temp, id=36
[MeasureWeatherTemp3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=34

;D+3, weather icon, id=38
[MeasureWeatherIcon3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=38

;================================================================

[MeterTemp]
MeasureName=MeasureWeatherTemp
Meter=STRING
X=340
Y=20
FontColor=#FontColor2#
StringStyle=NORMAL
FontSize=26
StringAlign=RIGHT
FontFace=Calibri
Antialias=1
Postfix="°"

[MeterIconNA]
ImageName=na.png
Meter=IMAGE
X=343
Y=1

[MeterIcon]
MeasureName=MeasureWeatherIcon
Meter=IMAGE
X=375
Y=6
W=128
Hidden=1
;------------------------- offset Y: +40

[MeterTemp1]
MeasureName=MeasureWeatherTemp1
Meter=STRING
X=320
Y=170
FontColor=#FontColor2#
StringStyle=NORMAL
FontSize=10
StringAlign=CENTER
StringStyle=BOLD
FontFace=#Font#
Antialias=1
Postfix="°"

[MeterIcon1]
MeasureName=MeasureWeatherIcon1
Meter=IMAGE
X=270
Y=105
W=96
;------------------------- offset Y: +40

[MeterTemp2]
MeasureName=MeasureWeatherTemp2
Meter=STRING
X=420
Y=170
FontColor=#FontColor2#
StringStyle=NORMAL
FontSize=10
StringAlign=CENTER
StringStyle=BOLD
FontFace=#Font#
Antialias=1
Postfix="°"

[MeterIcon2]
MeasureName=MeasureWeatherIcon2
Meter=IMAGE
X=370
Y=105
W=96
;------------------------- offset Y: +40

[MeterTemp3]
MeasureName=MeasureWeatherTemp3
Meter=STRING
X=520
Y=170
FontColor=#FontColor2#
StringStyle=NORMAL
FontSize=10
StringAlign=CENTER
StringStyle=BOLD
FontFace=#Font#
Antialias=1
Postfix="°"

[MeterIcon3]
MeasureName=MeasureWeatherIcon3
Meter=IMAGE
X=470
Y=105
W=96
I made this widget for my own, many years ago. It's minimal and very nice. It's bad, that it doesn't work. I really need weather on my desktop :-(
Last edited by jsmorley on October 16th, 2017, 3:15 pm, edited 1 time in total.
Reason: Changed to use [code] tags
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather of my city is not working

Post by jsmorley »

SiriusEye wrote: I made this widget for my own, many years ago. It's minimal and very nice. It's bad, that it doesn't work. I really need weather on my desktop :-(
Seems like wxdata is not returning any "current conditions" for https://wxdata.weather.com/wxdata/weather/local/RSXX0043?cc=*&unit=m&dayf=8. Not sure there is much you can do about that other than pick another location code that is close to you and give that a try. They might "fix" the feed for your location code any time, but who knows..
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Weather of my city is not working

Post by CyberTheWorm »

That link is working for me so it might be fixed
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather of my city is not working

Post by balala »

CyberTheWorm wrote:That link is working for me so it might be fixed
This is wrong, CyberTheWorm! It's not fixed at all and the link is really working and it did all the time, but the issue is that the <cc>...</cc> part of the returned code (which contains the current data - current temperature and current icon, for example), is completely missing. That's why the initial RegExp doesn't return anything.
As a solution SiriusEye, you could try to use Lookahead Assertions, to make the RegExp to return the existing data, even if its mentioned part is missing. I rewrote the RegExp and accordingly the StringIndex options of the child WebParser measures and now the new code returns everything for the locations which are working well, respectively just the data of the next days, for your location. If weather.com will fix the issue, you'll have to do nothing, the code simply will start to return inclusively the current day information.
For this solution, you have to replace the below options in the appropriate measures, accordingly:

Code: Select all

[MeasureWeatherRSS]
...
RegExp=(?siU)<weather ver="(.*)">.*(?(?=.*<cc>).*<tmp>(.*)</tmp>(.*)<t>(.*)</t>(.*)<icon>(.*)</icon>.*</cc>).*<day d="1" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="2" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="3" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="4" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="5" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="6" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="7" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)
StringIndex=1
...

[MeasureWeatherTemp]
...
StringIndex=2

[MeasureWeatherDesc]
...
StringIndex=4

[MeasureWeatherIcon]
...
StringIndex=6

[MeasureWeatherDate1]
...
StringIndex=8

[MeasureWeatherTemp1]
...
StringIndex=10

[MeasureWeatherIcon1]
...
StringIndex=14

[MeasureWeatherDate2]
...
StringIndex=19

[MeasureWeatherTemp2]
...
StringIndex=21

[MeasureWeatherIcon2]
...
StringIndex=25

[MeasureWeatherDate3]
...
StringIndex=30

[MeasureWeatherTemp3]
...
StringIndex=32

[MeasureWeatherIcon3]
...
StringIndex=36
Take care to not remove or change anything unmentioned here.
As I said, if you apply this solution, you'll get empty strings for the information bound to the current day, but at least the information of the upcoming days will be there.
Please let me know if you could apply these to your code and if it does work as much as it can.
SiriusEye
Posts: 7
Joined: September 14th, 2012, 9:07 pm

Re: Weather of my city is not working

Post by SiriusEye »

Yup, not it shows the forecast for 3 days, but doesn't show current condition. :???:
Post Reply