What's the difference between a 'timer' and 'number' in ElkRP?

electron

Administrator
Staff member
What's the difference between a 'timer' and 'number' based custom values in ElkRP? It looks like both have the same limitations, and seem to function exactly the same.
 
What's the difference between a 'timer' and 'number' based custom values in ElkRP? It looks like both have the same limitations, and seem to function exactly the same.

Somewhere (pretty sure here on Cocoontech) somebody once mentioned that they are all stored as numbers anyway, regardless of the format. It turns out that a time-of-day (TOD) setting results in a number that is (hours * 256) + minutes.

In the rules, as you point out, you can compare a counter with a TOD setting, or a TOD with a number. Which is to say, you are not prevented from doing so, even though it would not make a lot of sense.

I had supposed that the main difference is one of practical usability when you set these values from the keypad. TOD Custom Settings are visually formatted as hh:mm, while timers and numbers are formatted as numeric values, and there is a helpful reminder "sec" that appears for timer value units.

So if you want your sprinkler to come on at 04:00, you define the Sprinkler On setting as type 2, so you can just enter that time, which is better than having to deal with time=1024.
 
Lagerhead is right.

Number is a numeric value to use in a Rule.

Timer is the number of seconds to use in a Rule like a user changeable custom value which turns on the sprinkler for 600 seconds.

Time of Day is expressing the Timer value as Hours, minutes to be used in a Rule like turn on the lights at a Custom Value expressed in hours and minutes.


The idea of Custom Values is to be able to write Rules and change value settings in the Rules from the keypad without having to crankup ELKRP.
 
Back
Top