Overview

Within this thread you will find the necessary steps to build a Counter/Timer function into your Kramer Control project. This thread includes an example scenario and the steps necessary to configure such a scenario within your project.

Process

  1. Launch Builder
  2. Import Kramer Counter Device

NOTE If you have a need for Multiple Counters for varying use cases, you will need to import a Kramer Counter device for each separate Counter

The image below shows the Commands available for the Counter

Example

Here is the scenario. You have a Motion Sensor, when the Motion Sensor is On the Room is in use. If the Motion Sensor is Off for 15 minutes without being tripped again, you want to execute a Room Off macro. In order to create such a setup in Kramer Control follow the steps below

Create Custom State entitled Timer

The purpose of the this Custom State is to create a Boolean that will inform the Brain whether or not to begin the Counting process

Create Sensor Event

This event tracks the State of the Sensor and upon a State change will start/stop the Counter

Within the Actions of the Sensor Event you will create a Conditional Statement tracking the State of the Sensor.

This Conditional tracks the On and Off status of the Sensor. You can see within the above image we are toggling the Boolean state of the Timer based on the State of the sensor.

Create Counter Event

This event uses the Interval trigger based on an amount of time

The next step is to select your Interval amount. NOTE You can select hour, minute or second. The most accurate result based on the Sensor would be seconds. If you track by the minute, you could have events occur at incorrect intervals due to the variance in seconds between minutes.

Next you will need to create two conditionals within your Interval event. The First conditional starts the increment counter IF the timer is set to On and the Second conditional executes your macro/resets the counter/turns the timer off IF the timer reaches the assigned value.

NOTE The above example uses seconds to track the 15 minute timer of the example. If you were to use 15 minutes and change the interval time to 1 minute instead of seconds like the above example, the Count = value would be 15.

Gateway Setup

The Kramer Counter device will require a gateway for the functions above to work. Create a Network gateway with an IP address of 0.0.0.0 and drag/drop the device to this newly created gateway

Revision: 7
Last modified: Oct 18, 2022

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment

Kramer Support wrote: Oct 18, 2022

Added a new version to this article to include the gateway setup


John Gallagher wrote: Oct 7, 2022

One crucial bit of instruction is missing. "Kramer Counter Devices" are virtual devices that have to be added to your project in the hardware section as a "network gateway" and given the IP address of 0.0.0.0. If you don't do this, your counter will never work.


iRule wrote: Feb 2, 2018

You could edit the driver to change the possible values. However, are you mapping the counter value to a specific device? You could alter the device being controlled to support the volume range you require as well.


matt wrote: Feb 1, 2018

Is it possible to adjust the range that a counter can operate?
For example, I'm trying to make a volume control and need to control a range between 0 and -100
or possibly +20 to -80 or so. Is this possible, or is there any other way to adjust numbers in custom states that I haven't found yet?