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

SQL Lightning

GW1000 WiFi gateway
Post Reply
Mapantz
Posts: 1820
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 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: 12766
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye 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