[RELEASE] Unifi Wifi Presence

@mike That is not the correct table. It should be below that called " Scheduled Jobs" if that table is not there can you click the initialize button? That should get the job scheduled.

Yes, the scheduled job is there where it should be.

I was just noticing in the highlighted location that it was empty.....that in most other devices that spot is filled in

@mike not sure why that spot is blank, several of my devices are blank there too.

I have tried rebooting HE and Unifi at the same time and it always start working after about 10 minutes on the scheduled check for the cookie to be valid. Not really sure whats going on for you.

Have you tried scheduling the hub reboot instead of doing a manual reboot? I can't see it making a difference, but I have my reboot scheduled and once I get it working after reboot it stops. And I do have the scheduled job showing to check for the cookie.

I've been doing a bit of testing, and it appears the issue is not with the parent device loging in, but instead with the child devices.

After a reboot, there are no scheduled jobs for the child device.

Saving the preferences again, which in my case is set to 60s rechecks, the update job gets scheduled and everything works again until the next scheduled reboot.

1 Like

What do you run the controller on?

I'm running a cloud key. I used to run controller through a freenas jail but had a spare cloud key laying around so figured I'd use it.

@MRobi. Currently out of town but will definitely take a look. Thanks

@MRobi Think I see the error, I have updated github if you can check I wont be able to test for a few days.

1 Like

I just pulled in the update. I'll let you know if it survives the overnight reboot.

1 Like

That fix seems to have done it. Reboot happened overnight. Scheduled task is there this AM. Without updating or saving preferences I toggled my WiFi and it switched present/not present.

1 Like

Got things installed and configured last night - my simple test rule worked flawlessly! Is there any issue setting the update time down to something quicker? Maybe running once a minute? I don't want to bog down my hub!

@jasazick. It really depends on the load of your hub. Mine is a little loaded so I keep the checks down and I don't have automations currently than need that granularity as well. There is nothing really wrong with doing it every minute if your circumstances are different.

1 Like

I'm running 2 child's every 1 sec. Don't see any slowness yet.

@mike10 great app! Thank you for sharing. This really helps getting the presence more reliable.

2 Likes

I have this set up but no matter what MAC I add to check for presence, it says that the device is PRESENT even if it is not. I even did this with a random MAC address and it still says present.

Also, under Current States for the parent driver, I see: [Cookie Valid: false] and nothing else below it. Screenshot: Image 2020-02-17 at 10.25.0... and Image 2020-02-17 at 10.25.3...

Any ideas?

Under IP address you have the link to your dashboard. You should just have the IP address only.
Edit that and be sure to click Login.

Also, you've just posted your username and password to your network controller for the world to see.... I'd remove your screenshot and recommend changing your login credentials as a precaution.

Thanks, I updated to just the IP only and clicked login again. Now every device says not present even when they are on the network. CookieValid still says False.

When I check the logs after removing the longer URL to the dashboard, I see errors like this which were not occurring before: Image 2020-02-18 at 7.34.16 AM

I am running Unifi on a UDM-Pro using their latest UnifiOS V1.64. I wonder if this might be creating issues?

Anything else I can try?

That might be creating issues. I've heard the UDM-Pro is on the new Unifi-OS

Yeah, I removed everything and re-added and I am stuck at getting the driver to successfully connect with the UDM-Pro. However, it is odd to me that when I include the full dashboard URL and click LOGIN, the logs say "OK" instead of "Connection Refused"

Maybe the driver needs to be updated.

Yeah I dont have a UDM-Pro to test against yet.