New Plugin - miniUniFi (minimal UniFi access)

Posted on
Mon Oct 26, 2020 9:55 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - miniUniFi (minimal UniFi access)

autolog wrote:
You could add an option in the Edit device settings to do that if checked.

Alternatively only change it if the current name starts with "new device", so you don't overwrite it if someone has already changed it. :)


I hate adding options. Pretty soon, it's too complicated to deal with.

I'll see if I can figure out a way to not overwrite if the user has already set the name. Maybe I can do it on closing the dialog?

Or maybe it's just a bad idea. ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Oct 26, 2020 10:47 am
Doctor Q offline
Posts: 67
Joined: Feb 18, 2020

Re: New Plugin - miniUniFi (minimal UniFi access)

Got version.10 running by changing port to 443 and no SSL. Looks promising. Pretty good for working without a map, FD.

Posted on
Mon Oct 26, 2020 10:50 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - miniUniFi (minimal UniFi access)

Doctor Q wrote:
Got version.10 running by changing port to 443 and no SSL. Looks promising. Pretty good for working without a map, FD.


Actually, if you have a UDMP the port field is ignored now. SSL Verify requires you have valid SSL certificates installed on the UDMP.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Oct 27, 2020 6:57 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: New Plugin - miniUniFi (minimal UniFi access)

Hi Joe,

I've set up the plugin and have it working well. I see 2 statuses; first_seen and last_seen. What do the numbers mean? I would see it being beneficial if these were actual times - I know I can resolve by using triggers however it would be good if it was available directly from the plugin.
Rgds
Colly
Attachments
Screenshot 2020-10-27 at 12.53.20.png
Screenshot 2020-10-27 at 12.53.20.png (12.42 KiB) Viewed 4021 times

Posted on
Tue Oct 27, 2020 7:09 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - miniUniFi (minimal UniFi access)

You need to get the latest version from GitHub. The states have changed a bunch since whatever version you're running.

Those values are Posix timestamp values. They can be converted to an actual time/date string, but what would you use that for?

There's a new state called "offline_seconds" which is probably more useful, as it's the time (in seconds) since the device was last seen by the controller.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Oct 27, 2020 7:12 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: New Plugin - miniUniFi (minimal UniFi access)

OK - I will check the latest version out, my mistake.
I have some control pages which show when seen on network which I more or less use as the time either my wife of I have left or returned to the house.

Posted on
Tue Oct 27, 2020 7:33 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: New Plugin - miniUniFi (minimal UniFi access)

Tried the latest version (0.0.11) - here is the link for others https://github.com/FlyingDiver/Indigo-miniUniFi/releases/tag/0.0.11
The offline seconds can be used for my needs also. I've added a request on GitHub for custom state to display time that client left the Network.

Posted on
Tue Oct 27, 2020 12:58 pm
Doctor Q offline
Posts: 67
Joined: Feb 18, 2020

Re: New Plugin - miniUniFi (minimal UniFi access)

I'm running .11 and getting this error, even though it appeared to be working:

miniUniFi Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1165, in deviceUpdated
File "plugin.py", line 597, in didDeviceCommPropertyChange
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 2622: ordinal not in range(128)

Posted on
Tue Oct 27, 2020 1:01 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - miniUniFi (minimal UniFi access)

Yeah, I added some code if needed for debugging later, and forgot to make it unicode compatible. It'll be fixed in 0.12, which will probably be available later today.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Oct 27, 2020 1:17 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - miniUniFi (minimal UniFi access)

Pre-release version 0.0.12 is now available: https://github.com/FlyingDiver/Indigo-m ... tag/0.0.12

Lots of bug fixes.

A number of enhancements requests have been filed. I encourage all testers to comment on them. And create new ones.

https://github.com/FlyingDiver/Indigo-miniUniFi/issues

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 28, 2020 2:05 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - miniUniFi (minimal UniFi access)

Hey folks -

I need the 'model' and 'type' states for any UniFi device that's not an AP or switch. Like Protect camera, UDM, or UDMP.

Thanks!

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 28, 2020 6:37 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - miniUniFi (minimal UniFi access)

Release 0.0.13: https://github.com/FlyingDiver/Indigo-m ... tag/0.0.13

Set UniFi device type and model, issue #13
Fix for off-line controller error, issue #19
Added firmware version to UI for UniFi devices
Get controller SW version

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Oct 29, 2020 7:42 am
jalves offline
Posts: 744
Joined: Jun 16, 2013

Re: New Plugin - miniUniFi (minimal UniFi access)

Just wanted to post that I set up this plugin today and quickly got three devices setup without problem. That's on a UDM and the three devices are two iPhones and an Apple Watch. Haven't yet set up triggers but will be doing so over the next few days. Thanks for your work on this!

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Posted on
Thu Oct 29, 2020 8:00 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - miniUniFi (minimal UniFi access)

Pre-release 0.0.15 now available: https://github.com/FlyingDiver/Indigo-m ... tag/0.0.15

This is getting very close to release status. There are a number of enhancement issues still open that will be considered after official release.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Oct 29, 2020 8:27 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: New Plugin - miniUniFi (minimal UniFi access)

Installed 0.0.15.

I deleted all my devices and started again. I set up my Cloud Key G2 controller OK.

I then added a switch 8 150W POE and got this error in the Indigo log.

SQL Logger Error exception trying to insert row into table device_history_1825415154 ("new device 2") -- unable to modify table
SQL Logger Error ERROR: value "12934643202" is out of range for type integer at character 14439

SQL Logger Error INSERT INTO device_history_1825415154 ("port_table_5_poe_power" ...


I can PM you the output but don't want to post it to a public forum. :)

btw - I noticed this late last night on a previous version (12?) , so I don't think it is 15 specific.

Who is online

Users browsing this forum: No registered users and 1 guest