RSSweather.com
vining
Posts: 4,368
I just started using the rss feed from rssweather.com. When I first connected and received a valid response and it gave me a complete list of current values which included a table of <dt> value type(definition term) </dt> and <dd>value(definition description)> that included humidity, wind direction, barometric pressure,......so on 9 values total.
I used that return string as a basis for writing my parsing function but the odd thing is I no longer get the table of <dt's> & <dd's> just the general statement
<title>City, State Weather</title>
<description>Mostly cloudy winds variable in direction at 3 mph. </description>
some other info and then the forecasts in five parts.
I really want those 9 values back.
To any one familar with rssweather.com feed:
I retrieve once per hour as requested by the server!
The send string I'm using is:
both send_strings work and return the same info but not the values I originally received. I don't know if these are the same strings I used originally or not but they most likely are.
I haven't had this running for 24 hours yet so maybe it's only included once a day but that's not logical. Maybe the string needs modification to enable the GET command to get those particluar values.
Any help would be appreciated!
I used that return string as a basis for writing my parsing function but the odd thing is I no longer get the table of <dt's> & <dd's> just the general statement
<title>City, State Weather</title>
<description>Mostly cloudy winds variable in direction at 3 mph. </description>
some other info and then the forecasts in five parts.
I really want those 9 values back.
To any one familar with rssweather.com feed:
I retrieve once per hour as requested by the server!
DEFINE_PROGRAM
{
local_var char cMytime [8]
if (cMyTime != TIME)
{
cMyTime = TIME
fnProcessTime(cMyTime)
}
if (Mytime.Minute == '01' && Mytime.Seconds == '01')
{
local_var integer nRunOnce
if (!nRunOnce)
{
send_string 0,"'Time ',Time,' - Updating RSS Weather!',crlf"
ip_client_open (dvRSS.Port,'www.rssweather.com',80,1)
nRunOnce = 1
wait 15
{
nRunOnce = 0
}
}
}
}
The send string I'm using is:
ONLINE:
{
SEND_STRING 0,"'RSS Connected',crlf"
(*ok*) SEND_STRING dvRSS,"'GET /rss.php?config=&forecast=zandh&zipcode=06853&country=us&county=09001&zone=ctz009&alt=rss20a HTTP/1.0',crlf"
(*ok*) //SEND_STRING dvRSS,"'GET /rss.php?config=&forecast=zandh&place=norwalk&state=ct&zipcode=06853&country=us&county=09001&zone=ctz009&alt=rss20a HTTP/1.1',crlf"
SEND_STRING dvRSS,"'Host: www.rssweather.com',crlf"
SEND_STRING dvRSS,"crlf"
}
both send_strings work and return the same info but not the values I originally received. I don't know if these are the same strings I used originally or not but they most likely are.
I haven't had this running for 24 hours yet so maybe it's only included once a day but that's not logical. Maybe the string needs modification to enable the GET command to get those particluar values.
Any help would be appreciated!
0
Comments
With luck at the next update it will also work. I would force a sooner update but the server just sends a text message reiterating the requirement not to update more than once an hour with no pertinent weather data. It's obviously tracking clients by cookies and session ids.
- Chip