WD YoWindow PHP Script

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

Re: WD YoWindow PHP Script

Post by Tihomir Z » Sun Apr 08, 2012 6:52 am

Greeting
Yesterday evening came the first abundant rains this year for me, (so far fallen a modest 52.4 mm of rain), here's an example of how the YoWindow all is well recorded. It should always be when it comes to precipitation. Now these data override the default meter data Maribor. And, as I noticed in version YoWindow 2, the PHP script it is not happening, it was the way I put the icon.
Image
2. I have another question
The PHP script to a number of specific items
I put that part of what I write.
And, I interested in the visibility of that number is going to nemoram manually every time a change to send to the server, it is irritating to me, if not, Mill would say that it enters. We do it manually now.
Number of visibility in the WD program:
$wavgspd = KtsToMps($data[1]); // Convert knots to m/s
$wmaxgustlastimediate10 = KtsToMps($data[2]); // Convert knots to m/s
$wDirec = $data [ 3]; // Wind direction in degrees
$Temp = $data [ 4]; // Temperature
$feelslike = $data [ 44]; // Feels like (Wind Chill)
$Baro = $data [ 6]; // Pressure
$BTrend = $data [ 50]; // Barometric trend
$Humid = $data [ 5]; // Humidity
$DayRain = $data [ 7]; // Rain today
//$RainRate= $data [ 10]*60; // Rain rate per minute * 60 = mm/h
$RainRate= $data [ 10]; // Rain rate per minute mm
$Solar = $data [ 34]; // Solar %
$SolarWM = $data [127]; // Solar W/m2
$UV = $data [ 79]; // UVI
$Icon = $data [ 48]; // Current conditions icon number
$Dewp = $data [ 72]; // Dewpoint
$Lat = $data [160];
$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 ='20.0' ;// unit= km $extra[ ? ] What is this number? , Now the manual input.
$wdDesc = ' '.strtolower($data[ 49]); // Inputted weather description
$Strikes = $data [114]; // Lightning
if ($Strikes < $MinStrikes) {
$Strikes = 0;

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

Re: WD YoWindow PHP Script

Post by jmcmurry » Sun Apr 08, 2012 10:33 am

Tihomir,

For you question #2, unfortunately, there is no entry for visibility in the clientraw files, so there is no "number" for you to use.

You would have to ask Brian to add visibility to clientrawextra.txt, and for that to use the visibility that you would enter in Input Daily Weather. That is how snow level works now.

Sorry. - Jim

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

Re: WD YoWindow PHP Script

Post by Tihomir Z » Sun Apr 08, 2012 11:12 am

OK Jim Thanks for the reply.
I will ask Brian.

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

Re: WD YoWindow PHP Script

Post by jmcmurry » Sat Apr 14, 2012 3:39 pm

Tihomir has convinced Brian to add the visibility that is entered into "Input Daily Weather", to the clientrawextra.txt file. I have added that value to our script available at http://jcweather.us/yowindow-xml.php?sce=view.

This means you can now control the visibility for your location using this feature. But don't forget to set it back to a negative number when you are through or that visibility will go on forever. By the way, controlling the snow works the same way by setting the current level > 0 in "Input Daily Weather".

Right now this is only available in Brian's .zip update of the program, but will also be available in the full install when he builds one newer than the current 3 April version.

- Jim

Michaelnup
Posts: 5
Joined: Fri Jun 08, 2018 1:25 am
Name: MichaelnupPG

WD YoWindow PHP Script

Post by Michaelnup » Sat Jun 16, 2018 1:18 am

an update of a setpoint doesnt trigger scripts.
I run a big PHP script by cron every 10 sec to compare everything and switch where needed.

Post Reply