Created At

Apr 27, 2020

Last Update

May 04, 2020

Platforms

HC 3

Views

288

Download

44

Type Quick App

It is a Quick App to track presence based on the status of multiple MAC addresses in the UniFi controller. The app emulates a multilevel sensor. Each MAC address is represented by a dedicated bit. The first MAC address corresponds to bit 0, the second MAC address corresponds to bit 1, and so on and so forth. E.g., if the app is configured to track presence of d4:a3:3d:c2:b9:e4, 18:f1:d8:e8:1d:50 and 00:b3:62:b8:8f:cb, then sensor value means following:

0 all configured addresses are not detected
1 only presence of d4:a3:3d:c2:b9:e4 is detected
2 only presence of 18:f1:d8:e8:1d:50 is detected
3 presence of d4:a3:3d:c2:b9:e4 and 18:f1:d8:e8:1d:50 is detected
4 only presence of 00:b3:62:b8:8f:cb is detected
5 presence of d4:a3:3d:c2:b9:e4 and 00:b3:62:b8:8f:cb is detected
6 presence of 18:f1:d8:e8:1d:50 and 00:b3:62:b8:8f:cb is detected
7 all configured addresses are detected

 The following variables are mandatory:

  1. controller - address of controller including protocol and port (e.g., https://192.168.1.10:8443/)
  2. site - name of the site defined in controller and where MAC address will be searched (e.g., default)
  3. login - username to log into the controller. I recommend creating a dedicated user with read-only access to the controller (e.g., fibaro)
  4. password - self-explanatory
  5. frequency - how often to poll controller (in seconds, e.g., 120)
  6. mac list - comma-separated list of MAC addresses that will be tracked (e.g., d4:a3:3d:c2:b9:e4,18:f1:d8:e8:1d:50,00:b3:62:b8:8f:cb). Note: the list must include MAC addresses and commas only, no tab or space characters.

 The following variables are optional:

  1. away delay - the app changes status for MAC address from "presence detected" to "presence not detected" if the UniFi controller "sees" the mac more than "away delay" seconds ago. If the variable is not defined, then the value of "frequency" is used as "away delay".

0 Comments,  Want to add comment please login
Load more comments