WD YoWindow PHP Script

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

WD YoWindow PHP Script

Post by jmcmurry »

I can't find the old thread about the development of this script anywhere, so am starting this new one. I've updated the script to change how the snow info was put in the xml so now the snow depth will display correctly. Download at http://jcweather.us/yowindow-xml.php?sce=view.

- Jim
cansics

Re: WD YoWindow PHP Script

Post by cansics »

Hi Jim,

Daft question, but what does this script actually do ?

I've looked everywhere and I can't see anything.

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

Re: WD YoWindow PHP Script

Post by jmcmurry »

The script is for weather station owners who use the Weather Display software and it creates an XML file that you can tell YoWindow to use for it's current weather rather than the METAR current weather as it normally would.

- Jim
cansics

Re: WD YoWindow PHP Script

Post by cansics »

Hi Jim,

Doesn't WD already create the .xml though ?

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

Re: WD YoWindow PHP Script

Post by jmcmurry »

Yes, that is another option. The PHP script was originally written before WD had that capability.

- Jim
Asim Jofa

Re: WD YoWindow PHP Script

Post by Asim Jofa »

Manuscript is a weather station owners using Weather Display Software, and creates an XML file, which you can use it to tell time instead of YoWindow current METAR weather as you normally would.
User avatar
Tihomir Z
Posts: 180
Joined: Thu Dec 24, 2009 11:03 am
Name: Tihomir
Location: Trnovec Bartolovecki Croatia
Contact:

Re: WD YoWindow PHP Script

Post by Tihomir Z »

Help addition to PHP script
My dear friends, here I have one request, should one add to the visibility of the php script.
I not know under what number it takes to WDisplay program menu for manual entry, but should be accurate to make it work automatically. Specifically in WDisplay program is now added option of manually entering your visibility in km. options and refresh XML Scripts every minute or every 5min. I asked Mr. Brianna, and he has done, is doing everything right, this is the only supplement to kick in automatically, here's how I added the php script, but I am not a programmer so do not laugh like I did, because you all let me know who to properly do so. Thank you all for your help. :)

$Lng =-($data[161]);// invert because in WD it's minus for EAST of GMT
$SnowLvl = $extra[697]; // Snow depth
$gotSolar= $extra[701]=="s1"; // Solar info present
$wdvisibility='30.0';// unit="km" ...What number goes in this bracket for visibility, [?]
$wdDesc = ' '.strtolower($data[ 49]); // Inputted weather description
$Strikes = $data [114]; // Lightning
if ($Strikes < $MinStrikes) {
$Strikes = 0;
}


<dewpoint value="' . $Dewp . '"/>
</temperature>
<humidity value="' . $Humid . '"/>
<pressure value="' . $Baro . '" trend="' . $BTrend . '"/>'
. $solarTag
. $uvTag . '
<visibility value="' . $wdvisibility . '" />
<wind>
<speed value="' . $wavgspd . '"/>
<gust value="' . $wmaxgustlastimediate10 . '"/>
<direction value="' . $wDirec . '"/>

S: AMP Trnovec Bartolovecki on Sun, 11-Dec-2011 @ 07:14:09
Timezone: Europe/Zagreb
Data generated with yowindow-xml.php v2.4
Clouds: height 125m ... temp 0.4 C
Solar: 0% (present) / Rain Rate: 0.000 mm/h
WD Description: prete&#382;no_obla&#269;no
WD: Icon #3(Prete&#382;no Obla&#269;no) changed to #3(Prete&#382;no Obla&#269;no)
Mods:
--><response><auto_update><timestamp value="Sun, 11 Dec 2011 07:14:09 +0100"/><interval value="60"/><maxuploads value="10"/></auto_update><current_weather><temperature><current value="1.6"/><feels_like value="1.6"/><dewpoint value="0.6"/></temperature><humidity value="93"/><pressure value="1022.1" trend="0.4"/><visibility value="30.0"/><wind><speed value="0"/><gust value="0"/><direction value="225"/></wind><sky><description value="Pretežno Oblačno"/><clouds value="mostlyCloudy"/><precipitation><rain><rate value="0"/><daily_total value="0.0"/></rain></precipitation><thunderstorm value="0"/></sky></current_weather></response>
jmcmurry
Posts: 368
Joined: Tue Oct 13, 2009 11:09 am
Name: Jim
Location: Mauston, WI, USA
Contact:

Re: WD YoWindow PHP Script

Post by jmcmurry »

Tihomir,

That script uses values that are in the clientraw files and unfortunately, visibility is not in them.

Sorry - Jim
User avatar
Tihomir Z
Posts: 180
Joined: Thu Dec 24, 2009 11:03 am
Name: Tihomir
Location: Trnovec Bartolovecki Croatia
Contact:

Re: WD YoWindow PHP Script

Post by Tihomir Z »

Hello Jim
I am sorry for that, given the fact that I make clientraw files and pull that information. Now every time I send a PHP script on the server when I change the visibility. When I could not even close to an airport, 70 km Maribor and Zagreb is located just 70 km. I do not know, I can only hope that this will add to the lack of clientraw file, so it is all really in the picture.
User avatar
Tihomir Z
Posts: 180
Joined: Thu Dec 24, 2009 11:03 am
Name: Tihomir
Location: Trnovec Bartolovecki Croatia
Contact:

Re: WD YoWindow PHP Script

Post by Tihomir Z »

Hello Pavel
I have one question that I could not understand. Concerns that we have our own weather station Airport, and continue to send our data to YoWindow. I wrote about this already but I need something more for me crazy. Today it is with me in the morning was cloudy, and at Maribor airport 70 km away from me, it snowed, and it is the proven YoWindow window, but it's not really the state of time with me. How to send data regularly from the Weather Display program where I enter manually: visibility, sky condition, and all other parameters, and YoWindow persistently puts the state of the sky from Maribor, given the option to put that information from Trnovec Bartolovečkog is hundred percent correct. For me there is no purpose, and if you persist in doing so, then no need to send the data if the program YoWindow not accept as accurate. Do not be angry, but as things stand, I live far from the airport so it should be taken into account. Would you be given the option to agree to a program or something but otherwise riješenjeda choose what percent of PWS data, not just the meter data to be taken as one hundred percent correct. This is happening in the PHP script and the XML script. In fact, everything else works fine, just for my case this was that I described before. If this is not likely to do more when I use YoWindow completely impossible to use their data.
I lost a lot of nerves and I do not want more about spending your free time.
Image
Post Reply