Created At

Apr 23, 2020

Last Update

May 04, 2020

Platforms

HC 3

Views

933

Download

138

Type Quick App

It is a Quick App to track presence based on the status of the device's MAC address in the UniFi controller. The app emulates a binary sensor. "Unknown" and "Home" correspond to the sensor's status "true", "Away" corresponds to the sensor's status "false".

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 - MAC address of the device that will be tracked (e.g., d4:a3:3d:c2:b9:e4) 

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".
 

5 Comments,  Want to add comment please login
602d0c581d41f736142387ba05c5263f

The "controller" variable must contain the address of the UniFi controller. It is not the protocol and port for HC3.

Dd07e840a077a781662cba8c86fc895d

I don't know were to identify the protocol and port for HC3 and how to add-them after IP address.

Afd335b8543f6152c68755a42c12d2f1

As Fredrik asks.. It would be good to be able to set a delay of x minutes.. so when you go beyond wifi for a few minutes - you don't get an alert.

602d0c581d41f736142387ba05c5263f

Triggered state (1 or true) means that a device is at home (presence is detected). App "decides" that the device is at home if (current time - last seen time) < frequency. So you can increase the value of frequency, and it will be sort of away delay.

3abdb7f587178955118c43ca84bc0c4f

Great app. Is there an option to insert any away delay so it does not trigger all the time

Load more comments