Old News and Changes

Personnal Weather Station (PWS) support
User avatar
par
Posts: 8629
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Old News and Changes

Post by par »

I will be posting here the news and changes related to PWS support feature

b226, WARNING. Significant format change

Please update your templates and scripts.
I have changed a lot in YoWindow XML format.
Mostly my goal was to let you create a template without PHP with comfort.
I hope you will agree with me on these changes.

Questions, suggestions and complaints are welcome.
But please, be short, I have no time to read "War and Peace".

1. <humidity> is accepted in percentage now, [0-100]

2. If you have wind speed on input in Kilometers per Hour, you may tell YoWindow about it, so you don't have
to convert the value yourself. Set @unit attribute of wind/<speed> tag to "kph" value
Example.
<wind>
<speed value="20" unit="kph"/>
</wind>

3. <precipitation> tag is totally changed.
<amount> tag is REMOVED from format.
These attributes REMOVED:
@mode
@intensity

Instead of this I have added 2 new tags - <rain>, <snow> and <ground>, all children of <precipitation>
<rain>
@rate - rain rate per hour (mm/hour), 0 means "no rain"
<snow>
@rate - snow rate per hour (mm/hour), 0 means "no snow"
@level - snow level (mm)
Now snow level helps YoWindow to choose the season picture.
When snow level > 0 YoWindow will always display winter landscape.

If your station does not provide rain or snow rate or snow level, do not include the corresponding tag or attribute.
When a tag is omitted, rain or snow is taken from the closest METAR station.
This looks to me as a be better way for reporting rain and snow.

Example.
<precipitation>
<rain rate="0"/>
<snow rate="1" level="10"/>
</precipitation>


4. ws-win only.
Hi, Andreas :)
Provide YoWindow with clouds information using sky/clouds/<icon> tag.
You have to add <icon> tag inside <clouds>, and assign sky-code to @id attribute of <icon> tag.

Example.
<sky>
<clouds>
<icon id="2" format="ws-win"/>
</clouds>
<description value="Fair"/>
<precipitation mode="rain">
<rate value="4"/>
</precipitation>
</sky>


5. You can highlight parameters provided by the weather station.
Go to Options/Advanced and check "Highlight Weather Station parameters" check-mark
Weather station parameters get displayed in blue color in Inspector.
Get YoWindow weather app for your phone or tablet.

Image Image Image
gemini06720

Re: b226, WARNING. Significant format change

Post by gemini06720 »

I have changed a lot in YoWindow XML format.
Pasha, rather than telling us what you have changed, what you have removed and what will not work anymore , how about releasing a simple text file with the tags that YoWindow is now compatible with - ensuring that you place a version number at the top of that file...

Also, it would be nice and easier for some of use to follow if only one forum would be used for all comments regarding the addition of personal weather stations to YoWindow - there are now 16 forums, each with bit of information that could used by other users... :roll:

I know, I am one of those really demanding person, having been involved with 3 different software developments over the past 5 years, so I probably do not know what I am suggesting here... :shock:
User avatar
par
Posts: 8629
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: News and Changes

Post by par »

Now you can watch your PWS data inside YoWindow widget.

If you want to display current weather from your weather station in YoWindow widget you have do the following.

1. Specify the URL to your PWS XML file or script.
- open YoWindow widget HTML for editing
- find <param name="flashvars" ...> line
- add current_weather_url variable to flashvars with the value of your YoWindow XML file URL.

2. Make sure a special crossdomain.xml file is available on the server where PWS XML file or script is kept.
WARNING: YoWindow will NOT be able to access your PWS XML if crossdomain.xml is missing.

YoWindow weather widget is a Flash application.
For security reasons Flash can download data from another server only if the server has a special crossdomain.xml file placed in the root directory.
You may read this Adobe article on the subject if you want to know the technical details.
http://kb2.adobe.com/cps/142/tn_14213.html

You have to do the following to make it possible for YoWindow widget to have an access to your PWS XML file.
Please download this crossdomain.xml.
And then you (or PWS administrator) should put crossdomain.xml in the root directory on the server where your PWS XML file or script deployed.


Example.
I have highlighted the changes in blue.

<object type="application/x-shockwave-flash" data="http://swf.yowindow.com/wimo/hpPal/hpPal.swf" width="280" height="194">
<param name="movie" value="http://swf.yowindow.com/wimo/hpPal/hpPal.swf"/>
<param name="allowfullscreen" value="true"/>
<param name="wmode" value="opaque"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="flashvars" value="location_id=gn:5128581&current_weather_url=http://server.yowindow.com/wimo/test/ws-win.xml"/>
The beautiful weather monitor requires the free Adoble Flash Player which you can <a href="http://get.adobe.com/flashplayer/">download here</a>.
</object>
Get YoWindow weather app for your phone or tablet.

Image Image Image
Acki-W

Re: News and Changes

Post by Acki-W »

par wrote:Now you can watch your PWS data inside YoWindow widget.
Code: Select all
<param name="flashvars" value="location_id=gn:5128581&current_weather_url=http://server.yowindow.com/wimo/test/ws-win.xml"/>
Hi Pavel,
maybe I´m a bit stupid or the others have fear to ask :)
1.
My data are published here: http://acknet.vs120010.hl-users.com/yowindow.xml
Does that mean, your above lines should look like that ?
<param name="flashvars" value="location_id=gn:5128581&current_weather_url= http://acknet.vs120010.hl-users.com/yowindow.xml"/>

2.
Do I have to copy it into the WsWin-template ? Where ?

3.
Wherefrom do I know the location_id for my station ??

Thank You
Andreas
User avatar
par
Posts: 8629
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: News and Changes

Post by par »

Andreas, this news is important for YoWindow weather widget users only.

YoWindow weather widget setup page is here.

It creates the HTML for you automatically so you don't have to guess the location id.
The only thing you have to do if you want PWS data in YoWindow widget is to modify HTML by adding the url to the XML file with the current weather.

No, you don't have to add "flashvars" line to ws-win.xml template.

I have also updated the instructions to make them more clear, hope this helps.
Get YoWindow weather app for your phone or tablet.

Image Image Image
jmcmurry
Posts: 368
Joined: Tue Oct 13, 2009 11:09 am
Name: Jim
Location: Mauston, WI, USA
Contact:

Re: News and Changes

Post by jmcmurry »

Pasha,

Is there a chance that the .php extension of my script is a problem? I have this

Code: Select all

<param name="flashvars" value="location_id=gn:5262113&current_weather_url=http://jcweather.us/yowindow-xml.php&time_format=12&unit_system=us&background=#FFFFFF"/>
but it doesn't seem to be working because I see different data http://jcweather.us/yowindow-test.php. Maybe I have something else wrong, but I can't find it.

- Jim
User avatar
par
Posts: 8629
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: News and Changes

Post by par »

Jim, and everyone.
There is one more problem with PWS and YoWindow weather widget I have forgotten about.
This is a Flash security restriction.
There is no way to workaround it unless having a a special crossdomain.xml file on your server.
crossdomain.xml grants YoWindow weather widget an access to the XML file or PHP script on your server.

Read the details in my update to this post about YoWindow weather widget.
http://yowindow.com/forum/viewtopic.php?f=11&t=362

I'm really sorry for misleading you.

So, Jim, the problem is not in PHP script, the problem in Flash security model.
Please tell me if you have solved this problem.

jmcmurry wrote:Pasha,

Is there a chance that the .php extension of my script is a problem? I have this

Code: Select all

<param name="flashvars" value="location_id=gn:5262113&current_weather_url=http://jcweather.us/yowindow-xml.php&time_format=12&unit_system=us&background=#FFFFFF"/>
but it doesn't seem to be working because I see different data http://jcweather.us/yowindow-test.php. Maybe I have something else wrong, but I can't find it.

- Jim
Get YoWindow weather app for your phone or tablet.

Image Image Image
jmcmurry
Posts: 368
Joined: Tue Oct 13, 2009 11:09 am
Name: Jim
Location: Mauston, WI, USA
Contact:

Re: News and Changes

Post by jmcmurry »

Pasha,

I just added that file and all seems to be well now with all the weather data matching. I'll watch that page as conditions change, but I'm sure everything is fine now. Just another small "growing pain" and good that you could find the answer so quickly.

- Jim
User avatar
par
Posts: 8629
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: News and Changes

Post by par »

Wow! I'm happy :)
jmcmurry wrote:Pasha,

I just added that file and all seems to be well now with all the weather data matching. I'll watch that page as conditions change, but I'm sure everything is fine now. Just another small "growing pain" and good that you could find the answer so quickly.

- Jim
Get YoWindow weather app for your phone or tablet.

Image Image Image
User avatar
par
Posts: 8629
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: News and Changes

Post by par »

New: b230

New attribute is added to <rain> tag - @daily_total.
daily_total is the amount of rain-fall during the day in millimeters.
See the XML format reference for the details.
Get YoWindow weather app for your phone or tablet.

Image Image Image
Post Reply