Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Lightning Detector Test

GW1000 WiFi gateway
Post Reply
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Lightning Detector Test

Post by Big Daddy »

Looking forward to some heavy lightning testing on Friday evening. WH57 hasnt really been given any stress testing since I got it even though there has been a little bit of lightning in the distance at the beginning of the month. If Windy.com have it right then it should be good fun.

Friday Lightning.jpg
You do not have the required permissions to view the files attached to this post.
Mapantz
Posts: 1808
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Lightning Detector Test

Post by Mapantz »

I wouldn't trust those 'blanket' charts. The UKV model shows very scattered showers with mediocre pockets of CAPE.

A rumble of thunder or two possibly embedded in the heaviest showers, but I wouldn't expect any 'heavy' testing for your sensor.
viewimage.png
You do not have the required permissions to view the files attached to this post.
Image
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Lightning Detector Test

Post by Big Daddy »

I bow to your better judgement and expertise. :lol:

Wind, rain, hail, stormy bluey/grey clouds this afternoon, sudden drops in temperature, wobbling pressure, frequent wind speed changes. The only thing missing was a rumble of thunder and a flash of lightning.

7.1 degrees at midday at the beginning of June. Thought I had somehow been transported to the Southern Hemisphere.

There's always be another day.
Mapantz
Posts: 1808
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Lightning Detector Test

Post by Mapantz »

It looks like you had a better day today?
Annotation 2020-06-06 163620.png
Total Totals a good indicator of today's action.
viewimage.png
You do not have the required permissions to view the files attached to this post.
Image
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Lightning Detector Test

Post by Big Daddy »

Yes, much better.
So far have recorded 26 strikes within 40km with the nearest being 6Km away.

Just need some way of tracking that and displaying.

Would be nice to be able to track it in Cumulus like other mesurement, daily monthly alltime etc and have a graph. (Not a very subtle hint, sorry :lol: )
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Lightning Detector Test

Post by sfws »

Big Daddy wrote: Sat 06 Jun 2020 4:59 pm Would be nice to be able to track it in Cumulus like other measurement, daily monthly all-time etc and have a graph.
Sounds to me as if you are just specifying your next project. Realistically, bug-fixing and keeping up with weather station evolution is going to be the priority for MX updates for several months yet I expect. That is partly why I am planing to donate a fully coded add-on to MX as soon as enough people have tested it for me to be sure it suits Cumulus users (I already know it works).

As I said in answer to an earlier query from you, you could add another column for lightning to the database table that (if my memory is working) you said you had set up ready for learning SQL.

The automatic update query from MX specifies which columns it updates, so it will ignore any extra column. When you have taught yourself enough SQL, you will be able to update the database table with your lightning data, and then write queries to find month with most and month with fewest strikes. As SQL goes, such update and read queries are very simple, of course SQL is very powerful and can do very much more complex actions.

My memory (if it is still working) also tells me that somewhere in this forum, Mark suggested to mapantz that she set up a separate table just for lightning (mainly because the interval between each record for lightning, might be different to the timing of rows in a standard MX table). I have no idea if that was followed up, but that is an alternative for you to experiment with.
I'm not suggesting you seek help from anyone else using lightning detectors, few people would want to give away their own code for setting up such a system.
Mapantz
Posts: 1808
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Lightning Detector Test

Post by Mapantz »

The only graph I have set up is one to shows the cumulative daily strikes per day - that's easy.

I tried a realtime graph plotting distance and strikes, but I ran in to a problem..

lightningtime for instance, will always have a value. ie if you haven't had a strike for 6 months, it will keep plotting a graph showing the same value for 6 months. The same problem happens with strike distance.. if the last distance was say, 15 miles, you'll still have a graph plotting a value of 15 miles since the time of the last strike.

You'd need some fancy code to workaround that, unfortunately, that's well above my pay grade. :lol:

See sfws post :mrgreen:
Image
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Lightning Detector Test

Post by Big Daddy »

Many Thanks. No memory failures. :D

Idid see the post regarding the graphs and also do have my SQL set up as we talked about before but I havent really progressed too much with it yet. Getting a bit distracted with other bits and pieces. I will get round to it soon.

Andy
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Lightning Detector Test

Post by sfws »

Mapantz wrote: Sat 06 Jun 2020 6:03 pm You'd need some fancy code to workaround that, unfortunately, that's well above my pay grade.
I suspect it is as simple as adding some code to store values and a conditional to compare new values against stored values. It is a simple, but frequently used technique. Cumulus code is full of it, that is how the extreme records are updated and the alarms are triggered.

Your difficulty sounds very like the discussion in another topic about Cumulus not giving the correct latest wind gust updates. Mathematically, what was wanted was a rolling gust value, still calculated over 10 minutes, but actually being updated as the individual minutes progressed, instead of waiting until the previous 10 minutes had ended. The problem in that case was that the gust value reported by Cumulus stays the same for ten minutes, before the next update of it, even if the wind has died down or the wind speed has increased above the gust still being reported.The solution selected in that case was to compare the current gust value coming in with the previous gust value. If the current gust value is the same, discard the current gust value and use the latest wind speed instead if that is higher, until next time the gust value changes when you use that. You can look up viewtopic.php?f=11&t=17844 topic to read more.

In your case, presumably you could write some code to set both lightning time and distance back to null if the record you are reading in for next graph plotting point has not produced different values to the previous read for lightning time/distance. Use of a null should create a gap in your graph avoiding that flat lining.
If you prefer to use zero rather than null then the graph should go down steeply, try that too to see whichever works best for you in your graph.

In a very very much earlier topic, somewhere on this forum, somebody was asking Steve Loft to change the standard (monthly) log to record maximum and minimum since last the last line on the log, so you did not miss any extremes that Cumulus read in-between it writing to the log. I still think that was a good idea, and it is a pity it was never implemented. It would reduce the number of uploads by still getting same information to a web site as is currently available in real-time, for the cost of sometimes having to wait longer for an update.


With reference to my recent project on data log editor, the software that Mark uses provides an event when a value in a field changes. I use that event, but there were two clever tricks needed to make it work. These might well be "above your grade"! It was new to me, but certainly possible. I wanted to monitor changes in three fields, so I had to use an anonymous function for the event in all 3 fields. Trick one was to have empty functions in the first two fields, they needed the function to be declared for that field to be monitored; but all my handling code had to be in the last declaration, as that in effect overwrote any event handling in the same anonymous function included in previous two declarations. Trick 2 was to ignore the first 3 calls to the function, they related to when the original values were added to the screen, I was only interested when the Cumulus user actually edited one of the three fields, so my action is only triggered on 4th, and subsequent, calls detecting which item was edited to decide what parts of my enhancement had to be modified from what I had originally output.

That boasting won't make much sense unless you sign up to be a tester and see what my enhancement is!
Mapantz
Posts: 1808
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Lightning Detector Test

Post by Mapantz »

I rehomed my lightning detector a few months ago, so it has the best possible chance at picking up lightning without obstruction. It seems to have worked! I mounted it in the same place as my solar sensor - around 10ft.

I also managed to fudge a little code so that if lightning has been recorded within an hour, the 'Lightning' header on my site flashes yellow. Seems to work ok! The only downside is that the page needs to be refreshed for it to flash.

It would be good to get it flashing without a page refresh, a bit like the smb_ajax.js, but I wouldn't know how to do that. :)
Image
Mapantz
Posts: 1808
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Lightning Detector Test

Post by Mapantz »

Lightning detected again.. my snippet seems to be working on my website. :clap:
Image
Post Reply