Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Lightning Webtags

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
Big Daddy
Posts: 270
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1000 / various sensors
Operating System: Raspbian 12 Bookworm (X64)
Location: Freiston, Lincolnshire, UK
Contact:

Lightning Webtags

Post by Big Daddy »

Please can you clarify the <#LightningTime> webtag.

According to the wiki it returns "Date and Time of last strike (format customisable)" but on the release notes for 3.2.0-b3056 it states "returns Time of last strike (format customisable)"

There was then this discussion viewtopic.php?f=40&t=18088&p=142559&hil ... ng#p142559

I remember the default lightning distance was changed in V3.6.1b3077 - "Changes GW1000 default Lightning distance to 999 (all user units), and time to 1900-01-01 00:00:00
The corresponding Webtags will output "--" and "---" respectively"

I process an additional file which contains the webtags below and I have have captured the returned values today as we have had some lightning. The <#LightningTime> only appears to return the time but I just wanted to clarify if Time was correct or if Date and Time is correct but not working correctly

<#LightningDistance> - 21.1
<#LightningStrikesToday> - 11
<#LightningTime format "HH:mm"> - 18:02
<#LightningTime format "d"> - 18:02
<#date format "d"> - 26/06/2020
<#LightningTime> - 18:02

Thanks in advance

Andy
Mapantz
Posts: 1992
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Lightning Webtags

Post by Mapantz »

Big Daddy wrote: Fri 26 Jun 2020 8:35 pm The <#LightningTime> only appears to return the time

Code: Select all

$lightningtime = "<#LightningTime format="HH:mm - dd/MM/yyyy">";
Image
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 Webtags

Post by sfws »

I think you need to learn the basics of how to add output parameters to web tags. Seems like you have not read the key parts of that wiki article.
Big Daddy wrote: Fri 26 Jun 2020 8:35 pm <#LightningTime format "HH:mm"> - 18:02
<#LightningTime format "d"> - 18:02
<#date format "d"> - 26/06/2020
All 3 lack a equals sign (<#tag_name format="....">)
so all 3 ignore what you write in quotes.

Please correct those tags and then see what they produce, and let me know if Wiki is correct/incorrect for that web tag.

In web_tags_realtimeT.cum it has

Code: Select all

	$LightningTime              = '<#LightningTime>'; //  Time of last Lightning strike
	$LightningTime              = '<#LightningTime format="h:mm:ss tt">'; //  Time of last Lightning strike am/pm
	$LightningTime              = '<#LightningTime format="yyyy-MM-dd HH:mm:ss">'; //  Date and Time of last Lightning strike
but because I don't have relevant instrumentation I only see the dashed output your cross-referenced topic refers and cannot verify with a record for any actual strike. Mind you, both Lincolnshire and Dorset grab all the lightning and don't let it get anywhere near me!
Big Daddy
Posts: 270
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1000 / various sensors
Operating System: Raspbian 12 Bookworm (X64)
Location: Freiston, Lincolnshire, UK
Contact:

Re: Lightning Webtags

Post by Big Daddy »

Thanks sfws, my error.

I did read the wiki article, several times, on how to get the correct format for my output but neglected to put the = sign as you pointed out. I have formatted outputs before no problem, so minor memory loss on my part.

Appreciate all responses.

Andy
Big Daddy
Posts: 270
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1000 / various sensors
Operating System: Raspbian 12 Bookworm (X64)
Location: Freiston, Lincolnshire, UK
Contact:

Re: Lightning Webtags

Post by Big Daddy »

All good now :bash: :bash: :bash:
Post Reply