Created At

Apr 27, 2020

Last Update

May 04, 2020

Platforms

HC 3 Lite, Z-box Hub, Yubii Home Pro, Yubii Home, Venture WISE, HC 3

Views

5180

Download

525

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

19 Comments,  Want to add comment please login
F6a0bd290b31a0a4aa585db4dacc8804

Could this also work for Ampfili HD ?

Caf45ba5a1a0b10aac6914314c52dbc9

I have 5mac's from mobile devices I want to track. Is there a seperate bit for each "possible" scenario? If so, what is the right order to match the bit with the right combination of present mac's? 0 - none present 1 - mac1 present 2 - mac2 present 3 - mac1 and mac2 present 4 - mac3 present 5 - mac1 and mac3 present 6 - mac2 and mac3 present 7 - mac1 and mac2 and mac3 present 8 - mac4 etc

1448a287043ae159e17917fc7243dee6

Yeah Brent! You fix login for sure, great job, but after fixing one issue I get other, didn't see MAC addresses. :( @Oleksiy Geroyam Slava! We will win!

24c984518dbbe7d8a9f5dca138d263cf

Got this to work on UDM Pro: Change the Variable Controller to : https://[udmp]:443 replacing [] with your ipadddress In the code change "EDIT" self.http:request(self.controller .. "/proxy/network/api/auth/login", {

602d0c581d41f736142387ba05c5263f

Hi everyone, I'm from Kyiv, Ukraine. There's a war, so I'm focused on other critical tasks and can't provide any support now. Slava Ukraini!

© 2024. Nice-Polska Sp. z o.o.Privacy policyTerms & ConditionsFeedback