Author Topic: Hidden Weather Tags?  (Read 6215 times)

0 Members and 1 Guest are viewing this topic.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Hidden Weather Tags?
« on: February 04, 2009, 12:59:22 PM »
Anyone know of any unpublished WL weather tags?  I'd especially like the ones for alarm condition and battery.  Battery status for a remote site would be nice to report.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Hidden Weather Tags?
« Reply #1 on: February 06, 2009, 03:57:37 PM »
Got an email from Davis tech support.  No such "hidden tags", at least for battery voltage.  So I am gonna write my own.  :)
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Re: Hidden Weather Tags?
« Reply #2 on: February 06, 2009, 06:07:54 PM »
I am still waiting for someone to make tags for the special warnings like

"raining cats and dogs" and "Kite Flying weather"

I would need html- our school server does not do php




You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Hidden Weather Tags?
« Reply #3 on: February 06, 2009, 06:30:41 PM »
<!--ForecastStr-->  gives you the current forecast string.  :)  There's a list of the 100+ strings too.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline offroadjosh

  • Davis Vp2 Wireless- VWS 14 P90 Serial Data logger
  • Forecaster
  • *****
  • Posts: 967
  • Montana Firefighter
    • My Website=)
Re: Hidden Weather Tags?
« Reply #4 on: February 06, 2009, 06:31:34 PM »
what is a tag? and how would you use it?


Josh
Josh Patten

Davis VP2 Wireless -May 2008
VWS 14.00P90\WL 5.9.9/Plus others!
Skywarn trained
CoCoRaHS member
Smith Valley Fire Dept Firefighter:)
http://josh.northwestwx.com/station/usa.htm
CWOP-DW0711
Kestrel 2000 hand held anemometer
Cocorahs 4in rain gauge
Custom co

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Hidden Weather Tags?
« Reply #5 on: February 06, 2009, 06:35:56 PM »
Weather tags are codes you can use to pull weather readings into your web pages.  If you look at a sample Davis template you will see tags that are  used to generate the HTML pages.

For example, create an HTML doc with !--ForecastStr--> and save it as an HTX file.  At  upload time, the software substitues the current forecast string (ie. "Raining cats and dogs") as a text value into your HTM file.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline d_l

  • Forecaster
  • *****
  • Posts: 1700
  • Slide Mtn - Mt Rose
    • Thomas Creek Estates neighborhood weather
Re: Hidden Weather Tags?
« Reply #6 on: February 06, 2009, 06:59:08 PM »
Bushman, is "Raining cats and dogs" a forecast or a warning? 

When i went through a bin file, I noticed that there was a group of phrases that might be considered warnings, e.g., LOW BATTERY ON STATION X, HIGH WIND WARNING, etc. and a group of phrases that are the regular forecasts.  Will that forecast tag display those warnings or is their a special warning tag?  I don't use WL for making web pages so I've not studied the various tags.
--Dave--

Wireless VP2 w/ solar, 24hr FARS, Heater, (Envoy-WLIP)*3-Meteohub, plus custom VP2 @ 26', WL 6.0.4, WU & W4U=KNVRENO37 NetcamXL

People always talk about the weather, but they never do anything about it.  Not me.  I'm gonna measure it.  https://www.tceweather.com

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Re: Hidden Weather Tags?
« Reply #7 on: February 06, 2009, 10:59:46 PM »



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline offroadjosh

  • Davis Vp2 Wireless- VWS 14 P90 Serial Data logger
  • Forecaster
  • *****
  • Posts: 967
  • Montana Firefighter
    • My Website=)
Re: Hidden Weather Tags?
« Reply #8 on: February 06, 2009, 11:01:03 PM »
Weather tags are codes you can use to pull weather readings into your web pages.  If you look at a sample Davis template you will see tags that are  used to generate the HTML pages.

For example, create an HTML doc with !--ForecastStr--> and save it as an HTX file.  At  upload time, the software substitues the current forecast string (ie. "Raining cats and dogs") as a text value into your HTM file.


well thanks.. but i am realllly bad with computers lol so maybe weather tags arn't meant for me ;)
Josh Patten

Davis VP2 Wireless -May 2008
VWS 14.00P90\WL 5.9.9/Plus others!
Skywarn trained
CoCoRaHS member
Smith Valley Fire Dept Firefighter:)
http://josh.northwestwx.com/station/usa.htm
CWOP-DW0711
Kestrel 2000 hand held anemometer
Cocorahs 4in rain gauge
Custom co

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Hidden Weather Tags?
« Reply #9 on: February 06, 2009, 11:03:51 PM »
So how are you going to get your weather data onto the Net?

BTW, how's the Bierstube?  :)
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline Cienega32

  • Forecaster
  • *****
  • Posts: 2635
    • East Mesa Weather
Re: Hidden Weather Tags?
« Reply #10 on: February 07, 2009, 03:35:30 PM »
I am still waiting for someone to make tags for the special warnings like

"raining cats and dogs" and "Kite Flying weather"

I would need html- our school server does not do php
The one that I ended up hacking together is php so I guess it doesn't help you any. An htx file read by WeatherLink every minute and converted to php and only relates to the rain.

The original script was 'anchorageweather's' great little script that gave nice precision time reads since the last rain fall. Being new to php, I used his script as a starting point to see "how things work". I didn't want all that in regards to the time function. I just wanted a simple midnite day-rollover and something that showed how hard it was raining at the moment. Love that "cats & dogs" thing, you know.

Anyway, here's what I came up with and it does "exactly" what I want it to do:

Code: [Select]
<?php
$myFile 
"./scripts/lastrainday.txt";
$fh fopen($myFile'r');
$lastrainday fread($fh20);
fclose($fh);

$now mktime(); 
$dailyrain = <!--dailyRain-->;
$rainrate = <!--rainRate-->;
$newstarttime mktime(0,0,1);

if ((
$lastrainday $newstarttime) and ($dailyrain 0))
   {
    
$runningseconds 0;
    
$myFile "./scripts/lastrainday.txt";
    
$fh fopen($myFile'w') or die("can't open file");
    
$newrainday $newstarttime;
    
fwrite($fh$newrainday);
    
fclose($fh);
   }
else
   {
    
$runningseconds = ($now $lastrainday);
   }

$runningdays floor(($runningseconds/86399));

if (
$rainrate && $rainrate.07) echo "THERE'S A SOFT RAIN FALLING";
elseif (
$rainrate >= .07 && $rainrate <.75) echo "IT'S RAINING RIGHT NOW!";
elseif (
$rainrate >= .75 && $rainrate <1.75) echo "IT'S RAINING HARD RIGHT NOW!";
elseif (
$rainrate >= 1.75 && $rainrate <2.50) echo "IT'S RAINING CATS & DOGS!";
elseif (
$rainrate >= 2.50 && $rainrate <4.50) echo "IT'S POURING BUCKETS OF RAIN!!!";
elseif (
$rainrate >= 4.50) echo "QUICK!!! SOMEBODY BUILD AN ARK!";
elseif (
$dailyrain 0) echo "IT RAINED TODAY!"
elseif (
$runningdays == 1
{echo 
$runningdays." day since rain was last recorded:&nbsp; ".date('M d',$lastrainday);}
// {echo "IT RAINED YESTERDAY";
else
{echo 
$runningdays." days since rain was last recorded:&nbsp; ".date('M d',$lastrainday);}

?>




Pat ~ Davis VP2 6153-Weatherlink-Weather Display-StartWatch-VirtualVP-Win7 Pro-64bit
www.LasCruces-Weather.com   www.EastMesaWeather.com

Offline Cienega32

  • Forecaster
  • *****
  • Posts: 2635
    • East Mesa Weather
Re: Hidden Weather Tags?
« Reply #11 on: February 07, 2009, 03:41:52 PM »
I'll post the version with all my comments and ramblings (I think it's the same one):
Also help for the last rain time data file
Code: [Select]
<?php
// Based on anchorageweather's (www.eetee.us/station) precision-time
// "DaysWithouRain" script.
//
// Modified for basic "days since last rain" usage.
// "Days since" increment based on midnite.
//
// Added WeatherLink rain rate tag usage for text output.
// during different levels of rain "Cats & dogs",etc.
// Requires an WL upload interval of one minute to be fun.
// Also used for "It rained today!" display. 
//
// For first time usage: find last day it rained and convert
// it to a Unix timestamp. (www.onlineconversion.com/unix_time.htm)
// Save that value to a file called "lastrainday.txt"
// WeatherLink runs the htx file and saves to php.

$myFile "./scripts/lastrainday.txt";
$fh fopen($myFile'r');
$lastrainday fread($fh20);
fclose($fh);

$now mktime(); 
$dailyrain = <!--dailyRain-->;
$rainrate = <!--rainRate-->;

// Get current date and time but reset time to 1 second after midnite
// as will be found in lastrainday.txt

$newstarttime mktime(0,0,1);

// Save today's start time to text file ONLY if it rained
// AND if $lastrainday is older than today's $newstarttime
// Avoids rewriting file unless a new day AND rained
if (($lastrainday $newstarttime) and ($dailyrain 0))
   {
    
$runningseconds 0;
    
$myFile "./scripts/lastrainday.txt";
    
$fh fopen($myFile'w') or die("can't open file");
    
$newrainday $newstarttime;
    
fwrite($fh$newrainday);
    
fclose($fh);
   }
else
   {
    
$runningseconds = ($now $lastrainday);
   }

$runningdays floor(($runningseconds/86399));

// I wanted to see the Davis console's "IT'S RAINING CATS & DOGS!" on my site.
// The rain rate values used here were acquired by using the tried and true
// scientific method of standing outside... in the rain... like an idiot...
// Change the values or the responses to suit. 

if ($rainrate && $rainrate.07) echo "THERE'S A SOFT RAIN FALLING";
elseif (
$rainrate >= .07 && $rainrate <.75) echo "IT'S RAINING RIGHT NOW!";
elseif (
$rainrate >= .75 && $rainrate <1.75) echo "IT'S RAINING HARD RIGHT NOW!";
elseif (
$rainrate >= 1.75 && $rainrate <2.50) echo "IT'S RAINING CATS & DOGS!";
elseif (
$rainrate >= 2.50 && $rainrate <4.50) echo "IT'S POURING BUCKETS OF RAIN!!!";
elseif (
$rainrate >= 4.50) echo "QUICK!!! SOMEBODY BUILD AN ARK!";
elseif (
$dailyrain 0) echo "IT RAINED TODAY!"

// Prevents the silly looking "1 dayS..." response and displays month and day of last rain
elseif ($runningdays == 1
{echo 
$runningdays." day since rain was last recorded:&nbsp; ".date('M d',$lastrainday);}
// Optional...
// {echo "IT RAINED YESTERDAY";
else
{echo 
$runningdays." days since rain was last recorded:&nbsp; ".date('M d',$lastrainday);}
// I hope others enjoy it! - Cienega32 - www.EastMesaWeather.com
?>



Pat ~ Davis VP2 6153-Weatherlink-Weather Display-StartWatch-VirtualVP-Win7 Pro-64bit
www.LasCruces-Weather.com   www.EastMesaWeather.com

Offline jruys

  • Yo
  • Senior Contributor
  • ****
  • Posts: 221
    • Highlands Ranch Weather
Re: Hidden Weather Tags?
« Reply #12 on: February 07, 2009, 06:37:12 PM »
Here is an html version for rain strings that you could use.  It uses javascript to decide which rain string to use.  Once you see the concept you could apply it to other strings like Kite Flying Weather or what not.  All you would have to do is figure out what values you want to use.

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Rain Rate Strings</title>
    <script language="javascript" type="text/javascript">
        function GetRainRateString()
        {
            var rainRate = document.getElementById("currentRainRate").innerHTML;
            var rainRateString = "";
           
            if (rainRate > 0 && rainRate < 0.07)
            {
                rainRateString = "THERE'S A SOFT RAIN FALLING";
            }
            else if (rainRate >= 0.07 && rainRate < 0.75)
            {
                rainRateString = "IT'S RAINING RIGHT NOW!";
            }
            else if (rainRate >= 0.75 && rainRate < 1.75)
            {
                rainRateString = "IT'S RAINING HARD RIGHT NOW!";
            }
            else if (rainRate >= 1.75 && rainRate < 2.50)
            {
                rainRateString = "IT'S RAINING CATS & DOGS!";
            }
            else if (rainRate >= 2.50 && rainRate < 4.50)
            {
                rainRateString = "IT'S POURING BUCKETS OF RAIN!!!";
            }
            else if (rainRate >= 4.50)
            {
                rainRateString = "QUICK!!! SOMEBODY BUILD AN ARK!";
            }
           
            document.getElementById("rainRateString").innerHTML = rainRateString;
        }
    </script>
</head>
<body onload="GetRainRateString();">
    <div id="currentRainRate"><!--rainRate--></div>
    <div id="rainRateString">&nbsp;</div>
</body>
</html>

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Hidden Weather Tags?
« Reply #13 on: February 08, 2009, 10:49:59 AM »
Kewl!  Thanks!!!

BTW, for you JS guys out there, what would be the easiest way (Using Weatherlink SW) to read a value from a .txt file and use it in a WL webpage?  I'm looking at /DIV, .JS since I cannot seem to get a SSI INCLUDE to work at .htx --> .htm conversion time.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline jruys

  • Yo
  • Senior Contributor
  • ****
  • Posts: 221
    • Highlands Ranch Weather
Re: Hidden Weather Tags?
« Reply #14 on: February 08, 2009, 06:08:13 PM »
There are some ways read a text file with an xmlHttp object  (search for xmlHttp.responseText to get some examples).  That said, your text file would need to have http access, since javascript can not access local files (something about a security issue;)).  Here is one example on how to use the xmlHttp object http://www.rodsdot.com/ee/readFileClientSide.asp.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Hidden Weather Tags?
« Reply #15 on: February 08, 2009, 08:00:42 PM »
Criminy.  I'm glad you posted that!  :)  Way past my  skill level.  I should  have paid attention in the Dot.com boom.  :)
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline Cienega32

  • Forecaster
  • *****
  • Posts: 2635
    • East Mesa Weather
Re: Hidden Weather Tags?
« Reply #16 on: February 09, 2009, 03:14:52 AM »
Yeah, that's good stuff but I got a headache just looking at it! Way past my "comfort zone"!

Pat ~ Davis VP2 6153-Weatherlink-Weather Display-StartWatch-VirtualVP-Win7 Pro-64bit
www.LasCruces-Weather.com   www.EastMesaWeather.com

 

anything