[RELEASE] Unifi Wifi Presence

@bdydrp not sure have you looked at unfi to see if it is dropping off of the clients list?

@mike10
I haven't as yet. I will take a look.
It's odd. I 1st noticed it with my wife's phone (pixel 3) and thenine of late (note 8)
Both connect to wifi almost instantly of getting home. It just doesn't change presence in HE.
when I'm back after the weekend I'll look into unifi further
Cheers

@mike10 is it really necessary for the parent app to create so many info logs?

Are you on the latest version? Mine's still been rock solid for nearly 2 weeks now

1 Like

Not sure actually. Away for the weekend. So will check everything when I'm back

@frits Are you running the lastest version and do you have debug logging turned off?

I had the same, and just updated to the latest (updated about 9 hours ago, so fast!!!) and it fixed the issue. Thanks @mike10

Just updated. Don't know if something changed. But I'll look at the log for a while to see what happens.
For the rest I really want to say again that I'm very happy with the result and thank you for that.

Any support for UDM-Pro on the horizon?

Having just ordered one a few minutes ago, I'm hoping the same :slight_smile:

Possibly, I dont have a UDM-Pro yet to do development against. Have yall seen any real improvements of using it over the USG?

For me the biggest reason I've wanted it is because it can handle IDS/IPS at a full gigabit. The USG 3 Pro is rated for 80mbit, and the USG 4 Pro is rated for 250mbit. So with any USG, if I were to enable those features it would really throttle my connection.

Sadly I can't get this working on the new UDM Pro :frowning:

I was able to get it working on HA after updating HA Core. So the good news is that it is possible.


@MRobi I tested on a dream machine and the code is working correctly what issues were you having? I have not tested on the UDM-Pro yet but my understanding is they are both running the new software.

Can't get a valid cookie.
In order to connect I need to use port 443, which was the same on HA. I notice some blank lines in the debug log, I'm guessing it has to do with what should be there.

When I did my test on the Dream Machine the mgmt webui interface was on 443 but I accessed the API on the typical 8443. Did you test with 8443?

Yes I had. It gives a connection error.

org.apache.http.conn.HttpHostConnectException: Connect to 192.168.2.1:8443 [/192.168.2.1] failed: Connection refused (Connection refused)

So I installed the app and 'seemingly' got it to connect to UDM-Pro, but the logs appear to be blank.

I've also connected the app to my iPhone as a test and I see where it says my phone is present. This was last night and I went to bed.

This morning I awoke and I noticed the Unifi Device has a status of CookieValid: false <<-- don't know what that means.

I left the house for 20 minutes or so and saw in the logs nothing changed with regards to presence. So, as a test, I turned off wifi on my iPhone and went to the child device and selected 'Update' and no status changed.

In addition, I added my iPad as a 'Child Block Device'. The Device created the child switch and I turned it on.

My iPad is wi-fi only, but I was still able to browse the web with the switch on. Just as in @MRobi post above, the logs are blank so there is nothing to post.

I find that this device will be incredibly useful so if there is anything I can do to assist in testing the device to create presence and block switches for unifi devices, please let me know.

@JDogg016 The CookieValid is a boolean for tracking whether the login cookie is still valid and is authorized to send/get commands to unifi. Once it becomes false it is supposed to login again to get an updated cookie.

Try clicking login and then click check if cookie valid.

I still have not gotten a UDM-Pro yet have had other expenses come up lately. I thought a buddy was going to be getting one but that has not happened yet as well.

Thanks for the reply! So, when I hit ‘Login’ nothing happens. The logs show:

[dev:4225](http://192.168.7.57/logs#dev4225)2020-06-07 09:47:10.844 am [info](http://192.168.7.57/device/edit/4225)groovyx.net.http.ResponseParseException: OK

I will tell you that if you want to make ‘tweaks’ to the driver and have me test I would be more than willing to help you out in this regard.