info_i_25x25.png See important information about Ubiquiti Devices and KRACK Vulnerability in this article. We will update this document as more information becomes available.

Custom Sensor - Counter

Here's an example of a counter.  We are using it as a people counter.  All the features of other sensors might not be supported (can't set a rule based on when the total number of people crosses a threshold), but it still might be useful for some purposes.

This example is a "people counter", counting how many people walk through a common area in our offices.  It uses a long range infrared beam detector, but other detectors could easily be used.

 

The mPorts connections are:

1) power (P)

2) ground (G)

3) output (O or O1): to the sensors relay

4) input (I or I1): from the sensor relay

 

custom.json definition:

   "Infrared Beam" : {

       "desc" : "Infrared Beam Detector",

       "digital" : true,

       "binary" : true,

       "rj45_v1" : true,

       "tblock_v1" : true,

       "pwr_volt" : 24,

       "do_volt0" : 24,

       "rep_input0" : 1,

       "input_tag0" : "beam",

       "rep_counter_rate0": 1,

       "rep_counter0": 1,

       "counter_rate_tag0": "people/sec",

       "counter_tag0": "people",

       "default_tag" : "beam",

       "unit0" : "unbroken/broken",

       "inversion0" : true,

       "rep_counter" : 0

   }