Andy P Posted December 11, 2023 Posted December 11, 2023 (edited) To save someone a bit of time getting the UnifiPresence node server working for the first time, this is what I discovered when setting it up - some of this is probably obvious but I did waste a lot of time figuring it all out. 1 unifi_host -> UDM / Cloud Key - IP - this one is easy - go to unifi.ui.com or your local controller web page and look under UniFi Devices for the controller - in my case a cloudkey - and copy the ip address - like 192.168.1.7 for example 2 unifi_port -> UDM / Cloud Key - Port - well I wasn't sure if it should be 22, 443 or 8443 and tried them all. Turned out 443 was correct 3 unifi_userid -> UDM / Cloud Key - UserID - i had three choices for this, maybe it would be ubnt, or admin, or a custom id I had set up. Turned out to be the custom id 4 unifi_password -> UDM / Cloud Key - Password - the password that goes with the userid above 5 unifi_siteid -> UDM / Cloud Key - Site (default) - if you have a simple setup, it is just the word default, no parenthesis or anything 6 mac_device -> Provide a comma delimited list of mac address of device to detect presence on the network. (ff:ff:ff:ff:ff:ff,ff:ff:ff:ff:ff:ff) - do NOT put them in parenthesis, no spaces, just a comma in between. You can easily find the mac address of devices in the Unifi console under Client Devices - Overview If you get the first 2 right configuration parameters, you will get just one node with the controller called UnifiCtrl. It will show up with either Status - True or False and will have the address n00x_controller where x is the slot you installed the node server in If you get the rest correct, you will get additional nodes for each mac address you included the configuration. The node name will default to the mac address, but you can freely rename it to something like myphone without any problem. The underlying node name will be something like n00x_xxxxxxxxxxxx based on the slot and macid respectively. This is standard node server behavior. If you look in the admin console device summary table, the controller node with show true or false, but the mac nodes will show blank. That is because the status is not being put into the Status field for the individual devices, it is being put in to the GV1 field. You have to go to the detail of the node and it will show up as Online - True or False. To use this to trigger a program, use a condition that tests Status - Online = True or False for the mac devices or use Status - Status - True or False for the controller. If you are having trouble, use the Polyglot console and turn on Debug level logging to get a better idea of what is failing. Good luck! Andy Edited December 11, 2023 by Andy P 1
MMAltair Posted February 28 Posted February 28 Thanks to Andy P for putting this guide together, it was quite helpful. One additional thing I figured out is that on my cell phone the mac id is randomized by default (I have a Samsung phone). This feature can be disabled in the phone settings, with some loss of privacy, and needs to be disabled for the Unifi Presence plugin to work. I don't know if this is an issue with iPhones. Another thing I did is create a Unifi Controller admin login (I have the Dream Machine Pro so the controller is integrated) specifically for the Presence plugin and gave it "view only" rights and "Local Network only" connection capability. No point in giving it more access than is required for the job. Mike 1
Recommended Posts