Using Unifi for home states

Posted on
Thu Aug 03, 2017 10:00 am
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Using Unifi for home states

Last night I setup both my wife and I IPhones into a group in unifi and setup the away trigger to change the state of the house away when both leave the AP. I only use one AP since my house isn't to large 2000 SQ feet. But now when my wife walks to the side yard it seems to go away even though she's still on the network. Is there a setting I am missing or should I add a second AP

Posted on
Thu Aug 03, 2017 4:48 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Unifi for home states

Check the expiration times.
Also do you use just the ap or also the gw or switch.
If you use one of these it will use the first one that finds the device to set the parameters.


Sent from my iPhone using Tapatalk

Posted on
Thu Aug 03, 2017 4:50 pm
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Using Unifi for home states

I use a 24 port Unifi Switch and Gateway as well. I assumed because its a iPhone it would go off the AP. I set them to 5 min now it was set to the default setting

Posted on
Thu Aug 03, 2017 5:32 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Using Unifi for home states

the expiration times ( AP, GW, SW) on the unifi devices vary quit a bit. the longest time is the switch or GW = DHCP if you use that.
the AP has the shortest "forget time" .

The plugin offers many options for AP, GW, SW. If it is wifi I suggest to use AP/ optimized option.:
Screen Shot 2017-08-03 at 18.24.29.png
Screen Shot 2017-08-03 at 18.24.29.png (46.53 KiB) Viewed 3380 times


the plugin uses 2 channels to get info:
1. get the unifi database every xx seconds (30-90) from the UG/SW/AP
2. listen to the log files on the unifi devices for any relevant changes.

For wifi the AP-logfile offers the fastest info. When connecting the log file -> indigo plugin sees newly attached device within 0.5-1 secs.
Also when actively detaching (not just leaving range) = switching wifi on on your icon. it goes fast as well. when walking out of range there is no message in the log file. then we need to look at the database

the database info (dict) get requested by the plugin every xx seconds. Then the plugin reads the dict and determines if the device
- is listed at all
- or has changed parameters ( e.g. uptime, idle time ...)
then depending on the settings it determines if the device its still there or not..
Those are the parameters shown in the screen shot. You can also see these states in the device state list.
==> optimized tries to use all info available.


hope that helps

Karl

Posted on
Sat Sep 09, 2017 10:03 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Using Unifi for home states

On a related note, could you explain the difference between the expired and down statuses when detected by the AP?

I have some devices that seem to have been expired for more than a month, and others that shifted to down after a short period of time.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Sep 09, 2017 11:40 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Unifi for home states

up --> down =xx seconds with no signal
down--> expired = xx seconds with no signal

xx = expiration time you can set in config

xx=90 seconds:
down = no signal for >= 90 seconds < 180 seconds
expired = it is gone for >= 180seconds

Karl

Posted on
Sat Sep 09, 2017 12:18 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Using Unifi for home states

So the order of device statuses from on to off the network is UP DOWN EXPIRED?

I had assumed UP EXPIRED DOWN.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Sep 09, 2017 1:40 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Unifi for home states

Up down expired.
And back to up if any signal

Just picked that some years ago in fingscan and have that used in all plugins.


Sent from my iPhone using Tapatalk

Posted on
Tue Sep 12, 2017 11:22 am
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Using Unifi for home states

Hey Karl, I hope this isn't thread-jacking- I'm wondering if your Unifi plugin offers any obvious advantages I'm missing to your fingscan, which I have used for two years and love.


Sent from my iPhone using Tapatalk

Posted on
Tue Sep 12, 2017 11:56 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Unifi for home states

fingscan = my first big plugin , historically from, fully debugged, uses FING to passively and actively scan the network, can add ping to test if device is up. very fast

unifi: get all info from unifi devices to indigo. one of my latest plugins, more mature, likely few bugs. does not actively scan the network.but if you use the switch & Gateway & AP you have it covered.
is better for wifi devices than fingscan

I would say 80% overlap

Posted on
Tue Sep 12, 2017 1:27 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Using Unifi for home states

As for the "likely few bugs" I'm pretty sure I've never seen a single "mission critical" problem from this plugin, which I've been running on just an AP for about a year now. And I've certainly created a few problem of my own with it from failure to understand all of its features!

@kw123, you need referral credit from Unifi, whom I otherwise would never have considered purchasing from!

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Tue Sep 12, 2017 7:17 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Using Unifi for home states

With a few I meant not so many.


Sent from my iPhone using Tapatalk

Posted on
Wed Sep 13, 2017 10:54 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Using Unifi for home states

kw123 wrote:
fingscan = my first big plugin , historically from, fully debugged, uses FING to passively and actively scan the network, can add ping to test if device is up. very fast

unifi: get all info from unifi devices to indigo. one of my latest plugins, more mature, likely few bugs. does not actively scan the network.but if you use the switch & Gateway & AP you have it covered.
is better for wifi devices than fingscan

I would say 80% overlap


Thanks, you the man!


Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests