Page 1 of 4

Feature Requests -- UDM Pro Support and backup file archival

PostPosted: Thu Feb 06, 2020 5:02 pm
by Ramias
So I live on the bleeding edge and just got one of these. The controller is built in to the device. When you log in via the web, you get a "Local Portal" FOR THE UDM DEVICE and then there's a link for the applications (Network, Protect, Access and Talk).

Current UnifAP plugin errors with UDM Pro.

Any chance you could look into this and maybe add support for the UDM Pro? Don't know if it is just a different path or if the

Also, another request that may be useful (if this can be done with Indigo) -- poll the device and copy down the backup file. on the UDM Pro, they're stored here: /data/unifi/data/backup. There is a meta.json with info on the backups there (manual for me now; auto probably in a few days).

Thanks!

Here's what startup looks like:
Code: Select all
Feb 6, 2020 at 5:39:44 PM
   uniFiAP                         myLogSet setting parameters -- logFileActive= ; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.4/Preferences/Plugins/com.karlwachs.uniFiAP/plugin.log;  debugLevel= ['all']
   uniFiAP Warning                 restart  GW ipNumber   changed;  VIDEO ipNumber   changed;
   uniFiAP                          resetDataStats called from postLoop
   uniFiAP Warning                 getMessages: ListenProcess started for uType: SWdict;  ip: 192.168.0.3  pid:12105
   uniFiAP                         runConcurrentThread stopping plugin due to:  ::::: config changed :::::
   Reloading plugin "uniFiAP 7.26.169"
   Stopping plugin "uniFiAP 7.26.169" (pid 11739)
   uniFiAP Error                   plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   Stopped plugin "uniFiAP 7.26.169"
   Starting plugin "uniFiAP 7.26.169" (pid 12122)
   uniFiAP                         initializing    ...
   uniFiAP                         path To files:          =================
   uniFiAP                         indigo                  /Library/Application Support/Perceptive Automation/
   uniFiAP                         installFolder           /Library/Application Support/Perceptive Automation/Indigo 7.4/
   uniFiAP                         plugin.py               /Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/uniFiAP.indigoPlugin/Contents/Server Plugin/
   uniFiAP                         Plugin params           /Library/Application Support/Perceptive Automation/Indigo 7.4/Preferences/Plugins/com.karlwachs.uniFiAP/
   uniFiAP Warning                 logger  enabled for     WARNING        ==> TEST ONLY
   uniFiAP Error                   logger  enabled for     ERROR          ==> TEST ONLY
   uniFiAP Critical Error          logger  enabled for     CRITICAL       ==> TEST ONLY
   uniFiAP                         check                   /Library/Application Support/Perceptive Automation/Indigo 7.4/Logs/com.karlwachs.uniFiAP/plugin.log  <<<<    for detailed logging
   uniFiAP                         Plugin short Name       UniFi
   uniFiAP                         my PID                  12122
   uniFiAP                         set params for indigo V 7.4
   Started plugin "uniFiAP 7.26.169"
   uniFiAP                         testing if variable enableTimeTracking_UniFi is == on/off/print-option to enable/end/print time tracking of all functions and methods (option:'',calls,cumtime,pcalls,time)
   uniFiAP                         myLogSet setting parameters -- logFileActive= ; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.4/Preferences/Plugins/com.karlwachs.uniFiAP/plugin.log;  debugLevel= ['all']
   uniFiAP Error                   UNIFI executeCMDOnController error no json object: (wrong UID/passwd, ip number?) ...>>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1"><link href="/2.css" rel="stylesheet"></head>
<body>
<div id="root"></div>
<script type="text/javascript" src="/vendor.270c6910.chunk.js"></script><script type="text/javascript" src="/main.0a9cc80e.js"></script></body>
</html>
<<
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   402  100   357  100    45   9153   1153 --:--:-- --:--:-- --:--:-- 10307
 Connection
   uniFiAP Error                   UNIFI executeCMDOnController error no json object: (wrong UID/passwd, ip number?) ...>>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1"><link href="/2.css" rel="stylesheet"></head>
<body>
<div id="root"></div>
<script type="text/javascript" src="/vendor.270c6910.chunk.js"></script><script type="text/javascript" src="/main.0a9cc80e.js"></script></body>
</html>
<<
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   402  100   357  100    45  13222   1666 --:--:-- --:--:-- --:--:-- 15461

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Thu Feb 06, 2020 7:29 pm
by kw123
As I don’t have one it is difficult to integrate it.

If someone has a spare one, I can look at it.

It’s not just a change in path ...
the basics are likely similar but in order to make it work one Has to to really look into the details.

Karl.


Sent from my iPhone using Tapatalk

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Fri Feb 07, 2020 9:10 am
by durosity
I have ordered one but I’m not sure when it’ll turn up. If it’s of any use to you I can set it up without removing my existing equipment and give you remote access?


Sent from my iPhone using Tapatalk Pro

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Fri Feb 07, 2020 9:21 am
by kw123
We can do that. Let me know when it’s ready

Karl


Sent from my iPhone using Tapatalk

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Fri Feb 07, 2020 9:30 am
by durosity
Will do. It hasn't shipped yet (it only went on sale in Europe yesterday) but I'm hoping it won't take too long.

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Fri Feb 07, 2020 10:57 am
by kw123
can't promise anything .. this thing seems to be a pure consumer item.

Hopefully it is not like the "protect" video version.. no api, no ssh ..

Karl

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Fri Feb 07, 2020 1:25 pm
by Different Computers
I can tell you that the non-Pro UDM is completely compatible with the Unifi plugin.

It was actually quite easy to make work with Indigo--as long as you're restoring from a backup that was already working with Indigo, Indigo doesn't even notice that there's new hardware.

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Fri Feb 07, 2020 5:59 pm
by durosity
kw123 wrote:
can't promise anything .. this thing seems to be a pure consumer item.

Hopefully it is not like the "protect" video version.. no api, no ssh ..

Karl


Indeed.. I’ve seen the battles raging on places like reddit over it’s “pro” credentials.. I guess it depends on what you’re planning to use it for. To me it’s a no brainier.. cloudkey, switch and gateway all in a 1U rack module.. but of course my needs aren’t anywhere near what a high end pro would want.. but then neither are a lot of commercial environments where I think this will actually be more than suitable.

As for the video functionality I likely won’t be using that.. I’m very happy with SecuritySpy and unifi don’t do any cameras that are suitable for my needs (I bought one unifi camera as a test a while ago and I just use it with SS now). If the supported ONVIF then mebbe it’d be of use.. but for me it’ll likely remain dormant.


Sent from my iPhone using Tapatalk Pro

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Fri Feb 07, 2020 6:08 pm
by kw123
I can tell you that the non-Pro UDM is completely compatible with the Unifi plugin.

It was actually quite easy to make work with Indigo--as long as you're restoring from a backup that was already working with Indigo, Indigo doesn't even notice that there's new hardware.


could you elaborate on it?

ie which device type do you use: switch gateway,...?

Karl

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Fri Feb 07, 2020 8:17 pm
by Ramias
Mine is now all set up. Got it for the faster processing than the USG 3P. Not sure if I had an actual "need". Oh well.

It does allow SSH,

runs on port 443 vs 8443.

there is no http://host/api url path. It may have another but I haven't found it yet. :(

But this "unified-poller" says they support UDM Pro:
https://github.com/unifi-poller/unifi-poller/issues/107

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Sat Feb 08, 2020 7:43 am
by Different Computers
kw123 wrote:
I can tell you that the non-Pro UDM is completely compatible with the Unifi plugin.
could you elaborate on it?

ie which device type do you use: switch gateway,...?



I have the all in one consumer Unifi Dream Machine. It's a switch, gateway and AP. Not rack mount.

Feature Requests -- UDM Pro Support and backup file archival

PostPosted: Sat Feb 08, 2020 8:11 am
by kw123
And what is the setting in the plugin?
Ap. Switch ,,,?


Sent from my iPhone using Tapatalk

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Mon Feb 10, 2020 2:52 pm
by Different Computers
I'm not entirely certain I understand the question, but I have the plugin pointed at the UDM's address.

Your question makes me wonder if I should add the same address as a AP and as a switch. I'll check when I get home.

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Mon Feb 10, 2020 3:24 pm
by kw123
there are several connections the plugin does:
1. to 0-5 APs
2. to 0-15 switches
3. to 0/1 gateway
4. to 0/1 controller

They all have an IP address. In principle you could assign the same IP address to all of them.

I guess you are just using ONE AP with ONE ip number?

you could add one switch and one gateway in config, all with the same IP number - and the controller too, where ever that runs.

Karl

Re: Feature Requests -- UDM Pro Support and backup file arch

PostPosted: Tue Feb 11, 2020 9:36 pm
by Ramias
The ssh login to the UDM pro uses the username root and a separate password (set in the UDM portion of the UI -- you just have the option to set the password from what the UnifiAPs and switches use (set in the network controller portion). I set the username/password for the Unifi devices to "root" and the same password and use these credentials in the existing plugin and it appears to be working correctly to access the gateway portion of the UDM.

So the only gap is support for direct access to the controller portion. Which I've currently disabled in the plugin. There does not appear to be a /api that works for the UDM.