define <name> HourCounter <pattern_for_ON> [<pattern_for_OFF>]
Hourcounter can detect both the activiy-time and the inactivity-time of a property.
The "pattern_for_ON" identifies the events, that signal the activity of the desired property.
The "pattern_for_OFF" identifies the events, that signal the inactivity of the desired property.
If "pattern_for_OFF" is not defined, any matching event of "patter_for_ON" will be counted.
Otherwise only the rising edges of "pattern_for_ON" will be counted.
This means a "pattern_for_OFF"-event must be detected before a "pattern_for_ON"-event is accepted.
"pattern_for_ON" and "pattern_for_OFF" must be formed using the following structure:
device:[regexp]
The forming-rules are the same as for the notify-command.
Example:
define BurnerCounter HourCounter SHUTTER_TEST:on SHUTTER_TEST:off
set <name> calc
starts the calculation of pulse/pause-time.
set <name> clear
clears the readings countsPerDay, countsOverall,pauseTimeIncrement, pauseTimePerDay, pauseTimeOverall,
pulseTimeIncrement, pulseTimePerDay, pulseTimeOverall by setting to 0.
The reading clearDate is set to the current Date/Time.
set <name> countsOverall <value>
Sets the reading countsOverall to the given value.This is the total-counter.
set <name> countsPerDay <value>
Sets the reading countsPerDay to the given value. This reading will automatically be set to 0, after change
of day.
set <name> pauseTimeIncrement <value>
Sets the reading pauseTimeIncrement to the given value.
This reading in seconds is automatically set after a rising edge.
set <name> pauseTimeEdge <value>
Sets the reading pauseTimeEdge to the given value.
This reading in seconds is automatically set after a rising edge.
set <name> pauseTimeOverall <value>
Sets the reading pauseTimeOverall to the given value.
This reading in seconds is automatically adjusted after a change of pauseTimeIncrement.
set <name> pauseTimePerDay <value>
Sets the reading pauseTimePerDay to the given value.
This reading in seconds is automatically adjusted after a change of pauseTimeIncrement and set to 0 after
change of day.
set <name> pulseTimeIncrement <value>
Sets the reading pulseTimeIncrement to the given value.
This reading in seconds is automatically set after a falling edge of the property.
set <name> pulseTimeEdge <value>
Sets the reading pulseTimeEdge to the given value.
This reading in seconds is automatically set after a rising edge.
set <name> pulseTimeOverall <value>
Sets the reading pulseTimeOverall to the given value.
This reading in seconds is automatically adjusted after a change of pulseTimeIncrement.
set <name> pulseTimePerDay <value>
Sets the reading pulseTimePerDay to the given value.
This reading in seconds is automatically adjusted after a change of pulseTimeIncrement and set to 0 after
change of day.
set <name> forceHourChange
This modifies the reading tickHour, which is automatically modified after change of hour.
set <name> forceDayChange
This modifies the reading tickDay, which is automatically modified after change of day.
set <name> forceWeekChange
This modifies the reading tickWeek, which is automatically modified after change of week.
set <name> forceMonthChange
This modifies the reading tickMonth, which is automatically modified after change of month.
set <name> forceYearChange
This modifies the reading tickYear, which is automatically modified after change of year.
set <name> app.* <value>
Any reading with the leading term "app", can be modified.
This can be useful for user-readings.