Page 1 of 1

Problem with Davis Reception Stats

Posted: Mon 21 Sep 2015 6:49 am
by MCQ
I have an RPi 2 running MX b3030 connected to a Davis VP2 Console with FW 3.15 and a USB Datalogger.

I have a custom page that displays Davis Stats and I use PRTG to read the Stats and email me if my communications goes down or starts throwing a lot of errors (CRC, missed packets, resynchs, etc.) or if my web server serving the Cumulus web pages goes down. I had this working fine with v1.9.4.

I just got a new page up for MX and it returned one set of stats and then stopped updating. I turned on debug logging and it doesn't appear that MX is querying for the stats even though it was working fine yesterday. Here are my .ini file settings:

DavisReadReceptionStats=1

ExtraLocal1=web/dstatsT.htm
ExtraRemote1=web/cumulus/dstats.htm
ExtraProcess1=1
ExtraBinary1=0
ExtraRealtime1=0
ExtraFTP1=1
ExtraUTF1=1

Here is a snippet of my log from yesterday when I had debug logging enabled for another issue:

2015-09-19 00:30:48.035 Sending command LPS 2 1 - pass 1
2015-09-19 00:30:48.536 Loop2: 4C-4F-4F-00-01-FF-7F-D9-74-AC-02-13-31-02-00-FF-52-00-06-00-05-00-03-00-43-00-FF-7F-FF-7F-1A-00-FF-1F-FF-35-00-38-00-FF-00-00-00-FF-FF-7F-00-00
-FF-FF-00-00-00-00-00-00-00-00-00-00-02-1B-00-C5-FF-C9-61-E4-61-A0-75-FF-05-14-14-0C-0D-15-14-2D-08-00-00-FF-7F-FF-7F-FF-7F-FF-7F-FF-7F-FF-7F-0A-0D-9C-0A
2015-09-19 00:30:48.537 10-min gust from loop2: 2.6
2015-09-19 00:30:48.638 Sending command LOOP 50 - pass 1
2015-09-19 00:32:25.489 Reading reception stats
2015-09-19 00:32:25.791 0A-0D-4F-4B-0A-0D-32-37-39-20-31-20-30-20-31-39-34-20-34-0A-0D-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
2015-09-19 00:32:25.791 279 1 0 194 4

Here is a snippet of my log from tonight with no reception stats reads:

2015-09-20 23:25:05.683 Sending command LPS 2 1 - pass 1
2015-09-20 23:25:06.184 Loop2: 4C-4F-4F-14-01-FF-7F-95-74-B5-02-12-9A-02-00-FF-39-00-0B-00-00-00-04-00-2D-00-FF-7F-FF-7F-19-00-FF-15-FF-3E-00-43-00-FF-00-00-00-FF-FF-7F-00-00-FF-FF-00-00-00-00-00-00-00-00-00-00-02-1B-00-C5-FF-D3-61-EE-61-AB-75-FF-04-0D-0F-0A-0E-0C-14-18-08-00-00-FF-7F-FF-7F-FF-7F-FF-7F-FF-7F-FF-7F-0A-0D-E3-49
2015-09-20 23:25:06.189 10-min gust from loop2: 3.5
2015-09-20 23:25:06.290 Sending command LOOP 50 - pass 1
2015-09-20 23:26:43.706 Sending command LPS 2 1 - pass 1

Re: Problem with Davis Reception Stats

Posted: Mon 21 Sep 2015 7:33 am
by steve
There's a bug in the code I added so that reception stats should only be read every 15 minutes. The code actually checks whether the last time they were read plus 15 minutes is greater than the current time, and if so, reads the stats. The check should be the other way round, as otherwise it would read the stats every time around the data reading loop, which will normally be every couple of minutes - I can see this happening on my system.

However, if the system clock jumped forward by 15 minutes or more, the reading of the reception stats would stop, as the current check would never be true. If this was happening on your system, this woul;d explain why the stats stop being read, and it might also explain your issue with the console clock.

I'll fix the bug in the next build.

Re: Problem with Davis Reception Stats

Posted: Mon 21 Sep 2015 8:38 am
by MCQ
I posted a reply in https://cumulus.hosiene.co.uk/viewtopic.php?f=27&t=13197 about my clock issue which looks to be a strange power problem with the console. The clock issue was repeatable, based on power source, so I know it should be fixed now. In testing that issue, I couldn't cause the stats read to fail by changing the console power, but based on your description above I was probably switching back and forth and restarting MX too many times in too short a period to trigger the failure.

My Davis Stats page is in place now and PRTG hits that page once per minute (same as my page processing interval) and parses the number of CRC Errors, Missed Packets, Received Packets, and Resyncs from the page. It then logs and graphs them so it will be easy to see if the stats reading fails again as the Received Packets number will flat line.

I'll keep an eye on it once you release the next build.