Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.8.4 (build 3094) - 14 September 2020 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

SQL Lightning

GW1000 WiFi gateway
Post Reply
Mapantz
Posts: 790
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64
Location: Dorset - UK
Contact:

SQL Lightning

Post by Mapantz »

Hi Mark - Busy one today.. :)

The Ecowitt lightning detector is working an absolute treat today - picked up 12 strikes this afternoon.

I'm just in the middle if trying to generate a graph. I'm half way there with it.. As you know, I have a second instance of CMX running specifically for the GW1000 - all is good with that.

I've sort of come across a small problem.

I used the custom upload of 1 minute to go in to the 'Realtime' table, as follows:

Code: Select all

INSERT IGNORE INTO Realtime (LogDateTime,LightningDistance,StrikesToday) VALUES ('<#date format=yyyy-MM-dd> <#time format=HH:mm:ss>',<#LightningDistance>,<#LightningStrikesToday>)
It goes in absolutely fine and I can call the data OK. I then realised, that table is going to fill extremely quickly at 1 min intervals, so I would have preferred it to be a maximum of 24 hours - AKA, A retention string of '24HOUR' but that's not possible on the custom SQL command, only on the Realtime one. If I set the Realtime one as well, I get two lines being added to the table, one with the lighting data and no other station data, and one with all of the other station data and no lightning. The result is a funny looking graph.

Help! :lol: :oops:
Image

User avatar
mcrossley
Posts: 6922
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: SQL Lightning

Post by mcrossley »

I think you are going to have to create a new table for the lightning data.

Depending on the SQL queries you use, you may have to join the tables if you want combined data. Or create a View to join them and just query that instead of the original realtime table.

Post Reply