Plugin Notes

Top  Previous  Next

Plugin Notes

 

Startup and Shutdown are the only two events that are not generated by plugins.  The main application sends a Startup event the first time plugins are started after IOX is opened.  You can use the startup event to perform any one-time initialization needed.  The Shutdown event is sent just prior to stopping all plugins when IOX is being closed.

 

ConditionalBranch

ConditionalBranch is an output plugin used to branch rule output execution based on a conditional expression.

Execution will branch to the specified rule or rule output label if the Lua expression evaluates to true. The branch type can be set to a simple jump or a call with return.

A special variable named ruleRunCount can be used to test the number of times a rule has been executed. This is handy for toggle rules which may turn a device on then off in consecutive calls.

Some examples of valid Lua expression:

true

false

(2 + 2) == 4

(2 + 2) ~= 5

(ruleRunCount % 2) == 0

 

ExecuteExternal

ExecuteExternal is an output plugin used to execute an external program in response to an input event.  The program is executed synchronously, that is, IOX will not process further events until the external application finishes.

 

IRMan

The IRMan plugin listens for a 6 byte code from an Evation IRMan or compatible IR receiver. Those 6 bytes are then passed as a hex string (with no leading 0x) to IOX as an event string.

 

The input code can be entered in the text box, or learned by choosing the learn option and pointing a remote at the UsbUirt while pressing a button.  You should try pressing and holding the button as well as pressing it several time as different remotes require different methods.

 

Logger

Logger is used as an output target.  It sends a user defined text message to the IOX Log pane.

 

RealTimeClock

RealTimeClock generates an event once per minute. The generated event data format is:

yyyy-mm-dd hh:mm:ss sr[+-]##### ss[+-]#####

The 'sr' and 'ss' fields specify minutes after or before sunrise or sunset.

You will likely want to use a regular expression to match the fields of interest in the rules you define.

 

SerialComm

SerialComm reads or writes arbitrary data from or to a serial port.

 

The output data is entered as a text string, however, hex data can be specified using the form \x## where '##' is the hex byte value to send.  You must always supply both digits even if the value is less than \x10.

 

Data received from the serial port can be used to generate an event.  The input data is parsed using either a fixed field length (send an event every n characters), or a specified delimiter string.  The delimiter string can contain hex values specified with the same \x## format used in the output data string.

 

SimpleInOut

SimpleInOut generates an event at a configurable interval. The generated event data is 'SimpleInOut.Event'.

 

SimpleInOut can also be used as an output target in which case, it simply sends a text message to the IOX Log pane.

 

Note: SimpleInOut is a nearly useless plugin provided for demonstration and development purposes.  You should use RealTimeClock and Logger if possible.

 

UsbUirt

UsbUirt is a plugin used to receive and send IR codes using a USB-UIRT.

 

The USB-UIRT is a device which can not only receive IR codes (like the IRMan), but can also send IR codes in order to control almost any device which uses a standard IR remote control.

 

The format of the input code is 6 bytes, similar but not identical in value to those received by the IRMan.  The input code can be entered in the text box, or learned by choosing the learn option and pointing a remote at the UsbUirt while pressing a button.  You should try pressing and holding the button as well as pressing it several time as different remotes require different methods.

 

The format of the output code is a long (up to 2K bytes) string which fully specifies an IR command data string.  This code is in Pronto format, so the text can simply be copied from a Pronto configuration file into the output data control.  The code can also be learned by choosing the learn option and pointing a remote at the UsbUirt while pressing a button.  You should try pressing and holding the button as well as pressing it several time as different remotes require different methods.