Developers / Docs / Pkgpublish

Publishing

Publishing a plugin means making it available to be installed by PG3 or PG3x. There are 3 Plugin Stores and as a developer, you can publish your plugin into any (or all) of these stores. Once a plugin has been published to a plugin store, and has been marked as available, it will show up in the PG3(x) plugin Store page in PG3(x).

The different plugin stores are available to separate plugins in various states of development.

Plugin Stores

Local

Each instance of PG3(x) has a local plugin store. This is a store that maintained only in the PG3(x) database and is not accessible to any other instance of PG3(x). Publish to this store while developing and testing your plugin.

Non-Production

Or Beta is a plugin store for plugins that are not ready for production. If you want/need wider testing of your plugin, and expect to be making changes frequently, publishing to the non-production store makes the plugin available to everyone. However, it is important to set user expectations such that they realize plugins in the non-production store may be less stable, have bugs, and change frequently.

Production

For all generally available plugins. Once published here, users will expect a working, stable plugin.

Plugin ID

plugin's are identified by a unique plugin id (or nsid). You can publish the same plugin, with the same nsid to multiple stores. When the nsid is the same, user's can install/re-install from any store that has a plugin with that nsid. Specifically, if you first publish to the non-production store and a user installs the non-production version. Then you copy the plugin/nsid to the production store, the user can then re-install from the production store without having to get a new license.

However, if you publish to the production store with a new nsid, users who installed from the non-production store will be required to get a new license to install from the production store.

Tip

Keeping track of what nsid is being used in each store submission is very important. If you change the nsid of your store entry when updating, you force the users to get new licenses for your plugin. They won't be happy if they have to purchase new license because you mistakenly changed the nsid.

Developer Tools

The PG3 plugin developer tools menu allows you list all of your published plugins, submit new plugins to be published, and edit information about your published plugins.

Note

To get to this menu:

  1. You need to be vetted as a developer
  2. logged into the PG3(x) instance on your eisy or polisy
  3. Your eisy/polisy must be registered in your ISY Portal account

Add New Plugin

From the menu, select "Add new plugin" and you will be presented with a form that allows you to enter all of the information about the plugin you wish to publish. The form will provide some guidance on required fields and field formatting. Once you have entered all of the information, scroll to the bottom of the form. Make sure you have selected the correct store and click the "Submit to NS Store" button. You should then get a dialog box letting you know your submission was successful. If the submission wasn't successful, the most likely reason is because you are missing some required piece of information.

Form Fields

Name [required]

The name of the plugin. This will be displayed everywhere so should be meaningful. Limited to 14 characters and no spaces

Author [required]

The person who authored the plugin. This is displayed in the store listings. May be an email address.

Language [required]

What language is the plugin written in. Used to determine how to run the plugin. For example, a plugin written in Python needs to use the Python interpreter to run the plugin. Valid choices are Python (3.x), Node.js, or binary.

Executable Name [required]

The file name that PG3(x) will execute when starting the plugin.

Documentation [required]

This is a URL that points to additional documentation on the plugin. For example you may want to point this at a user's manual for the plugin. The URL must be generally accessible. The plugin store will create a button that redirects to this URL.

Link to License [required]

This is a URL that points to the EULA for your plugin. Should be generally accessible. The plugin store will create a button that redirects to this URL.

Short Poll (seconds) [required]

This is the default short poll interval. PG3(x) will send a poll command to your plugin at this interval. Valid entries are 1 - MAXINT.

Long Poll (seconds) [required]

This is the default long poll interval. PG3(x) will send a poll command to your plugin at this interval. Valid entries are 1 - MAXINT. This also must be greater than the short poll interval

Version [deprecated]

Multiple versions can now be supported, use the version field in the purchase options to identify the plugin version.

Profile Version [required]

The version of your plugin's profile files. Currently 3.

Install Script [required]

The name of the script that will be run during plugin installation. For Python based plugins you'll want to run pip to installed required Python libraries. For Node.js based plugin you'll want to run npm to install required node modules.

Persistent Folder [optional]

A folder name that your plugin creates in the plugin home directory after the plugin is installed. This folder can hold persistent configuration info that will survive a re-install process.

Status [required]

Status can be one of three states:

  • New - added to store, but not displayed in store listings
  • Active - displayed in store listings, available to install
  • Inactive - not displayed in store listings, but available for existing users to re-install see below for more details on the status values

Initial Log level [required]

Sets the level of logging after the plugin is installed. Users can change this at any time.

  • Critical - only messages marked as critical will be logged
  • Error - messages marked error or critical will be logged
  • Warning - messages marked warning, error or critical will be logged
  • Info - messages marked info, warning, error, or critical will be logged
  • Debug - messages marked debug, info, warning, error, or critical will be logged

NS Info Poll [optional]

How often PG3 will send plugin info to your plugin. This is only used for a very specific type of plugin, probably not yours.

Enable Discovery [optional]

When checked adds a "Discover" button to the PG3(x) plugin details page in the UI. When the user clicks the "Discover" button an event will be sent to your plugin. Used for user initiated device discovery operations.

Enable OAuth2 [optional]

When checked your plugin can route OAuth2 handshaking through PG3(x). See OAuth HowTo for more details.

Works on Polisy [optional]

When checked adds text to the plugin information text saying that this plugin works on Polisy controllers (checked by default)

Works on eisy [optional]

When checked adds text to the plugin information text saying that this plugin works on eisy controllers (checked by default)

Description [required]

A text description of your plugin. This is displayed as part of the store listing so should be fairly brief.

Custom Parameters [optional]

You can enter a JSON string here that defines the default key/value pairs that make up the custom parameters your plugin uses for configuration. For example:

{"username":"","password":""}

will create two custom parameters, one for username and one for a password. Both will be blank by default.

Device Configuration [optional]

A description of how to set up devd type hardware device info. PG3x will use this to enable specific hardware devices for use by your plugin. For example a USB IR receiver.

OAuth Configuration [optional]

See OAuth HowTo for more details.

Plugin Custom Data [optional]

Text data that is sent to your plugin at install time. For example, if you have a secret key that is needed for API communication but you don't want to embed the key in the source code, you can specify the key here. When you plugin starts, it can subscribe to the NSCustom event and PG3(x) will send this data over that event to your plugin. This is pushed out periodically so it can be updated by the developer at any time.

ReadMe Text [optional]

This is where you put the full description of your plugin and can include any specific info the user may need to use your plugin. Basically your plugin documentation.

Change Log [optional]

Can be a list of changes or a list of changes by version for your plugin. It's way to notify users what has changed in each new version.

Select Store to submit to [required]

Which plugin store; Production, Non-Production, or Local to save this to. Note that you can edit an entry in one store and then save it to another. However, keep in mind the nsid discussed earlier. Don't edit an existing plugin and try to use that as a template for a new plugin. Your new plugin will have the same nsid as the original which is probably not what you want. Use the Add New Node Server/Plugin to add a new plugin to the, edit and switch stores to copy an existing plugin to a different store.

Purchase Options

Add Purchase Option [minimum of one purchase option required]

Clicking this opens a new form where you enter the details for a specific version/option of your plugin. See below for more details.

Version [required]

Version number

Edition [required]

Free, Standard, Professional

Option Type [required]

Purchase type; Perpetual, Subscription, Trial, Upgrade, Edition Upgrade

Cost [required]

Maybe zero for a free plugin. Must be a number.

Installation URL [required]

Where will PG3(x) find the plugin to install it

Branch [optional]

If the install URL is a git repository, what branch do you want it to use

Choose File [optional]

If your plugin is packaged as a .zip or .tgz file, you can upload that package to UDI's secure S3 plugin storage area and the Installation URL will be updated to point there.

Submit to NS Store

Click this when you have everything filled out and are ready to send it to a store.

More details on plugin status

The "Status" field can be set to "New", "Active", "Inactive". New submits the info to the store database but does not make it available to users. Active means the plugin is available and Will show up in PG3's plugin store listing. Inactive will remove the plugin from PG3's plugin store listing, but not remove it from the database. If Inactive is set, no one will be able to make new purchases of the plugin but existing purchases will still function.

More details on purchase options

Your plugin must contain at least one purchase option or no one will be able to install the plugin. Use the "Add Purchase Option" button to open a dialog box and create a purchase option. You can have 3 basic types of purchases:

  • Trial - Allow free access for a specific period. Once the trial period is over, the plugin will stop running
  • Perpetual - A one-time purchase that allows the purchaser to install and use the plugin for as long as it is available.
  • Subscription - A time limited purchase. If the subscription is not renewed with-in the subscription period, the plugin will stop running until it is renewed
  • Trial purchases are time limited and have no cost associated with them.
  • Perpetual purchases can be set to any price including zero ($0) if you don't want to charge for the plugin.

Additional sub-types of purchases are also available but not yet fully functional. The PG3 store will support multiple tiers or editions of a node plugin. Currently there are three edition types:

  • Free - A free edition. This should be free to install and use.
  • Standard - A step up from the free edition. More features should be enabled.
  • Professional - More features and capabilities should be available.

Customers should be able to upgrade from one edition to a higher edition for the difference in cost between the two.

You can also create purchase options to charge for upgrades. An upgrade purchase option allows you to charge an additional fee to upgrade from one version to another. The system uses the version number to determine what will be upgraded. I.E. if the customer has purchased version 1.0.0 and you make a version 2.0.0 available as an upgrade. Any version between 1.0.0 and less than 2.0.0 would be considered a free update. Any 1.x.x version could then be upgraded to 2.0.0 at the upgrade cost.