Developers / Docs / IoX
Editors
Editors define the range of values that are permissible for commmands and parameters. e.g.
| editor | id | The name of the editor
Note: Name must not begin with '_' (reserved for encoded Editor IDs) |
| range | uom | The unit of measure of the value (See Units of Measure)
|
| nls | Used for percent (51) and index (25) units of measure only. The NLS prefix to use for the name of value.
e.g. for nls="IX_I_RR" value 5, the NLS entry would be:
IX_I_RR-5 = 8 seconds | |
| range (1) | subset | The subset of values supported is defined as a set of ranges and individual values. They must be in increasing value with no duplicates or overlap. Ranges are separated by a '-', individual digits are separated by a ','.
|
| range (2) | min | The minimum value (inclusive) |
| max | The maximum value (inclusive) | |
| step | The number to increment with each step (e.g. in a spinner type widget) | |
| prec | The number of decimal places to keep for the value |
Example:
<editors>
<editor id="I_OL">
<range uom="51" subset="0-100" />
<range uom="56" subset="0-255" />
</editor>
<editor id="TEMP_C">
<range uom="4" min="4.5" max="32" step="0.5" prec="1" />
</editor>
<editor id="I_RR">
<range uom="25" subset="0-32" nls="IX_I_RR_" />
</editor>
</editors>
Encoded Editor ID
For simple editors, rather than referencing an editor defined within an xml file, the ID itself can be encoded in a way that fully defines the editor. The following describes the supported encodings. An encoded editor ID may be used anywhere an editor is referenced (e.g. status, command parameters, etc.)
| Editor ID Encoded Format | Implied XML (by example) |
|---|---|
| _<uom>_<prec> |
<editor id="_17_1">
<range uom="17" prec="1"
min="-2147483647"
max="2147483647" />
</editor>
|
| _<uom>_<prec>_N_<nls> |
<editor id="_17_1_N_IXN">
<range uom="17" prec="1"
min="-2147483647"
max="2147483647"
nls="IXN" />
</editor>
|
| _<uom>_<prec>_R_<min>_<max>
|
<editor id="_17_2_R_m5_10"> <range uom="17" prec="2" min="-5" max="10" /> </editor> |
| _<uom>_<prec>_R_<min>_<max>_N_<nls>
|
<editor id="_17_0_R_0_10_N_IXRR">
<range uom="17" prec="0"
min="0" max="10"
nls="IXRR" />
</editor>
|
| _<uom>_<prec>_S_<lowMask> |
<editor id="_17_1_S_FF00FF00">
<range uom="17" subset="8-15,24-31" />
</editor>
|
| _<uom>_<prec>_S_<lowMask>_N_<nls> |
<editor id="_17_1_S_FF00FF00_N_IXN">
<range uom="17" subset="8-15,24-31" nls="IXN" />
</editor>
|
| _<uom>_<prec>_S_<lowMask>_<highMask> |
<editor id="_17_1_S_FF00FF00_03E">
<range uom="17" subset="8-15,24-31,33-37" />
</editor>
|
| _<uom>_<prec>_S_<lowMask>_<highMask>_N_<nls> |
<editor id="_17_1_S_FF00FF00_03E_N_IXN">
<range uom="17" subset="8-15,24-31,33-37" nls="IXN" />
</editor>
|
Example:
e.g. <st id="CLITEMP" editor="_17_1_N_IXN" />
System Editors
System editors are editors supplied by and maintained by the IoX.
- In the GUI, system editors act the same as other editors.
- All system editors have an id with a prefix of sys.
- System editors are only allowed on command parameters (not status).
First Available
System Editors became available in IoX 5.4.2.
_sys_notify_short
The _sys_notify_short system editor provides the list of user created custom notifications.
When a command with a parameter using the _sys_notify_short system editor is submitted to the IoX, the custom notification it specifies is formatted by the IoX into a string as follows:
- If there is a subject in the notification then only the subject is used
- If there is no subject then the body is used
- Maximum of 80 characters are returned
- The resulting string is then used as the command parameter rather than the ID of the custom notification.
Example:
If IoX receives the following command with a parameter using _sys_notify_short.
/rest/nodes/n015_t1/cmd/SHOW?GV1.uom146=2
Then the IoX finds notification id=2, formats it, and sends the resulting string as follows to the plugin.
UOM
Note the UOM being used is the one reserved for this system editor.
/n15/nodes/n015_t1/cmd/SHOW?GV1.uom145=Hello%20World
UOM
Note the UOM changed to 145 (Text)
Could also be in this format (unnamed parameter):
/rest/nodes/n015_t1/cmd/SHOW/2/146
/n15/nodes/n015_t1/cmd/SHOW/Hello%20World/145
_sys_notify_full
First Avaialble
Introduced in version 5.6.1.
The _sys_notify_full system editor provides the list of user created custom notifications.
Command parameters using the _sys_notify_full system editor cause the IoX to format the specified notification into XML with subject, body, from, and mimetype tags.
The resulting XML is then used as the command parameter value rather than the ID of the custom notification.
Example:
If IoX receives the following command with a parameter using _sys_notify_full.
/rest/nodes/n015_t1/cmd/SHOW?NOTIFY.uom148=3
Then the IoX finds notification id=3 and formats it into XML. Rather than sending a GET request to the plugin as is normally done, the entire command is converted to XML and sent to the plugin using POST.
UOM
Note the UOM being used is the one reserved for this system editor.
POST /n15/nodes/n015_t1/cmd
..header..
<cmd id="SHOW" requestId="5">
<p id="NOTIFY">
<val uom="147">
<![CDATA[<notification id="3"><formatted><mimetype>text/plain</mimetype><from>My Notifications</from><subject>Kitchen Motion Sensor</subject><body>The kitchen motion sensor has been triggered < 10 times today.</body></formatted></notification>]]>
</val>
</p>
</cmd>
UOM
Note the UOM changed to 147 (XML)