View unanswered posts | View active topics It is currently Tue Jun 18, 2013 1:18 am



Reply to topic  [ 4 posts ] 
 plugin updating 
Author Message

Joined: Apr 01, 2003
Posts: 823
Location: Rio Rancho, NM
Post plugin updating
I think there needs to be a auto updating function for plugins. It's hard to keep track of when they have been updated or whats new. For that matter Indigo's updating could be improved.

It's also hard to tell where to get info about plugins, Is it in the"User Contributions" forum, the "Extending Indigo with Plugins and Python" forum or the "3rd party developers" forum?

_________________
Greg In The Desert


Sun Dec 18, 2011 10:46 am
Profile WWW
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6841
Location: Austin, Texas
Post Re: plugin updating
It's up to the 3rd party developer to advertise how to get support - we've provided forums for any developer that requests it the 3rd Party Developer section and that's where we recommend that they provide support, documentation, and upgrade notifications. We can't force them to do it though. And, for the moment, we're encouraging 3rd parties to put their plugins in the File Library - that should be the first place to look for plugins.

We're working on several things to help with finding and downloading plugins and getting notification when a new version of a plugin is available. Auto updating isn't in the cards though, at least in the short/medium term, for either Indigo or plugins - it's an extremely non-trivial exercise.

_________________
Jay (Indigo Support)
Image


Sun Dec 18, 2011 1:08 pm
Profile WWW
User avatar

Joined: Nov 18, 2008
Posts: 1741
Location: Berkeley, CA
Post Re: plugin updating
jay wrote:I...We're working on several things to help with finding and downloading plugins and getting notification when a new version of a plugin is available. Auto updating isn't in the cards though, at least in the short/medium term, for either Indigo or plugins - it's an extremely non-trivial exercise.

Agreed with auto-updating, and good to hear version checking is being planned. In the meantime, the @gregjsmith's request seemed to be a good idea so I cooked up this snippet of portable code to let a plugin check its version number. I used my own server, but if there is general interest I could host other plugin's versions as well - until Matt and Jay do something official.

Other than entering a value for versionServer, the code should be completely portable. BTW, the "html" file contains one line only, with the version number. No actual html code.
Code: Select all
from urllib2 import urlopen
import urllib2
import socket

   ########################################
   def versionCheck(self):   
      self.debugLog(u"versionCheck() called")
      sp = re.split('\.', self.pluginId)
      myName = sp[2]
      myVersion = str(self.pluginVersion)
      socket.setdefaulttimeout(3)
      versionServer = 'http://yikes.com/plugins/'
      theUrl = versionServer + myName + '.html'
      socket.setdefaulttimeout(3)
      try:
         f = urlopen(theUrl)
         latestVersion = str(f.read()).rstrip('\n')
         if myVersion < latestVersion:
            self.errorLog(u"You are running v%s. A newer version, v%s is available." % (myVersion, latestVersion))
         else:
            indigo.server.log(u"Your plugin version, v" + myVersion + " is current", type=self.pluginDisplayName)
      except:
         self.errorLog(u"Unable to reach the version server.")


EDIT: I added a timeout and exception handler. BTW, I called this from startup().


Sun Dec 18, 2011 4:02 pm
Profile

Joined: Oct 17, 2004
Posts: 1122
Location: Rochester, Ny
Post Re: plugin updating
berkinet wrote:
jay wrote:I...We're working on several things to help with finding and downloading plugins and getting notification when a new version of a plugin is available. Auto updating isn't in the cards though, at least in the short/medium term, for either Indigo or plugins - it's an extremely non-trivial exercise.

Agreed with auto-updating, and good to hear version checking is being planned. In the meantime, the @gregjsmith's request seemed to be a good idea so I cooked up this snippet of portable code to let a plugin check its version number. I used my own server, but if there is general interest I could host other plugin's versions as well - until Matt and Jay do something official.

Other than entering a value for versionServer, the code should be completely portable. BTW, the "html" file contains one line only, with the version number. No actual html code.
Code: Select all
from urllib2 import urlopen
import urllib2
import socket

   ########################################
   def versionCheck(self):   
      self.debugLog(u"versionCheck() called")
      sp = re.split('\.', self.pluginId)
      myName = sp[2]
      myVersion = str(self.pluginVersion)
      socket.setdefaulttimeout(3)
      versionServer = 'http://yikes.com/plugins/'
      theUrl = versionServer + myName + '.html'
      socket.setdefaulttimeout(3)
      try:
         f = urlopen(theUrl)
         latestVersion = str(f.read()).rstrip('\n')
         if myVersion < latestVersion:
            self.errorLog(u"You are running v%s. A newer version, v%s is available." % (myVersion, latestVersion))
         else:
            indigo.server.log(u"Your plugin version, v" + myVersion + " is current", type=self.pluginDisplayName)
      except:
         self.errorLog(u"Unable to reach the version server.")


EDIT: I added a timeout and exception handler. BTW, I called this from startup().


Please keep in mind, that I already created and implemented a full solution for version checking...

See viewtopic.php?f=18&t=7273&p=44355&hilit=plugins.com#p44355

Simply add an import line....

import versioncheck

Your plugin ID...
plugin_id = "com.schollnick.indigoplugin.External_IP"

And the actual version check code:

version_found, update_url, plugin_name = versioncheck.VersionCheck ( plugin_id )
self.debugLog ("Version Check Server reports %s is available." % version_found)
if version_found == None:
indigo.server.log ("Update Check failed. Please contact the Author of the Plugin.", isError=True)
elif float(version_found) > float(self.pluginVersion):
indigo.server.log ( "A New Version of %s v.%s is available. You can download the upgrade from %s" % (self.pluginDisplayName, version_found, update_url), type="Upgrade", isError=True )

The web site is all setup.... and online, for use....

http://www.indigo-plugins.com

_________________
------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33


Mon Dec 19, 2011 5:35 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.