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
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
NewRecord webtag showing "" instead of "0"
Moderator: mcrossley
-
maxfieldg
- Posts: 10
- Joined: Wed 20 Mar 2019 12:36 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 11 Pro 23H2
- Location: Perth, Western Australia
- Contact:
NewRecord webtag showing "" instead of "0"
Running version/build 3.22.2 (3213) and the NewRecord webtag is showing "" instead of "0" when no record has been set. I was testing for "0" and had to change my code to compensate for this value. Is it a bug? Or a new feature?
Last edited by maxfieldg on Sat 22 Oct 2022 10:10 am, edited 1 time in total.
-
water01
- Posts: 3670
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10/11 64bit Synology NAS
- Location: Burnham-on-Sea
- Contact:
Re: NewRecord webtag showing "" instead of "0"
Are you sure about that. I just ran an update of my PHP webtags and it is definitely set to zero.
What build of MX are you running?
Code: Select all
$newrecord = "0"; // value of 1 if the 'new record' light is flashing, 0 if not -
maxfieldg
- Posts: 10
- Joined: Wed 20 Mar 2019 12:36 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 11 Pro 23H2
- Location: Perth, Western Australia
- Contact:
Re: NewRecord webtag showing "" instead of "0"
Version 3.22.2 build 3213, as mentioned in my original post. Definitely sure, it's always worked in previous builds
-
water01
- Posts: 3670
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10/11 64bit Synology NAS
- Location: Burnham-on-Sea
- Contact:
Re: NewRecord webtag showing "" instead of "0"
Sorry missed the Build data.
Just ran it again and mine on the same build and it is definitely zero.
Just ran it again and mine on the same build and it is definitely zero.
Code: Select all
$build = "3213"; // build of Cumulus in use
$timelong = "11:13 on October 22, 2022"; // current time (example format: 12:34 on January 01, 2011)
$newrecord = "0"; // value of 1 if the 'new record' light is flashing, 0 if not -
maxfieldg
- Posts: 10
- Joined: Wed 20 Mar 2019 12:36 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 11 Pro 23H2
- Location: Perth, Western Australia
- Contact:
Re: NewRecord webtag showing "" instead of "0"
This is the section of my code that tests for new records.
<script type="text/javascript">
var NewRecord = "<#NewRecord>";
var TempRecord = "<#TempRecordSet>";
var WindRecord = "<#WindRecordSet>";
var RainRecord = "<#RainRecordSet>";
var HumidRecord = "<#HumidityRecordSet>";
var PressureRecord = "<#PressureRecordSet>";
if (NewRecord != "1") {
document.write("No");
} else {
document.write("Yes ");
if (TempRecord == "1") {
document.write("(Temperature)");
}
if (WindRecord == "1") {
document.write("(Wind)");
}
if (RainRecord == "1") {
document.write("(Rain)");
}
if (HumidRecord == "1") {
document.write("(Humidity)");
}
if (PressureRecord == "1") {
document.write("(Pressure)");
}
}
</script>
and this is the result from the webpage. As you can see the problem is worse, the RainRecordSet webtag is set to "1", but the NewRecord webtag is still set to "", so there is no way I can test for a record without testing all the other webtags individually.
<script type="text/javascript">
var NewRecord = "";
var TempRecord = "0";
var WindRecord = "0";
var RainRecord = "1";
var HumidRecord = "0";
var PressureRecord = "0";
if (NewRecord != "1") {
document.write("No");
} else {
document.write("Yes ");
if (TempRecord == "1") {
document.write("(Temperature)");
}
if (WindRecord == "1") {
document.write("(Wind)");
}
if (RainRecord == "1") {
document.write("(Rain)");
}
if (HumidRecord == "1") {
document.write("(Humidity)");
}
if (PressureRecord == "1") {
document.write("(Pressure)");
}
}
</script>
<script type="text/javascript">
var NewRecord = "<#NewRecord>";
var TempRecord = "<#TempRecordSet>";
var WindRecord = "<#WindRecordSet>";
var RainRecord = "<#RainRecordSet>";
var HumidRecord = "<#HumidityRecordSet>";
var PressureRecord = "<#PressureRecordSet>";
if (NewRecord != "1") {
document.write("No");
} else {
document.write("Yes ");
if (TempRecord == "1") {
document.write("(Temperature)");
}
if (WindRecord == "1") {
document.write("(Wind)");
}
if (RainRecord == "1") {
document.write("(Rain)");
}
if (HumidRecord == "1") {
document.write("(Humidity)");
}
if (PressureRecord == "1") {
document.write("(Pressure)");
}
}
</script>
and this is the result from the webpage. As you can see the problem is worse, the RainRecordSet webtag is set to "1", but the NewRecord webtag is still set to "", so there is no way I can test for a record without testing all the other webtags individually.
<script type="text/javascript">
var NewRecord = "";
var TempRecord = "0";
var WindRecord = "0";
var RainRecord = "1";
var HumidRecord = "0";
var PressureRecord = "0";
if (NewRecord != "1") {
document.write("No");
} else {
document.write("Yes ");
if (TempRecord == "1") {
document.write("(Temperature)");
}
if (WindRecord == "1") {
document.write("(Wind)");
}
if (RainRecord == "1") {
document.write("(Rain)");
}
if (HumidRecord == "1") {
document.write("(Humidity)");
}
if (PressureRecord == "1") {
document.write("(Pressure)");
}
}
</script>
-
maxfieldg
- Posts: 10
- Joined: Wed 20 Mar 2019 12:36 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 11 Pro 23H2
- Location: Perth, Western Australia
- Contact:
Re: NewRecord webtag showing "" instead of "0"
Aaargh! It is case-sensitive, I had #NewRecord instead of #newrecord. Just changed it and it is now working. Cannot work out how it worked before, I'm sure it's been that for years....who knew?
-
water01
- Posts: 3670
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10/11 64bit Synology NAS
- Location: Burnham-on-Sea
- Contact:
Re: NewRecord webtag showing "" instead of "0"
I was just about to say that, well at least you got there!!
