uniFi WiFi AP: download

Posted on
Mon Jun 13, 2016 11:32 am
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 0.8.6

fixed
- timing of reconnect and connect to the AP was not done properly ( too often)
- For the APa we don't do a login to test if the device is up, but the AP will send an alive messages every time it reads the DICT via the log file listener. This will also make sure that the log file rotation (hen a log file is to big a new log file gets started and the tool tail -f does not work with renamed files (( tail -F is not available on the APs)) )
- Some error debugging itself had problems


added
if you change a parameter (in config) that requires a restart the plugin will do that automatically now. This is required to reset / set the threads that listen to the AP GW messages properly. Doing that inside the plugin is a bit of programming.

Karl

Posted on
Tue Jun 21, 2016 7:46 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

uniFi WiFi AP: download

posted new version: v 1.0.8


added:
support forONE unify SWITCH. 8 .. 48 ports are supported. Currently only one SWITCH device is supported. :?: If someone wants to send me a 8/16 port switch I would be happy to add support for multiple switches :?: . I am currently running ONE 24 port switch and several other simple netgear switches at the local outlets.

Various states have been added to the devices and up/down/expired states can be setup to listen to Wifi/ switch/ dhcp information:
1. fast Down: listens to the system messages when devices attach or disconnect, fasts way to detect up/down for Wifi devices ~ 1 second
2. uptime not changed or device is not listed in devices database (DICT/ LIST) reaction time depends on how often the daubers is read (10secs ... 5 minutes)
3. age of device it > xx, reaction time depends on how often the daubers is read (10secs ... 5 minutes)
4. idle time is > xx, reaction time depends on how often the data base is read (10secs ... 5 minutes)

Each device will behave differently depending on how it is connected and setup. iPhones behave differently than arduinos or lan connected devices etc.

This version, I believe, exposes most information available in the unifi devices as devices/states in indigo. You can either setup your own triggers on the states or use devices/edit to setup how "status" is set by the different unify information.


Karl

and thanks to Wouter for patiently debugging the versions.

Posted on
Fri Oct 07, 2016 12:45 pm
Different Computers offline
User avatar
Posts: 1994
Joined: Jan 02, 2016
Location: East Coast

Re: uniFi WiFi AP: download

Just got my own UniFi AP, and installed this plugin.

Right off the bat the things I should be able to do blow my mind. For one thing, I think it will finally solve my wife's phone presence issues, something that has dogged me since I got Indigo.

I just tested the speed of UP and DOWN changes by turning off wifi on my phone after it had shown up as UP to Indigo. But I've left it offline now for quite a bit longer than any of the times I've set, and it keeps reporting as UP in the UniFi devices. (One minute on the timer, 10 minutes now and my phone still shows as UP.) This has remained true even after stopping and restarting the plugin.

What am I missing?

==> answered in discussion thread Karl

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Sun Oct 23, 2016 1:21 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted V 7.0.12

this version should run on indigo 5,6,7...

added/fixed::
-more error control, fixed some bugs., i.e. for timeouts in indigo (applescript is hanging)
- if you have 2 or more AP's the transition between the AP's (a dic=vies is moving from one AP to the next) is now handled actively in the plugin. it knows when it switches, not just a new signal from another AP.
- an optimized option for Up/.down status for wifi devices (select in edit device). With this option it uses all info available to determine if a device is present:
== if a device show up on the AP log file as present ==> status -> up
== if a device has idle > xx or active time not changed and last AP message is older than xx set status to down if > expiration time
- added several nice formatting and small feature changes.
== if a devices shows in the AP log files as disconnecting (and not switching to another AP ... this was a little complicated) the status --> down after expiration time

I have not tested it under i6 but the plugin switches on/off features depending on indigo version ... should work. if anyone wants to test?

Karl

Posted on
Sun Nov 13, 2016 3:40 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

poster v 7-0-17

fixed error "uniFiAP in Line '841' has error='local variable 'dt' referenced before assignment'"


Karl

Posted on
Sun Nov 13, 2016 6:59 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 7.0.18

fixed: umlauts and others european special characters in printing to log file.
have not tested it as I don't have umlauts in my AP names, but used code from other plugin that works.

ALSO I introduced a new option for the UGA (gateway-router): in one of the latest unify release they changed the prompt. You can now select the prompt in config for the UGA.
Screen Shot 2016-11-13 at 18.54.33.png
Screen Shot 2016-11-13 at 18.54.33.png (13.32 KiB) Viewed 6747 times


The older one was @ubnt: the newer is @GW:

you can check what you have open terminal and type:
ssh yourid@your-ip# and enter password
to log in to your router-gw. you will see the prompt from the UGA

Karl

Posted on
Mon Nov 14, 2016 7:42 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v-7-0-24

fixed:
using switches other than the one with 26 ports did not work properly - now tested for 48ethernet+4fiber ports


Karl

and thanks to Bollar for helping to debug this

Posted on
Fri Nov 18, 2016 9:39 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted V 7-0.25

fixed:
error message with: "useWhatForStatusWiFi"
and some key xxx not found

thanks to Bollar for testing


Karl

Posted on
Sat Dec 10, 2016 8:16 am
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 7-0-26

fixed:
Line '802' has error='global name 'status' is not defined'


Karl

Posted on
Sat Dec 10, 2016 11:32 am
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 7-0-27

fixed:
Line '805' has error='global name 'dt' is not defined'

Karl

Posted on
Mon Jan 09, 2017 4:11 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 7-0-30

fixed problem when "gateway" data is not included in dict from USG


Karl

Posted on
Sun Feb 19, 2017 12:17 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 7-2-32 ( first post)

devices with fastDown did not go from Down to expired. fixed. It will go "up"->"down" when AP sends a message that the devices disconnected.
Then after "expiration Time" set in config or in device edit it will go to "expired"


Karl

Posted on
Fri Apr 14, 2017 12:15 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 7-3-33 ( first post)

added:

menu item and action for reboot of UNIFI devices : you can send a reboot command to AP's, Switches and UAG.
(does a ssh to the selected device and does a "sudo reboot" )


comes in handy if you like to do a reboot at midnight in a scheduled action.


Karl

Posted on
Wed Apr 19, 2017 8:48 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 7-4-37

added:
double check up/down changes with a ping
check only down for Wifi devices
check up and down for devices that use switch or DHCP (GW) to determine up/down status. The switch will keep a device for about 10 minutes it is dictionary before it gets purged . only then it goes from UP to down. So when a device use Switch (and for the same matter DHCP from the UGA - but with ~ 2 minutes removal from tables) to check it is UP/Down . each time the switch sends it information, the plugin will follow up with a ping to check if it is still up. That improves the UP-> down significantly for these devices.

You can select "use Ping" for each device individually. It is not recommended to use ping for and every device as each time it takes ~ 0.3 secs to do a successful ping nd ~ 1 sec to do an unsuccessful ping. during that time the plugin will wait.

Also did a lot of tuning for WiFi devices. With the proper settings (optimized) the false down states have been reduced significantly.
This was tested with zero handoff as well as with regular setup for the WiFi AP ( thanks to Wouter for that)

Karl

Posted on
Fri Jun 16, 2017 9:25 pm
kw123 offline
User avatar
Posts: 7160
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi WiFi AP: download

posted v 7-4-38

changed:
several states contained a "-", e.g. radio-2 is now radio_2.
Indigo stores them anyway with a "_".

fixed:
the value of the state ipNumber was filled with e.g. 192.168.1.44 and 192.168.1.044 depending on the source of data. it is now 192.168.1.44
That is only for the state, not for the notes field . there .044 is still used as it is used to sort the device list to find the ip numbers (.44 would otherwise come before .5)
This also reduces the writes to the database as the state does not change anymore .

Because of the change from "-" to "_" I suggest to upgrade., even if you are happy with the current version

Karl

Who is online

Users browsing this forum: No registered users and 1 guest