Plugin errors due to new Indigo 7.2 directory

Posted on
Mon Oct 01, 2018 1:16 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Plugin errors due to new Indigo 7.2 directory

Jay or Matt,

The 7.2 installer created a new Indigo 7.2 directory in Application Support. This generally worked but has created problems with certain plugins as well as some AppleScript code I have that refers to the Indigo 7 directory.

The EventLog and FindMyDevices plugins both refer to Indigo 7 in their python code and changing it to 7.2 worked.

The Nest Home plugin python code makes a call to myIndigoVersion and is apparently receiving 7 instead of 7.2 as the server version. Changing this to a constant "7.2" fixed it.

I don't know if changing the directory name to Indigo 7 would have worked but I suspect it would have created even more problems.

Was the installer intended to create Indigo 7.2 or was this a glitch in my upgrade process?

Thanks

--Dave

Posted on
Mon Oct 01, 2018 2:02 pm
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Plugin errors due to new Indigo 7.2 directory

This is an intentional change which makes switching between versions better/more reliable. We beta tested with all of our 3rd party developers and we let them know this change was coming to allow them time to release updates to their plugins. There is a call that Python scripts and plugins can use to get the install directory (indigo.server.getInstallFolderPath()) which should be used to get the install folder directory. Using this avoids any issues.

Trying to rename the 7.2 directory to 7 would have failed and shouldn't be tried.

In terms of your AppleScripts, you'll need to rewrite them anyway given that AppleScript will be deprecated in an upcoming release. We have a forum dedicated to helping users convert their AppleScripts so I highly recommend that you use that to get started.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Oct 01, 2018 2:18 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Plugin errors due to new Indigo 7.2 directory

Thanks as always, Jay. My workarounds should be ok until the plugins are updated.

—Dave

Posted on
Mon Oct 01, 2018 2:30 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Plugin errors due to new Indigo 7.2 directory

lanbrown wrote:
DVDDave wrote:
The Nest Home plugin python code makes a call to myIndigoVersion and is apparently receiving 7 instead of 7.2 as the server version. Changing this to a constant "7.2" fixed it.


The Nest plugin and all of the plugins that I have worked after the 7.2 upgrade. without any modifications.

Weird I thought I was up to date but I’ll check. Doesn’t seem like findmydevices or eventlog could work and the version call in Nest is returning 7 not 7.2.

Posted on
Mon Oct 01, 2018 5:34 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Plugin errors due to new Indigo 7.2 directory

Maybe my errors are because I'm using it with a Nest Protect. Even with the latest version, I get constant errors of the sort:

Code: Select all
Traceback (most recent call last):
  File "plugin.py", line 1886, in runConcurrentThread
IOError: (2, 'No such file or directory', u'/Library/Application Support/Perceptive Automation/Indigo 7/Logs/NESTHome1Errors.log')

   NEST Home Error                 plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   NEST Home Error                 Error in plugin execution runConcurrentThread:


Until I change the plugin.py like this:

Code: Select all
#myIndigoVersion = indigo.server.version[0]
myIndigoVersion = "7.2"


No big deal though. I'll also post this in the Nest Home forum.

--Dave

Posted on
Mon Oct 01, 2018 8:02 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Plugin errors due to new Indigo 7.2 directory

I've published a new version of that plugin which should be compatible with 7.2 (and beyond).

Image

Posted on
Mon Oct 01, 2018 8:05 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Plugin errors due to new Indigo 7.2 directory

Thanks! again :)

Posted on
Wed Oct 03, 2018 2:35 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Plugin errors due to new Indigo 7.2 directory

Thanks for all the nice and great work Matt and Jay.

Question about the 7.2 Installer and the new 7.2 directory.
We saw that all the extra (custom made) control page images from the old 7 directory were nice copied to the new 7.2 directory, perfect.
But why are the external AppleScripts not copied to the new directory?

We know that the internal Indigo AppleScripts are soon E.O.L. but this has nothing to do with the Scripts to command other programs.
Now we have to move all the AppleScripts manually and choose the right path again for every Trigger or Schedule.
(or work with 2 different Indigo directories and that's confusing)

Kind regards,

John

Posted on
Wed Oct 03, 2018 8:48 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Plugin errors due to new Indigo 7.2 directory

Yeah, we made the installer smarter about migrating over the custom images and Web server plugins. Unfortunately the scripts are more complicated because they require a database change so that all the internal references point to the new location and the installer isn't that smart.

I'd recommend moving the scripts all up and over to the root perceptive automation folder, so create a folder "Scripts" like:

/Library/Application Support/Perceptive Automation/Scripts

Then they won't be in the wrong/old directory when Indigo 7.3+ is released.

Image

Posted on
Wed Oct 03, 2018 9:03 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Plugin errors due to new Indigo 7.2 directory

Thanks for the explanation and the nice tip for all the future upgrades!
(Never change the name Perceptive Automation for the next 50 years please :wink: )

Posted on
Thu Oct 04, 2018 1:31 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Plugin errors due to new Indigo 7.2 directory

Matt; Indigo 7.2 automatically opens always the "choose file" window in the Indigo 7.2 Script directory.
Even when the Scripts were saved earlier elsewhere.
So, when the new location is chosen into the root "perceptive automation" folder for an Action, the next time (for an edit or so) the window opens again in the Indigo 7.2 directory.

Posted on
Thu Oct 04, 2018 8:31 am
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Plugin errors due to new Indigo 7.2 directory

Yep. We've had to tweak several thing regarding where the file dialogs open unfortunately due to OS bugs (like always wanting to open to the Documents folder). We'll look to see if we can improve this behavior in future releases.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests