Page 1 of 1

Low Temp Alarm

Posted: Tue 31 Jul 2012 3:12 am
by krmidas
I put this in as an enhancement request, but thought it might also be worth discussing here, since my solution may not require a new web tag.

I thought it would be helpful to introduce a web tag for when the temperature is below freezing: <#isfreezing> that would return a 1 if it was below 32F and 0 if it was above freezing. This way I could switch out precipitation icons to show frozen precip instead of rain during cold weather.

But then I thought you might be able to do the same thing with the <#lowtempalarm> tag, by simply setting it to 32F.


Having never used the alarms, here's my question: do the alarm states stay in the "1" state as long as the temperature remains under freezing? Or does the alarm become "de-activated" the way the error light and new record lights do when you click on them in the software?

-Tom

Re: Low Temp Alarm

Posted: Tue 31 Jul 2012 7:34 am
by steve
Here's my reply to the enhancement request:

Yes, it's easy enough to add. Presumably you want to use it in HTML to select between two images? If you want to use it in a scripting language such as Javascript or PHP, then it's just as easy for the script to use the outside temperature value.

The <#lowtempalarm> tag is described in the help; It gives 1 if the alarm is set and the condition is currently met, otherwise zero.

Re: Low Temp Alarm

Posted: Tue 31 Jul 2012 12:05 pm
by krmidas
So does <#lowtempalarm> essentially work the same way as <#isfreezing> if I set the alarm to 32F? In other words, if we're having a cold spell, it would just stay in the "1" state during the freezing period? I wanted to make sure it didn't work like "new record", where once you click on the record, the new record light shuts off until another record is set.

Thx.

Re: Low Temp Alarm

Posted: Tue 31 Jul 2012 12:39 pm
by steve
krmidas wrote:I wanted to make sure it didn't work like "new record", where once you click on the record, the new record light shuts off until another record is set.
Effectively, it does work that way; if you clicked on the temp label to cancel the alarm, the value would briefly revert to 0. But if the temperature was still below the threshold, the alarm would trigger again on the next data read, which in the case of a Davis station would be some time in the next 2 to 3 seconds.