Developers / Docs

Some Definitions

Before we get started, let's get some definitions out of the way:

IoX

IoX is like the brain inside ISY controllers when they're running on Unix systems. Currently IoX runs as a service on a refined version of FreeBSD on eisy and polisy.

Imagine IoX as the control center of a smart home system, managing all the connected devices like lights, switches, sensors, and even virtual services. In IoX, everything is represented as a node.

Node

A node is just a thing you can control, like a light bulb, thermostat, or a service such as weather information.

Nodes are defined by a Node Definition and include everything about the node like what properties it has and what commands you can send it or it can send you!

Properties

Properties are characteristics or features of a node, like its temperature or whether it's locked or unlocked. All properties have associated states such as 78 for temperature, 76 for set point, 50 for pressure, and unlocked for the lock.

As you can see, each of these status values have their own unit of measure such as degrees for temperature and set point, BAR or Pascal for pressure, and a list of values for the lock (locked, unlocked, jammed, etc.).

Tip

A property cannot exist without its unit of measure uom.

Unit of Measure (UOM)

UOM tells IoX what unit is being used to measure something, like Celsius or Fahrenheit for temperature. In the IoX, units of measure include the scientific units of measure as well as custom types. IoX defines a preset list of UOMs which should cover pretty much anythnig. But since the world does not stay static, additional UOMs are added regularly.

Commands

Plugins can either Accept or Send commands. Commands are actions we can do with nodes, like turning a light on or off (Accept) or execute a command on IoX (Send).

Commands can have many parameters.

Editor

An Editor defines how IoX interacts with a node in a user interface, like a dropdown menu or a number input field. It defines the set of values and the unit(s) of measure available. An editor may contain multiple <range> entries, each of which must have a unique UOM.

Editors can be scoped globally or within a property or command. If global, then all properties and command have access to it by its id.

NLS

NLS is a set of name/value pairs used to display values in national language (such as English). A single NLS file is used for each language. The naming convention is language_countryCode.txt (e.g. en_US.txt for USA English).

Scenes

The terminology for Scene has dual meanings in IoX because in some cases it describes the group of object that contain a set of controller and responder nodes, and in others it describes a single controller (and its links to responders) within a group.

Plugin

Plugins are unique applications that you will be developing! A Plugin exists to translate a device, service, or whatever you can imagine, into the format that the IoX represents as devices or nodes. Anything can be a "node" so plugins are very diverse in their design.

Plugins are defined by a simple JSON schema with a filename that ends with '''iox_plugin.json'''. In this schema, you will define your node definitions, properties, uoms, editors, and commands. Here's an example for a dimmer:

{
  "plugin": {
        "name":"dimmer",
        "description":"A dimmer",
        "publisher":"UD",
        "language": "python3",
        "executableName":"dimmer.py",
        "installScript":"install.sh",
        "documentationLink":"docs",
        "licenseLink":"license",
        "shortPoll":60,
        "longPoll":600,
        "profileVersion":"3.0.0",
        "initialLogLevel":"DEBUG",
        "enableOAUTH2":false,
        "worksOnPolisy":true,
        "worksOnEisy":true,
        "requiresIoXAccess": false,
        "requirements": [],
        "version": "1.0.0"
  },
  "editors": [
      {
          "id": "onlevel",
          "min": 0,
          "max": 100,
          "uom": "Percent | 51"
      },
      {
          "id": "ramprate",
          "min": 0,
          "max": 600,
          "uom": "Second | 57"
      }
  ],
  "nodedefs": [
      {
          "id":"dimmer",
          "name":"Dimmer",
          "icon":"GenericRspCtl",
          "properties": [
              {
                  "id":"ST", 
                  "name": "Status",
                  "editor": {
                      "idref": "onlevel"
                  },
                  "is_settable": false
              },
              {
                  "id": "RAMP_RATE",
                  "name": "Ramp Rate",
                  "editor": {
                      "idref": "ramprate"
                  } ,
                  "is_settable": true
              },
              {
                  "id": "ON_LEVEL",
                  "name": "On Level",
                  "editor": {
                      "idref": "onlevel"
                  } ,
                  "is_settable": true
              }
          ],
          "commands": {
              "accepts": [
                  {
                      "id": "on",
                      "name": "On",
                      "params": [
                          {
                              "id": "onlevel",
                              "editor": {
                                  "idref": "onlevel"
                              },
                              "name": "Level"
                          },
                          {
                              "id": "ramprate",
                              "editor": {
                                  "idref": "ramprate"
                              },
                              "name": "Ramp Rate"
                          }
                      ]
                  },
                  {
                      "id": "off",
                      "name": "Off",
                      "params": [
                          {
                              "id": "ramprate",
                              "editor": {
                                  "idref": "ramprate"
                              },
                              "name": "Ramp Rate"
                          }
                      ]
                  },
                  {
                      "id": "faston",
                      "name": "Fast On"
                  },
                  {
                      "id": "fastoff",
                      "name": "Fast Off"
                  }
              ],
              "sends": [
                  {
                      "id": "status",
                      "name": "Status",
                      "params": [
                          {
                              "id": "level",
                              "editor": {
                                  "idref": "onlevel"
                              },
                              "name": "Level"
                          }
                      ]
                  }
              ]
          } 
      }
  ]
}

Local Store

A directory on the development system (eisy/polisy) that is used for development/testing of plugins.

Beta Store

Allows you create plugin package that can be tested by beta testers.

Production Store

This the store where all the plugins are managed and which is used to allow customers to purchase, install (trial/free version), and provides license information to PG3x.

Publishing

This is the process of publishing your plugins to the Production Store.