L2K Display Script

Lightning 2000 Display Script:

Well I thought it was time someone made a display script for the Lightning 2000 Program made by Mark Mears.

So I bit the bullet and made one up for it.

Unknown to most ppl, l2k is very capable of outputting data not just by using Images to the web.

So I took the feature that L2k had hiding away and have got it output data in a nice easy to understand format that updates every 1 min.

You can view the demo of the script here: http://wx-matangi.dyndns.org/Weather/wxl2k.php
or for a working example visit Lees site: http://www.knology.net/~blackjack52/wxl2k.php

L2k is truly a fantastic program but ppl thought it lacked in the web output department, so this is to prove those ppl were totally wrong!

This script taps into the need to know data and the data that you may not get when your away from l2k PC.

Requirements:

Lightning 2000 v 5.1.3

Ken’s PHP Caterlake Template.

PHP 5.0 or above.

PHP GD library support.

Client side Javascript.

Download and Install:
This script is available now from here: http://wx-matangi.dyndns.org/Weather/wxl2kdisplay.php

Instructions on how install the script are on that page too.

Donate:
Donations are very much appreciated and will go towards my own Lightning detector with l2k.

Thanks To:
Mark Mears at http://www.aninoquisi.com/ the Author of Lightning 2000, Thanks for making such a awesome software product!

Lee at http://www.knology.net/~blackjack52/ for vigorously testing this script before its launch!

Ken True at http://saratoga-weather.org/ for helping me make the Live updating Javascript Map and the the PHP template itself.

Questions, Comments, Need Help?
Always welcome, Just reply to this thread.

The Next Feature of this script will be to add a lightning analysis page.

Best Regards

Tim G

An Update is now out for L2k Display :slight_smile:

This will add compatibility to a sister script I am developing for l2k display and will bring the flash rate, stroke rate and noise rate to the script :smiley:

Update can be downloaded from the usual place: http://wx-matangi.dyndns.org/Weather/wxl2kdisplay.php

Instructions:

  • Download the update package.
  • Open Data.txt on the computer that has l2k on it.
  • If you want the outputted files put into different place other than the L2k folder follow this: http://wx-matangi.dyndns.org/Weather/wxl2kdispsetup1.php
  • Replace Data.txt on the computer that has l2k on it.
  • If you changed settings on the ajax script alter them now on the new copy.
  • Replace the wxl2k.php and the ajaxl2kwx.js script.

The script settings doesn’t need replacing so your settings won’t be lost :smiley:
That should be about it :smiley:

Any Q’s and comments post below :slight_smile:

Another Update out :slight_smile:

This time its a bug fix, LOL

Version 1.21 Released!

Download the update or full package from here: http://wx-matangi.dyndns.org/Weather/wxl2kdisplay.php

Upgrade Procedure: Replace everything in the server from the update package. (change settings before hand though in the settings file and the ajax file)

This fixes a delimiter bug as different l2k installs use various comma’s in the date which mucked up pulling up the data in the correct way.

Best Regards

Tim G

Thanks Tim.
How’s your new detector working?

I run a Davis 6153, Windows XP and a Linux WEB server. does anyone have any recommendations for Lighting Hardware to add to my set-up?

I live in Central FL, Lighting Capital of the world and love to add Lighting data to my stats, PHP pages, etc.

I would goto Boltek and check compatibility.

Yea my setup is doing quite well :smiley:
It get the odd spike of strikes around 11 AM NZDST, I have no clue why as nothing in the house gets turned on then.
Still no storms, seem to be in a dry period atm :frowning:

Looks like it could change with the likes of some TC’s coming down from the tropics.

If you are planning on putting the Boltek inside the webserver you will be very limited by Software and hardware support by using linux.

If you can do this: Use Windows as your base OS and then do some virtulisation by using VMware or similar to do your linux web server stuff.
That way you can use Windows to support your Boltek card and then you can use L2k, Yay

Btw in Virtual machines you can set up a folder share so linux can find the outputted data from L2k or Nexstorm and then can use your data for the PHP page.

Hey Tim,
I updated data.txt and changed the paths to detectorstatus like in the old data.txt.
I updated ajax and changed the path to match the old file.
I updated wxl2k.

But getting the red txt boxes
the location you gave for the detector status file seems incorrect!

Per instructions, I did not replace l2kdisplaysettings.
http://www.knology.net/~blackjack52/wxl2k.php

update
copied over l2kdisplaysettings since that’s what’s being referenced. Changed paths to match old file.

You where using 1.0 before which means you need to replace everything.
I wrote on this page: http://wx-matangi.dyndns.org/Weather/wxl2kdisplay.php if you were using version 1.0 or 1.1 you need to replace everything.

Give that a try.

The Upgrade to 1.21 requires v1.2.

Let me know how it goes.

Oh.
Thanks, I’ll switch to 1.2 tomorrow, then 1.21.

Tim,
I applied 1.21 but still getting all red. These are my orig paths copied over to the new l2kdispsettings:

//The Location to your your l2k AJAX file:
$ajaxloc = 'ajaxl2kwx.js';

//The Location to your Custom Summary Text File:
//Eg: ./mysummary.txt for root or ./ajax-images/mysummary.txt for sub dir
$customfilelocation = './mysummary.txt';

//The Location to your Nowcast file:
//Eg: ./nowcast.txt for root or ./ajax-images/nowcast.txt for sub dir
$nowcastlocation = './nowcast.txt'; 

//The location to your Detector StatusText file:

$detectorstatus = './detectorstatus.txt';

//The Location to your l2k Images:
$l2kimageloc = './ajax-images/l2k-images/';

//The Location to your Lightning Map:
$lightningmaploc = './l2kscrn.png';

//Where the storm key images are located:
$stormkeyimageloc = './ajax-images/l2k-images/';

$ajaximagesloc ='./ajax-images/';//Leave a slash at the end.

Open up wxl2k.php and change this line:

############################################################################
//l2k Logical operations and settings for the graph data:
include_once ("l2kdispsettings2.php");
############################################################################

to:

############################################################################ //l2k Logical operations and settings for the graph data: include_once ("l2kdispsettings.php"); ############################################################################

I did some testing on 1.21 and forgot to change the line.

Your PHP errors seem to be off, if they where on it would have outlined that it couldn’t include the settings file.

Sorry about that :frowning: #-o

Thanks Tim. All clear for throttle-up.

Version 1.25 Is now Released.

What it fixes:
The AJAX issue where the ajax Gizmo wouldnt update.

What Features have been added:
Update Time at the top of the script.

Download from: http://wx-matangi.dyndns.org/Weather/wxl2kdisplay.php

If you are using Version 1.21 you can use the Update and just replace the older files with the new ones.
If you are using less than version 1.21 use the full package.

The Update Package will not wipe your l2kdispsettings document so you wont have to reconfigure that, you will only need to reconfigure ajax settings document.

Enjoy :slight_smile:

Thanks Ken for fixing the AJAX issue :smiley:

Woops sorry Guys, I forgot to mod the data.txt file back to the original so the mysummary.txt document will now be placed back in the L2k folder.

Re-download the script if you want the updated data.txt file or download from the attachment here.

Best Reagards

Tim G


data.txt (13.4 KB)

Thanks Tim.

Thanks for this great script. Didn’t take too long to setup. You can see it here: http://www.shermanctweather.com/wxl2k.php

Fantastic! Glad you like it :smiley:

You can change your map colours if you dont like them in L2k :slight_smile:

From my post on the Aninoquisi Forum:

Version 1.30 is Now Launched!

This is due to the request of a standalone script.

I have added the standalone option in this version which doesnt require the PHP Caterlake Template anymore.

Its a universal release so there isnt a separate script if you want to run standalone or not.

To enable standalone mode in the script first of all update your script by replacing the old files with the new making adjustments to the settings as required.

You should see 3 new options in the settings now :slight_smile:

Set $standalone from false to true and then the script will then enter standalone mode.

If you are using standalone mode make sure you upload wxl2k.css file to your server this is what the style your page by default.
And if you put the css file outside the root folder make the you change the location to the css file in the settings.

This release also fixes numerous bugs, some to do with the way the ld250 page was laid out and also with the key colour settings variable bug.

If you noticed in version 1.25 that your flash and stroke/noise rate where not being updated by ajax you would be correct, this was due to me not checking the piece numbers.

Anyway enjoy the release and make sure you alter the wxl2k.css file (if in standalone mode) so it reflects the rest of your pages in your site.

I may do another release after this one in a bit to add bits of your code into the settings page so you wont need to touch the wxl2k.php document :wink:
This will help you guys who have a standalone page but want extra formatting up the top of you page eg: Navigation etc…

Just a note: When Upgrading you will need to change the ajaxl2k.js file to your settings and the l2kdispsettings.php document too.
You wont need to re-do anything in Lightning 2000 itself.

Download from the usual location: http://wx-matangi.dyndns.org/Weather/wxl2kdisplay.php

Have fun :smiley:

Best Regards

Tim G

Thanks Tim for the script. I have it working at:

http://www.meteolanaudiere.com/wxl2k.php

Not included in the menu because I want to test it further. How do I get the graph to display? I did the option/screencapture/graaph tab but it does not show on the site.