Page 6 of 11

Re: uniFi WiFi AP: download

PostPosted: Mon Sep 10, 2018 7:15 am
by dnomode
Hello Karl,

The variable is not showing the IP address. Below is what it shows when I connected a new cell phone to my network.

UniFi_c4:9a:02:40:70:63/c4:9a:02:40:70:63/

Am I missing something?

Edmond

Re: uniFi WiFi AP: download

PostPosted: Mon Sep 10, 2018 8:13 am
by dnomode
Karl,

The plugin is also adding neighbor devices to the Unifi_New_Device variable. Is there a way that I can tell the plugin to ignore neighbor devices?

Thanks
Edmond

uniFi WiFi AP: download

PostPosted: Mon Sep 10, 2018 8:16 am
by kw123
Yes in config switch freeze neighbors

But it’s not specific for this variable. It only disables adding any new neighbors.

I have it off as I would otherwise add 100 devices a day from drive by hotspots in cars.


Sent from my iPhone using Tapatalk

Re: uniFi WiFi AP: download

PostPosted: Mon Sep 10, 2018 9:46 am
by dnomode
Perfect, the same was happening to me every time a car with Hotspot drove by.

By the way, Im still getting this error every time I restart the Indigo Server
Code: Select all
plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Edmond

Re: uniFi WiFi AP: download

PostPosted: Mon Sep 10, 2018 9:52 am
by kw123
is it running?
that might be an error message from restarting the plugin (timeout when forcing a restart ..), not from running it

Re: uniFi WiFi AP: download

PostPosted: Mon Sep 10, 2018 9:53 am
by dnomode
Ya... It seems to be running perfect. The error never come up again. I'll just ignore it.

Thanks Karl

Edmond

Re: uniFi WiFi AP: download

PostPosted: Sat Oct 06, 2018 9:22 pm
by kw123
posted v7.23.130

supports (most) functions needed to set cameras IR, mic, speaker, LEDs on/off/; streaming low/med high res for the unifi cameras.

Also supports now debian (besides ubuntu) ops sys for the NVR

Tthe following functions are available in menu as well as in actions:
Screen Shot 2018-10-06 at 22.08.41.png
Screen Shot 2018-10-06 at 22.08.41.png (108.58 KiB) Viewed 13305 times


You need to enter in config the video - web userid /password as well as the unix userid/password.
It then creates a NVR type device in indigo with states: and one camera type device for each camera .

It gets the apiKeys of the NVR web page as well as the apiKeys for each camera through mongo db reads / web reads on the NVR on the unix box.If you change the apiKeys, it will refresh them.

Karl

Re: uniFi WiFi AP: download

PostPosted: Wed Oct 10, 2018 9:21 pm
by kw123
new version 7.24.135
added full functionality to get snapshots from any camera managed by the unifi NVR
Besides starting or stopping or configuring motion triggered or full-time recording you can not take single snapshots and put the images (of defined size) into any path on the mac.

the snapshot can be triggered through a menu item or a regular indigo action eg triggered by a motion sensor or a door opening etc.

Karl

don't know of any functionality missing.. and thanks to Wouter for suggesting it and doing some painful testing

Re: uniFi WiFi AP: download

PostPosted: Sat Oct 20, 2018 11:50 am
by kw123
released v 7.25.137

added detailed parameters prints to give better koverview of user-ids ip numbers and other parameters

you need to reenter VIDEO-NVR IP userID and passwords

a parameters print now looks like this:
Code: Select all
 
UniFi    =============plugin config Parameters========
debugLevel                              []
logFile                                 /Users/karlwachs/indigo/unifi/UniFi.log
enableFINGSCAN                          False
enableBroadCastEvents                   all
ignoreNeighborForFing                   True
expirationTime                          120 [sec]
sleep in main loop                      4.0 [sec]
cpu used:                               0:03.85

====== used in ssh userid@switch-IP, AP-IP, USG-IP to get DB dump and listen to events
UserID                                  xxx
PassWd                                  xx
promptOnServer -GW dict                 :~
promptOnServer -AP dict                 BZ.v
promptOnServer -SW dict                 US.v
promptOnServer -GW ctrl                 :~
promptOnServer -AP tail                 BZ.v
promptOnServer -GW tail                 :~
promptOnServer -SW tail                 US.v
GW tailCommand                          /usr/bin/tail -F /var/log/messages
GW dictCommand                          mca-dump | sed -e 's/^ *//'
SW tailCommand                          /usr/bin/tail -F /var/log/messages
SW dictCommand                          mca-dump | sed -e 's/^ *//'
AP tailCommand                          /usr/bin/tail -F /var/log/messages
AP dictCommand                          mca-dump | sed -e 's/^ *//'
read DB Dict every                      {GW:60,AP:60,SW:120} [sec]
restart listeners if NoMessage for      180[sec]

====== CONTROLLER WEB ACCESS , set parameters and reporting
  curl data={WEB-UserID:..,WEB-PassWd:..} https://controllerIP: ..--------------
WEB-UserID                              xx
WEB-PassWd                              xx
Mode: off, ON, reports only             ON
Controller port#                        8443
Controller site Name#                   default
Controller API WebPage                  /api/s/
get blocked client info from Cntr every 20[sec]

====== VIDEO / camera NVR stuff ----------------------
=  get camera DB config and listen to recording event logs
  ssh NVR-UNIXUserID@NVR-IP
NVR-UNIXUserID                          xx
NVR-UNIXpasswd                          xx
promptOnServer -VD dict                 vbox-unifi
promptOnServer -VD tail                 vbox-unifi
VD tailCommand                          /usr/bin/tail -F /var/lib/unifi-video/logs/motion.log
VD dictCommand                          not implemented
= getting snapshots and reading and changing parameters
  curl data={WEB-UserID:..,WEB-PassWd:..} https://NVR-IP#:  ....   for commands and read parameters
  requests(http://IP-NVR:7080/api/2.0/snapshot/camera/**camApiKey**?force=true&width=1024&apiKey=nvrAPIkey,stream=True)  for snap shots
NVR-WEB-UserID                          xx
NVR-WEB-passWd                          xx
NVR-API Key                             0yBmxxz2QCi8ISvCP

AP ip#           enabled / disabled
192.168.1.3         True
192.168.1.4         True
192.168.1.5         True
192.168.1.6         False
192.168.1.x         False
SW ip#
192.168.1.10        True
192.168.1.11        True
192.168.1.12        True
192.168.1.13        True
192.168.1.19        True
192.168.1.15        True
192.168.1.16        True
192.168.1.17        True
192.168.1.18        True
192.168.1.19        True
192.168.1.7         False

192.168.1.1         True  USG/UGA  gateway/router
192.168.1.9               Controller / cloud Key IP#
192.168.1.60              Video NVR-IP#
----------------------------------------------------

UniFi    =============plugin config Parameters========   END

Re: uniFi WiFi AP: download

PostPosted: Sun Nov 04, 2018 9:10 pm
by kw123
released v 7.25.143

==> important fix: bug that left apiKey empty

Added 2. option for curl, to enable use of an updated curl version using homebrew to install . Homebrew install @ /usr/local/bin/curl, compared to /usr/bin/curl for the regular file
This is only for old OSX that do NOT have an updated curl that can do SSL > 1.0. Any OSX >= 10.10 does not need this .


Karl

Re: uniFi WiFi AP: download

PostPosted: Wed Nov 07, 2018 9:57 pm
by kw123
released 7.25.144

- added option to track cpu usage of methods and functions This is beneficial in case plugin hangs (ie menu/ config does not open)
- used this to optimize the code (~ 20% faster)
- fixed some spelling and improved menus


Karl

ps from now on all MY updated plugins will required Indigo 7.x.. it gets to difficult to maintain work arounds for options that do not work under 6.x

Re: uniFi WiFi AP: download

PostPosted: Fri Nov 23, 2018 2:47 pm
by kw123
released v 7.26.149

added menu item to ignore partially defined MACnumbers. eg :
Screen Shot 2018-11-23 at 14.35.22.png
Screen Shot 2018-11-23 at 14.35.22.png (50.16 KiB) Viewed 12835 times


Karl

Re: uniFi WiFi AP: download

PostPosted: Wed Dec 12, 2018 5:37 pm
by kw123
Code: Select all
changes in V 7.26.151 @ 2018-12-12
==================

1. encapsulated password in single quotes. Was not working with ( or ) in password

2. improved menus, mostly cosmetics

3. fixed un-ignore device menu option


Karl

Re: uniFi WiFi AP: download

PostPosted: Thu Dec 27, 2018 8:11 am
by kw123
Code: Select all
changes in V 7.26.153  @ 2018-12-27
================== 

1. Getting (un)blocked info from controller immediately after plugin sets / unsets block status (required controller to be set to ON or ON reports
   Changed the timing interval for regular testing of (un)blocked to GT 60 sec.
   As this now only applies to getting changes set directly on the web page of the controller.
   This check creates a big data data transfer (~60kBytes), hence doing it every 20 secs is not recommended, default is 3 minutes.

2. The received controller dicts ( dict-Controller_xxx for  xxx=device, users, ...) is written to the unifi directory next to the AP, switches, etc dict files.
   This is just FYI


3. fixed : error=''dict' object is not callable' in print info


Re: uniFi WiFi AP: download

PostPosted: Wed May 01, 2019 3:08 pm
by kw123
changes in V 7.26.162 @ 2019-05-01
==================

1.added error handling for ErrNo=22, general read error
will now restart listener, write ONE msg into plugin log. no error message
2. added timestamp for info logging