Plugin Catalog & Plugin Updating System

Posted on
Mon Sep 05, 2011 8:31 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Plugin Catalog & Plugin Updating System

Folks,

What's the biggest issue, I see with the plugin system right now. There is no way to know when a new plugin has been released for Indigo... Well, other than trying to monitor the forums...

I am trying to solve this problem...

First, before I go to far, I would love it if someone with a little bit more Django experience would be willing to give a hand here... But, I am now learning a completely new web design platform, as I engineer this system, since I have never even examined Django before 3 days ago....

How can I find new plugins? Try here, http://www.indigo-plugins.com/ListAll .

What information is available through the web site?

* The current Version of the Plugin
* What version of Indigo this plugin ahas been tested with
* The Price of the plugin (This is my own future planning. I do not know if this field will ever be used)
* What URL downloads can be found at
* A Short description
* A Long description
* Author's name
* Author's web site
* Author's Email
* The Bundle ID of the plugin that Indigo recognizes


How can I be sure that I am running the latest version of a plugin? If the developers enable the Update system built-in to this website, you will be notified in the Indigo log when a newer version of the plugin is released.

How can developers use this to help ensure their plugins are up to date? When you register your plugin at the web site, one of the fields contains the bundle ID of the plugin.

Demo URL for update server...
http://127.0.0.1:8000/VersionCheck/com. ... xternal_IP

These are the changes necessary, to make this update engine work... I'll show you, the changes I made to the External IP Address & Dynamic DNS plugin:

I added the following Globals variables:

plugin_id = r'com.schollnick.indigoplugin.External_IP'
version_check_site = r'http://www.indigo-plugins.com'
version_check_url = version_check_site + "/VersionCheck/%s" % plugin_id

In the startup() function:

Added self.VersionCheck ()

def VersionCheck ( self ):
version_found = urllib2.urlopen( version_check_url ).read()
version_found = version_found[0:-1]
self.debugLog ("Version Check Server reports %s is available." % version_found)
if 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, ""), type="Upgrade" )

And that's it. The server will return the version number of the latest version of the plugin, the VersionCheck function will fetch this, and compare that with the existing plugin's version number. If the server "wins", then a log message is entered into the log.

I am planning to add additional features to the server, but I want to invite all the developers to contact me, so that we can start to register their plugins and enable these features...

At this point, one missing feature on the server is user registration... So please email me at Benjamin AT schollnick DOT net, and I'll setup an account for you, so that you can enter your plugin information... (Or you can email it to me...)

If you have any suggestions, please feel free to send it as well...

- Benjamin

------
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

Posted on
Sat Sep 10, 2011 1:29 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Plugin Catalog & Plugin Updating System

I have added several new features to the (unofficial) Indigo Plugin's Catalog website...

Including:

* Search by Author
* Search by Category (more below!)
* User Profiles/Logins are now available

Most of my Indigo Plugins are in the catalog. I would welcome other authors in adding their plugins to the catalog.

Currently, the following categories are loaded... Any suggestions for additions or changes are welcome.

Web
Networking
Disaster Recovery
Python
Accessibility & Assistive Automation
3rd Party Integration
Hardware
Programming API
Web Related
Reporting
Security Related
AppleScript

My next steps are:

* Adding links to the profile page(s) to allow the user to navigate the site better..
* Finish the Voting system. (I am planning to allow plugin users to vote on the plugins, effectively giving feedback to the author)

------
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

Posted on
Sun Sep 18, 2011 10:24 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Plugin Catalog & Plugin Updating System

Well, I have the server running fine, and I have been working at integrating the update system into my own plugins...

I have decided to split this into a separate module... So the code now looks like:


Code: Select all
from versioncheck import VersionCheck

   def startup(self):
      version_found, update_url, plugin_name = 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 )


It is not as "clean" since the separate module can't access the Indigo log, so that is why I have placed all the reporting code into the plugin.

But this allows me to easily upgrade the Indigo Plugin check code, and each author can choose how to report the data to the user.

I'll break this down:

1) from versioncheck import VersionCheck , will import the version update check code into the module

2) The plugin_id / Bundle ID should be passed into the VersionCheck function. I typically define it in the module as "plugin_id".
eg. plugin_id = "com.schollnick.indigoplugin.Thermostat_Addons"

3) version_found, update_url, plugin_name = VersionCheck ( plugin_id )
version_found will either be none (not found), or the version of the plugin found on the server
update_url will either be none (not found), or the URL that the author has indicated the user should go to
plugin_name will either contain a error message (plugin not found on the server), or the name of the plugin that
author has set.

Just place the versioncheck file in the directory with your plugin, and add the code, and you will be checking for updates when the plugin is started.

Once again, please contact me at benjamin @ schollnick DOT net, and we can arrange to get your plugins online in the update catalog.

The module is available here... http://dl.dropbox.com/u/241415/version_ ... ck-100.zip

------
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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests