Author Topic: AS3595 not Detecting Strikes  (Read 37399 times)

0 Members and 1 Guest are viewing this topic.

Offline Frank57

  • Member
  • *
  • Posts: 44
    • TyngsboroWeather
Re: AS3595 not Detecting Strikes
« Reply #100 on: July 18, 2014, 09:02:05 PM »
Oh ok Don, is this the only way so far or perhaps there are others out there that maybe wrote a small program for capturing the data and even in a graphical format or am I just reaching for the stars at this early point of development of these boards coming out. Guess I'll be learning once I get a board, someday... thanks   :-)

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3595 not Detecting Strikes
« Reply #101 on: July 23, 2014, 11:24:54 AM »
Yes, for the rate calculation, that happens as the first strike in a new event will show a duration of zero. I didn't bother to trap for it or add a conditional statement to fix it. It doesn't affect the graphs.

Here's the latest code:

Code: [Select]
<?php
$date 
date("m/d/Y");
$time date("G:i:s");
$datetime "$date $time";

# Retrieve all possible value names and values from Controller on strike event for testing and save to file.
# $file_test = fopen("/volume1/web/as3935_test.txt","w");
# foreach ($_GET as $key => $value)
# {
# fwrite($file_test,"$key:  $value\n");
# }
# fclose($file_test);

$strokes $_GET['strokes'];
$disturbers $_GET['disturbers'];
$duration $_GET['duration'];
#$rate = $strokes;
$rate round(($strokes/$duration*60),2);
$dist $_GET['dist'];
$dist_min $_GET['dist_min'];
$dist_max $_GET['dist_max'];
$energy $_GET['energy'];
$energy_min $_GET['energy_min'];
$energy_max $_GET['energy_max'];
$strokes_all $_GET['strokes_all'];
$disturbers_all $_GET['disturbers_all'];
$events $_GET['events'];

if (!
file_exists("/volume1/web/as3935_log.txt")) {
     
$file fopen("/volume1/web/as3935_log.txt","w");
     
fwrite($file,"Date,Time,Date-Time,Event Strokes,Event Disturbers,Event Duration,Event Strike Rate,Current Strike Distance,Event Min Distance,Event Max Distance,Current Strike Energy,Event Min Energy,Event Max Energy,All Strokes,All Disturbers,Events\n");
fclose($file);
     }

$file fopen("/volume1/web/as3935_log.txt","a");
fwrite($file,"$date,$time,$datetime,$strokes,$disturbers,$duration,$rate,$dist,$dist_min,$dist_max,$energy,$energy_min,$energy_max,$strokes_all,$disturbers_all,$events\n");
fclose($file);

$file2 fopen("/volume1/web/as3935_display.txt","w");
fwrite($file2,"\nLast Strike\n==== ======\nLatest Strike:.................$date $time\nLatest Strike Distance:........$dist KM\nLatest Strike Energy:..........$energy\n\nLast Event\n==== =====\nNumber of Strikes in Event:....$strokes\nLightning Event Duration:......$duration Seconds\nCurrent Event Strike Rate:.....$rate Strikes/Minute\nShortest Distance to Strike:...$dist_min KM\nLongest Distance to Strike:....$dist_max KM\nLowest Strike Intensity:.......$energy_min\nHighest Strike Intensity:......$energy_max\nTotal strikes since reboot:....$strokes_all\n");
fclose($file2);
?>

Don,

Could you post the most recent updates to this script? I looked here and at BO and can't find it. I think that there were some changes since this post. Maybe some for 7.2?

I am missing some fields and your output looks more complete. Thanks.

This is the simple text-style output with the bright green backround.

http://www.sunrisesideweather.com/as3935display.php

You can see that I am missing data in a lot of fields now and I would like to fix that.


Greg H.
« Last Edit: July 23, 2014, 11:31:36 AM by miraculon »


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline Frank57

  • Member
  • *
  • Posts: 44
    • TyngsboroWeather
Re: AS3595 not Detecting Strikes
« Reply #102 on: July 23, 2014, 08:58:17 PM »
Well, here's an update. Amazon contacted them directly since they had a unhappy buyer. They finally emailed me back stating that emails were going to the wrong mailbox and then to top it off, stated they have had issues getting parts for the boards ](*,). Are you kidding me? They were selling them on Amazon and had 2 left, I bought one, leaving 1 left. Now they well me it will be a couple of weeks waiting for some parts even thou they had some (would have thought complete) they were selling. I don't know if I'll ever get one. Jet, PM me if you would like to sell one of them Tautic module extra ones you have. Also, were is everyone getting these programs to run these on their PC's, creating plots and charts of their data? I have seen others uploading these graphs and charts..  Thank you Frank    :-)
Update 7/23/14: finally got an email back from them, after having Amazon contact, said they ran out of pcb's and more were coming in and that the ones listed on Amazon were also shared with the ones in Ebay, so they sold out. More were coming in next week. One question now, while I wait, I see there are 3 of these types of pcb's out there. The from Embedded, another one from Tautic and now there is another one out there, are these all the same other than the outputs and the printing, layout of the parts on them, producing the same results?  #-o

Offline Josiah

  • Add-InWx Software Author
  • Forecaster
  • *****
  • Posts: 449
    • Add-InWx
Re: AS3595 not Detecting Strikes
« Reply #103 on: July 23, 2014, 10:45:50 PM »
One question now, while I wait, I see there are 3 of these types of pcb's out there. The from Embedded, another one from Tautic and now there is another one out there, are these all the same other than the outputs and the printing, layout of the parts on them, producing the same results?  #-o

Over all, I would think that they would all have pretty close to the same performance. I've asked the same question your asking now. Its been awhile since I've fiddled around with them but I'll tell you what I can remember.

From a Schematic point of view:
Comparing the data sheets from the manufacturer of the AS3935 to the Data sheets on the PCB modules, It looks like they all use pretty much the same Schematic. The few differences that I do see are related to if the PCB was setup for I2C or SPI use.

From a Layout point and Component of view:
There's not very many components to rearrange so the differences there are again minimal.
The Component values used on the PCBs are all the same as whats recommended in by the AS3935 manufacturer.

To connect them to a PC without having a micro-controller, You could use a Serial to SPI or I2C adapter. I haven't personally tried one of these though.

If you really want to see what the differences are I would recommend doing what I did and start looking at the Data sheets. As for differences in performance, I don't know if your going to find much. For anyone to really know which one works the best is going to require them to have all three just for comparison purposes. My guess on them performing close to the same is based on the fact that they all use the AS3935 chip which does have some tuning ability for the Antenna circuit. Which between the AS3935 Chip and Antenna, that's where all the detection work is being done.

Just my $0.02 worth, I don't know if this is any help to you.

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #104 on: July 23, 2014, 11:02:11 PM »
These are the latest scripts. You also need the following libraries present in the directory with the scripts. Search in Google and download from the Web:

jquery-1.11.0.min.js
jquery.csv-0.71.js


This is the script to call from the "Actions" section of the controller Settings page. Adjust the paths to the log file (as3935_log.txt) and text display file (as3935_display.txt) to suit the local path on the machine running the Apache web server - log_as3935.php:

Code: [Select]
<?php
$date 
date("m/d/Y");
$time date("G:i:s");
$datetime "$date $time";

# Retrieve all possible value names and values from Controller on strike event for testing and save to file.
# $file_test = fopen("/volume1/web/as3935_test.txt","w");
# foreach ($_GET as $key => $value)
# {
# fwrite($file_test,"$key:  $value\n");
# }
# fclose($file_test);

$strokes $_GET['strokes'];
$disturbers $_GET['disturbers'];
$duration $_GET['duration'];
#$rate = $strokes;
if ($duration <= 60) {
($rate 0);
} else {
$rate round(($strokes/$duration*60),2);
}
$dist $_GET['dist'];
$dist_min $_GET['dist_min'];
$dist_max $_GET['dist_max'];
$energy $_GET['energy'];
$energy_min $_GET['energy_min'];
$energy_max $_GET['energy_max'];
$strokes_all $_GET['strokes_all'];
$disturbers_all $_GET['disturbers_all'];
$events $_GET['events'];

if (!
file_exists("/volume1/web/as3935_log.txt")) {
     
$file fopen("/volume1/web/as3935_log.txt","w");
     
fwrite($file,"Date,Time,Date-Time,Event Strokes,Event Disturbers,Event Duration,Event Strike Rate,Current Strike Distance,Event Min Distance,Event Max Distance,Current Strike Energy,Event Min Energy,Event Max Energy,All Strokes,All Disturbers,Events\n");
fclose($file);
     }

$file fopen("/volume1/web/as3935_log.txt","a");
fwrite($file,"$date,$time,$datetime,$strokes,$disturbers,$duration,$rate,$dist,$dist_min,$dist_max,$energy,$energy_min,$energy_max,$strokes_all,$disturbers_all,$events\n");
fclose($file);

$file2 fopen("/volume1/web/as3935_display.txt","w");
fwrite($file2,"\nLast Strike\n==== ======\nLatest Strike:.................$date $time\nLatest Strike Distance:........$dist KM\nLatest Strike Energy:..........$energy\n\nLast Event\n==== =====\nNumber of Strikes in Event:....$strokes\nLightning Event Duration:......$duration Seconds\nCurrent Event Strike Rate:.....$rate Strikes/Minute\nShortest Distance to Strike:...$dist_min KM\nLongest Distance to Strike:....$dist_max KM\nLowest Strike Intensity:.......$energy_min\nHighest Strike Intensity:......$energy_max\nTotal strikes since reboot:....$strokes_all\n");
fclose($file2);
?>



This is the .html that reads the as3935_log.txt CSV file and displays the Distance graph - as3935_distance.html:

Code: [Select]
<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="refresh" content="60">
   <title>AS3935 Distance</title>
   <script src="https://www.google.com/jsapi"></script>
   <script src="./jquery-1.11.0.min.js"></script>
   <script src="./jquery.csv-0.71.js"></script>

   <script>
    // load the visualization library from Google and set a listener
    google.load("visualization", "1", {packages:["corechart"]});

    // next line prevents caching of retrieved data by IE and possibly other browsers.
    // without this, IE11 never updated the graphs on new strike data being added to the .csv file.
    $.ajaxSetup({ cache: false });

    google.setOnLoadCallback(drawChart);

    function drawChart() {
    // grab the CSV
    $.get("as3935_log.txt", function(csvString) {

    // transform the CSV string into a 2-dimensional array
    var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});

    // this new DataTable object holds all the data
    var data = new google.visualization.arrayToDataTable(arrayData);

    //Use rowRange variable to set the last "n" number of rows of data to display
    var rowRange = 300;

    var numRows = data.getNumberOfRows();
    var maxRows = numRows-1;
    var minRows = numRows-rowRange;
    if (minRows < 0){minRows = 0;}

    // this view can select a subset of the data at a time
    var view = new google.visualization.DataView(data);
    view.setColumns([2,7]);
    view.setRows(minRows,maxRows);

    var options = {
    title: "AS3935 Lightning Distance in KM\nLast 300 Strikes",
    chartArea: {height: 120, width: 1000},
    backgroundColor: {fill: "#33CCFF"},
    hAxis: {title: data.getColumnLabel(2), slantedText: 1, slantedTextAngle: 45, textStyle: {fontSize: 10}},
    //vAxis: {title: data.getColumnLabel(7), minValue: data.getColumnRange(7).min, maxValue: data.getColumnRange(7).max},
vAxis: {title: data.getColumnLabel(7)},
    legend: 'none'

    };
   
    var chart1 = new google.visualization.ColumnChart(document.getElementById('chart1'));
    chart1.draw(view, options);
   });
}
</script>

</head>
<body>
   <div id="chart1" style="width:1100px; height:325px;"> </div>
</body>
</html>


This is the .html that reads the as3935_log.txt CSV file and displays the Energy graph - as3935_energy.html:

Code: [Select]
<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="refresh" content="60" >
   <title>AS3935 Energy</title>
   <script src="https://www.google.com/jsapi"></script>
   <script src="./jquery-1.11.0.min.js"></script>
   <script src="./jquery.csv-0.71.js"></script>

   <script>
    // load the visualization library from Google and set a listener
    google.load("visualization", "1", {packages:["corechart"]});

    // next line prevents caching of retrieved data by IE and possibly other browsers.
    // without this, IE11 never updated the graphs on new strike data being added to the .csv file.
    $.ajaxSetup({ cache: false });

    google.setOnLoadCallback(drawChart);

    function drawChart() {
    // grab the CSV
    $.get("as3935_log.txt", function(csvString) {

    // transform the CSV string into a 2-dimensional array
    var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});

    // this new DataTable object holds all the data
    var data = new google.visualization.arrayToDataTable(arrayData);

    //Use rowRange variable to set the last "n" number of rows of data to display
    var rowRange = 300;

    var numRows = data.getNumberOfRows();
    var maxRows = numRows-1;
    var minRows = numRows-rowRange;
    if (minRows < 0){minRows = 0;}

    // this view can select a subset of the data at a time
    var view = new google.visualization.DataView(data);
    view.setColumns([2,10]);
    view.setRows(minRows,maxRows);

    var options = {
    title: "AS3935 Lightning Energy - Unitless\nLast 300 Strikes",
    chartArea: {height: 120, width: 900},
    backgroundColor: {fill: "#33CCFF"},
    hAxis: {title: data.getColumnLabel(2), slantedText: 1, slantedTextAngle: 45, textStyle: {fontSize: 10}},
    //vAxis: {title: data.getColumnLabel(10), minValue: data.getColumnRange(10).min, maxValue: data.getColumnRange(10).max},
vAxis: {title: data.getColumnLabel(10)},
    legend: 'none'

    };
   
    var chart2 = new google.visualization.ColumnChart(document.getElementById('chart2'));
    chart2.draw(view, options);
   });

   </script>

</head>
<body>
   <div id="chart2" style="width:1100px; height:325px;">
   </div>

</body>
</html>


This is the .html that reads the as3935_log.txt CSV file and displays the Rate graph - as3935_rate.html:

Code: [Select]
<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="refresh" content="60" >
   <title>AS3935 Rate</title>
   <script src="https://www.google.com/jsapi"></script>
   <script src="./jquery-1.11.0.min.js"></script>
   <script src="./jquery.csv-0.71.js"></script>

   <script>
    // load the visualization library from Google and set a listener
    google.load("visualization", "1", {packages:["corechart"]});

    // next line prevents caching of retrieved data by IE and possibly other browsers.
    // without this, IE11 never updated the graphs on new strike data being added to the .csv file.
    $.ajaxSetup({ cache: false });

    google.setOnLoadCallback(drawChart);

    function drawChart() {
    // grab the CSV
    $.get("as3935_log.txt", function(csvString) {

    // transform the CSV string into a 2-dimensional array
    var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});

    // this new DataTable object holds all the data
    var data = new google.visualization.arrayToDataTable(arrayData);

    //Use rowRange variable to set the last "n" number of rows of data to display
    var rowRange = 300;

    var numRows = data.getNumberOfRows();
    var maxRows = numRows-1;
    var minRows = numRows-rowRange;
    if (minRows < 0){minRows = 0;}

    // this view can select a subset of the data at a time
    var view = new google.visualization.DataView(data);
    view.setColumns([2,6]);
    view.setRows(minRows,maxRows);

    var options = {
    title: "AS3935 Lightning Event Strike Rate\nStrikes/Minute\nLast 300 Strikes",
    chartArea: {height: 120, width: 900},
    backgroundColor: {fill: "#33CCFF"},
    hAxis: {title: data.getColumnLabel(2), slantedText: 1, slantedTextAngle: 45, textStyle: {fontSize: 10}},
    //vAxis: {title: data.getColumnLabel(6), minValue: data.getColumnRange(6).min, maxValue: data.getColumnRange(6).max},
vAxis: {title: data.getColumnLabel(6)},
    legend: 'none'

    };
   
    var chart3 = new google.visualization.ColumnChart(document.getElementById('chart3'));
    chart3.draw(view, options);
   });

   </script>

</head>
<body>
   <div id="chart3" style="width:1100px; height:325px;">
   </div>

</body>
</html>

This html formats the as3935_display.txt for proper display on a web page. It must have a .php suffix - display_as3935_data.php:

Code: [Select]
<html>
<head>
<meta http-equiv="refresh" content="5" >
</head>
<body bgcolor="#33CCFF">
<?php 
echo "<p> <b> <font face='courier'>";
echo 
nl2br(file_get_contents("as3935_display.txt")); 
echo 
"</font> </b> </p>";
?>

</body>
</html>

This ties it all together on a single web page  - as3935_stats.html:

Code: [Select]
<!DOCTYPE html>
<html>
<head>
</head>
<body bgcolor="#FFFFCC">

<center>

<p><b><font size="5" color="blue">AS3935 Local Lightning Detection Module Statistics</font></b></p>
<p><b>Text updates every 5 seconds. Graphs upate every minute. Times in US Central local time.</b></p>
<p>The AS3935 chip-based detector module detects local lightning strikes independently of the primary Blitzortung hardware, although
the Blitzortung controller communicates with the module and gathers data for each detected strike. The
chip on the board performs detection, distance estimates to the leading edge of the storm front, and a measure
of relative energy received for each strike. The module does not provide direction or position information.</p>
<iframe src="display_as3935_data.php" height=335 width=545 scrolling=no frameborder=0>  margin=auto display=block align=middle</iframe></br>
<iframe src="as3935_distance.html" height=335 width=1125 scrolling=no frameborder=0 margin=auto display=block></iframe>
<iframe src="as3935_energy.html" height=335 width=1125 scrolling=no frameborder=0 margin=auto display=block></iframe>
<iframe src="as3935_rate.html" height=335 width=1125 scrolling=no frameborder=0 margin=auto display=block></iframe>

</center>

</body>
</html>

Regards,

Don

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3595 not Detecting Strikes
« Reply #105 on: July 24, 2014, 08:38:21 AM »
Thanks for posting the scripts, Don.

I assume that the plots and data fields will be blank until the next time I get some activity from the AS3935. After twiddling with the paths and permissions, I have it working. (pending the next strikes!)

Your banner at the top of the page refers to Central time, but I am seeing UTC. Is this a server function? I didn't find anything in the scripts for time zone.

Greg H.

« Last Edit: July 24, 2014, 09:01:38 AM by miraculon »


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #106 on: July 24, 2014, 09:13:06 AM »
You're welcome!

If you manually call the log_as3935.php script from a web browser, it will add an entry to the log file with date and time fields, but no valid strike data. This will make your graphs plot a bunch of empty data points. Your log file seems to have many of these empty data entries.

You might want to delete the as3935_log.txt or move it to a backup file. The script will create a new file on the first call from the controller on an AS3935 lightning event. You can also manually delete the entries with no valid lightning data with a text editor. Be sure not to leave any extra newlines in the text file, or the graphing scripts won't load the log file properly. You also need to leave the newline at the end of the log file.

I'm also updating the script to log Blitzortung server alerts in a separate log file and display a set of graphs for those events. I'm still testing those scripts.

Best,

Don
WD9DMP

Thanks for posting the scripts, Don.

I assume that the plots and data fields will be blank until the next time I get some activity from the AS3935. After twiddling with the paths and permissions, I have it working. (pending the next strikes!)

Greg H.

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #107 on: July 24, 2014, 09:39:14 AM »
The script that writes the log file does not use the time stamp that the Controller appends when it calls the script, but calculates the time and date when it is called using the PHP "date" function. On my Linux server, a Synology NAS, the PHP "date" function returns the UTC adjusted with the local timezone. I do not think this is typical Linux behavior, though. The Synology NAS Linux variant does things differently. A more conventional Linux server will probably return UTC.

The reason I did not use the embedded timestamp from the controller is to make the formatting of the date and time easier using the PHP "date" function (first few lines of the script).

Yes, the "last strike" text data will not get updated until a strike is detected. If you have valid strike data in the log file, the graphing scripts will load the entire log file, but only display the last 300 events. If their are less than 300 events in the log, all of the entries will be displayed with wider bars on the graph.

Changing the graphing script to display much over 300 strikes seems not to work very well, likely because the Google API can't make the bars narrow enough to display all of the strikes with the graph dimensions I have specified in the scripts.

Best,

Don
WD9DMP

I assume that the plots and data fields will be blank until the next time I get some activity from the AS3935. After twiddling with the paths and permissions, I have it working. (pending the next strikes!)

Your banner at the top of the page refers to Central time, but I am seeing UTC. Is this a server function? I didn't find anything in the scripts for time zone.

Greg H.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3595 not Detecting Strikes
« Reply #108 on: July 24, 2014, 09:47:53 AM »
The script that writes the log file does not use the time stamp that the Controller appends when it calls the script, but calculates the time and date when it is called using the PHP "date" function. On my Linux server, a Synology NAS, the PHP "date" function returns the UTC adjusted with the local timezone. I do not think this is typical Linux behavior, though. The Synology NAS Linux variant does things differently. A more conventional Linux server will probably return UTC.

The reason I did not use the embedded timestamp from the controller is to make the formatting of the date and time easier using the PHP "date" function (first few lines of the script).

Yes, the "last strike" text data will not get updated until a strike is detected. If you have valid strike data in the log file, the graphing scripts will load the entire log file, but only display the last 300 events. If their are less than 300 events in the log, all of the entries will be displayed with wider bars on the graph.

Changing the graphing script to display much over 300 strikes seems not to work very well, likely because the Google API can't make the bars narrow enough to display all of the strikes with the graph dimensions I have specified in the scripts.

Best,

Don
WD9DMP

I assume that the plots and data fields will be blank until the next time I get some activity from the AS3935. After twiddling with the paths and permissions, I have it working. (pending the next strikes!)

Your banner at the top of the page refers to Central time, but I am seeing UTC. Is this a server function? I didn't find anything in the scripts for time zone.

Greg H.

OK, thanks again. I just removed the reference to Central Time. I will just wait for some strikes, since this is the expected behavior.

Greg


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #109 on: July 24, 2014, 10:40:21 AM »
You can test the graphs and text display by entering this URL in your browser. The URL will feed dummy data to the script. Substitute the domain of your web server and the path to your script, if necessary:

Code: [Select]
http://my.domain.com/log_as3935.php?strokes=25&disturbers=0&duration=180&dist=31&dist_min=1&dist_max=50&energy=28251&energy_min=5432&energy_max=50123&strokes_all=350&disturbers_all=0&events=13

Regards,

Don

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #110 on: July 24, 2014, 11:47:35 AM »
BTW, the updated logging script now sets the lightning rate to zero if a strike occurs within the first 60 seconds of a new lightning "event". A new "event" is started by the Controller after some period of lightning inactivity.

The reason for this is that the rate calculation (number of event strikes / event duration) is not really valid until at least 60 seconds have elapsed. Before this was done, there were some very high strike rates being calculated that were not representative of the actual rate.

Each of the bars on the three graphs are aligned across the graphs, as new data is calculated after each strike. There will be a few zero-rate plots on the rate graph for any strikes occurring within 60 seconds of the start of a new "event".

The graphs show only individual strikes and are event-driven. They do not graph the events over a regular time interval. As the lightning rate increases, more plots will be shown.

Best,

Don
WD9DMP
« Last Edit: July 24, 2014, 11:54:05 AM by dfroula »

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3595 not Detecting Strikes
« Reply #111 on: July 24, 2014, 12:46:48 PM »
You can test the graphs and text display by entering this URL in your browser. The URL will feed dummy data to the script. Substitute the domain of your web server and the path to your script, if necessary:

Code: [Select]
http://my.domain.com/log_as3935.php?strokes=25&disturbers=0&duration=180&dist=31&dist_min=1&dist_max=50&energy=28251&energy_min=5432&energy_max=50123&strokes_all=350&disturbers_all=0&events=13

Regards,

Don

I ran this and see the updated text:

Quote
Last Strike
==== ======
Latest Strike:.................07/24/2014 16:37:16
Latest Strike Distance:........31 KM
Latest Strike Energy:..........28251

Last Event
==== =====
Number of Strikes in Event:....25
Lightning Event Duration:......180 Seconds
Current Event Strike Rate:.....8.33 Strikes/Minute
Shortest Distance to Strike:...1 KM
Longest Distance to Strike:....50 KM
Lowest Strike Intensity:.......5432
Highest Strike Intensity:......50123
Total strikes since reboot:....350

but, the graphs area is still blank.... :-k

I have checked permissions and paths.

Greg H.

« Last Edit: July 24, 2014, 01:13:31 PM by miraculon »


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
Re: AS3595 not Detecting Strikes
« Reply #112 on: July 24, 2014, 01:41:08 PM »
I am using the same scripts and had to do 2 additional steps.
I had to manually create and name the "as3935.txt" (my filename) in notepad then add this and upload it. Then change the file permissions.
Code: [Select]
Date,Time,Date-Time,Event Strokes,Event Disturbers,Event Duration,Event Strike Rate,Current Strike Distance,Event Min Distance,Event Max Distance,Current Strike Energy,Event Min Energy,Event Max Energy,All Strokes,All Disturbers,Events

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #113 on: July 24, 2014, 03:49:17 PM »
Your log file at http://www.sunrisesideweather.com/as3935_log.txt is missing the first column header line. The graphs will not display without the first header line.

Just delete as3935_log.txt and run the URL I posted with the dummy data a dozen times or so. If the log file is deleted, the script will create a new file with the correct header.

Or, add this as the first line in your existing log file:

Code: [Select]
Date,Time,Date-Time,Event Strokes,Event Disturbers,Event Duration,Event Strike Rate,Current Strike Distance,Event Min Distance,Event Max Distance,Current Strike Energy,Event Min Energy,Event Max Energy,All Strokes,All Disturbers,Events

Don
WD9DMP

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3595 not Detecting Strikes
« Reply #114 on: July 24, 2014, 04:25:58 PM »
Sorry, Don. Sometimes I confuse my web sites.
I actually have it at http://www.miraculon.net/froula/as3935_log.txt. (directory name in in your honor...)
I now have that header row, but no graphics yet.
Here is the link to the main script: http://miraculon.net/froula/as3935_stats.html

Greg H.



Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #115 on: July 24, 2014, 05:05:56 PM »
I ran the JS debugger on your main page and it showed these errors:

Code: [Select]
Failed to load resource: the server responded with a status of 404 (Not Found) http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery-1.11.0.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery.csv-0.71.js
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_energy.html:16
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_rate.html:16
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_distance.html:16
GET http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery.csv-0.71.js 404 (Not Found) as3935_distance.html:8
GET http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery-1.11.0.min.js 404 (Not Found) as3935_distance.html:7
Uncaught ReferenceError: $ is not defined as3935_energy.html:16
Uncaught ReferenceError: $ is not defined as3935_distance.html:16
Uncaught ReferenceError: $ is not defined as3935_rate.html:16

It appears you need to download the two .js packages and put them in the web/froula/ directory. The graphing scripts need those libraries to work.

You can grab them here:

http://jquery.com/download/
https://code.google.com/p/jquery-csv/downloads/detail?name=jquery.csv-0.71.js&can=2&q=


Best,

Don

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #116 on: July 24, 2014, 05:28:25 PM »
Also, the first line of data in the CSV log file looks like two concatenated lines run together.

Delete the log file, then run this url from a browser. Hit refresh a few dozen times to create a new file and to load up the log file with data.

Code: [Select]
http://miraculon.net/froula//log_as3935.php?strokes=25&disturbers=0&duration=180&dist=31&dist_min=1&dist_max=50&energy=28251&energy_min=5432&energy_max=50123&strokes_all=350&disturbers_all=0&events=13

A small bug is anybody can write bum data into your log if they can access the php logging script ( as I just did)!

Don
WD9DMP

Offline Frank57

  • Member
  • *
  • Posts: 44
    • TyngsboroWeather
Re: AS3595 not Detecting Strikes
« Reply #117 on: July 24, 2014, 07:23:05 PM »
One question now, while I wait, I see there are 3 of these types of pcb's out there. The from Embedded, another one from Tautic and now there is another one out there, are these all the same other than the outputs and the printing, layout of the parts on them, producing the same results?  #-o

Over all, I would think that they would all have pretty close to the same performance. I've asked the same question your asking now. Its been awhile since I've fiddled around with them but I'll tell you what I can remember.

From a Schematic point of view:
Comparing the data sheets from the manufacturer of the AS3935 to the Data sheets on the PCB modules, It looks like they all use pretty much the same Schematic. The few differences that I do see are related to if the PCB was setup for I2C or SPI use.

From a Layout point and Component of view:
There's not very many components to rearrange so the differences there are again minimal.
The Component values used on the PCBs are all the same as whats recommended in by the AS3935 manufacturer.

To connect them to a PC without having a micro-controller, You could use a Serial to SPI or I2C adapter. I haven't personally tried one of these though.

If you really want to see what the differences are I would recommend doing what I did and start looking at the Data sheets. As for differences in performance, I don't know if your going to find much. For anyone to really know which one works the best is going to require them to have all three just for comparison purposes. My guess on them performing close to the same is based on the fact that they all use the AS3935 chip which does have some tuning ability for the Antenna circuit. Which between the AS3935 Chip and Antenna, that's where all the detection work is being done.

Just my $0.02 worth, I don't know if this is any help to you.

Hi Josiah, thanks for the info and thoughts. With 3 of them out there now, maybe others have tried them and noticed any differences.   :-)

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
Re: AS3595 not Detecting Strikes
« Reply #118 on: July 24, 2014, 09:44:24 PM »
The script that writes the log file does not use the time stamp that the Controller appends when it calls the script, but calculates the time and date when it is called using the PHP "date" function. On my Linux server, a Synology NAS, the PHP "date" function returns the UTC adjusted with the local timezone. I do not think this is typical Linux behavior, though. The Synology NAS Linux variant does things differently. A more conventional Linux server will probably return UTC.
I tried all night to get it with no success. I am getting the UTC returned. How can it be adjusted for central time and date?

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #119 on: July 24, 2014, 09:57:19 PM »
Dave, do you have a link to your installation?

Do
WD9DMP

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
Re: AS3595 not Detecting Strikes
« Reply #120 on: July 24, 2014, 09:58:37 PM »
yep  :grin:

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3595 not Detecting Strikes
« Reply #121 on: July 24, 2014, 10:03:20 PM »
I ran the JS debugger on your main page and it showed these errors:

Code: [Select]
Failed to load resource: the server responded with a status of 404 (Not Found) http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery-1.11.0.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery.csv-0.71.js
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_energy.html:16
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_rate.html:16
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_distance.html:16
GET http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery.csv-0.71.js 404 (Not Found) as3935_distance.html:8
GET http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery-1.11.0.min.js 404 (Not Found) as3935_distance.html:7
Uncaught ReferenceError: $ is not defined as3935_energy.html:16
Uncaught ReferenceError: $ is not defined as3935_distance.html:16
Uncaught ReferenceError: $ is not defined as3935_rate.html:16

It appears you need to download the two .js packages and put them in the web/froula/ directory. The graphing scripts need those libraries to work.

You can grab them here:

http://jquery.com/download/
https://code.google.com/p/jquery-csv/downloads/detail?name=jquery.csv-0.71.js&can=2&q=


Best,

Don

That is where I have the files. The jquery-1.11.0.min.js wasn't showing, the 1.11.1 one was. I went to the all versions page and downloaded jQuery Core 1.11.0 - uncompressed, minified.

I am looking at the two .js files sitting in the froula directory. Still no graphs...

Greg H.





Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3595 not Detecting Strikes
« Reply #122 on: July 24, 2014, 10:04:43 PM »
I ran the JS debugger on your main page and it showed these errors:

Code: [Select]
Failed to load resource: the server responded with a status of 404 (Not Found) http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery-1.11.0.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery.csv-0.71.js
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_energy.html:16
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_rate.html:16
Uncaught ReferenceError: $ is not defined miraculon.net/froula/as3935_distance.html:16
GET http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery.csv-0.71.js 404 (Not Found) as3935_distance.html:8
GET http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery-1.11.0.min.js 404 (Not Found) as3935_distance.html:7
Uncaught ReferenceError: $ is not defined as3935_energy.html:16
Uncaught ReferenceError: $ is not defined as3935_distance.html:16
Uncaught ReferenceError: $ is not defined as3935_rate.html:16

It appears you need to download the two .js packages and put them in the web/froula/ directory. The graphing scripts need those libraries to work.

You can grab them here:

http://jquery.com/download/
https://code.google.com/p/jquery-csv/downloads/detail?name=jquery.csv-0.71.js&can=2&q=


Best,

Don

That is where I have the files. The jquery-1.11.0.min.js wasn't showing, the 1.11.1 one was. I went to the all versions page and downloaded jQuery Core 1.11.0 - uncompressed, minified.

I am looking at the two .js files sitting in the froula directory. Still no graphs...

Greg H.

I just did a wget on my linux box and it finds them, but the browser claims it can't. I also moved them up a directory and changed the script URL calls to the full http://www.miraculon.net/jquery.....js src links.

« Last Edit: July 24, 2014, 10:28:04 PM by miraculon »


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 551
Re: AS3595 not Detecting Strikes
« Reply #123 on: July 24, 2014, 10:20:14 PM »
Greg, all three of the scripts (rate, distance, and energy) are not able to load the .js package files. They all return this error:

Code: [Select]
GET http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery.csv-0.71.js 404 (Not Found) as3935_rate.html:8
GET http://miraculon.net/virtual/users/e17373-19178/web/froula/jquery-1.11.0.min.js 404 (Not Found) as3935_rate.html:7
Uncaught ReferenceError: $ is not defined

Perhaps you need to set executable permissions on the .js files, as they seem to be present in the web/froula/ directory.

Try to chmod 777 those two .js files.

Also, try to just specify the package file names in the three scripts without the fully-qualified path. For example, change the lines in each of the three files from:

Code: [Select]
<script src="/virtual/users/e17373-19178/web/froula//jquery-1.11.0.min.js"></script>
<script src="/virtual/users/e17373-19178/web/froula//jquery.csv-0.71.js"></script>

to

Code: [Select]
<script src="./jquery-1.11.0.min.js"></script>
<script src="./jquery.csv-0.71.js"></script>

Don
WD9DMP

Sorry, Don. Sometimes I confuse my web sites.
I actually have it at http://www.miraculon.net/froula/as3935_log.txt. (directory name in in your honor...)
I now have that header row, but no graphics yet.
Here is the link to the main script: http://miraculon.net/froula/as3935_stats.html

Greg H.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3595 not Detecting Strikes
« Reply #124 on: July 24, 2014, 10:35:02 PM »
I must have gone around in circles on this, but the last thing I did was

Code: [Select]
Code: [Select]

<script src="./jquery-1.11.0.min.js"></script>
<script src="./jquery.csv-0.71.js"></script>

and it worked!  \:D/

Thanks!

Greg


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

 

anything