Embedded Applescripts and RFID Plugin
Posted: Mon Jul 01, 2013 7:51 am
The architecture of AppleScript requires Embedded scripts to be executed in the main thread of the Indigo application. When an embedded AppleScript executes, the Indigo Server stops processesing EVERYTHING else until the execution of the Applescript is completed.
With most serial interfaces such as X10, Insteon, Zwave, this delay might not result in any undesireable operation or symptoms other than a delay in operating a device.
With the RFID data stream however, timing is critical. With the RFID Plugin, Polling is real time, ALL of the time and the suspension of processing will have an adverse impact on polling and the resulting data. The Plugin is expecting responses from the reader even when no tags are preset at the RFID reader, If the RFID polling and access to the Indigo Database is interrupted, CRC errors or other errors can result.
To avoid this "stall" of Indigo, we recommend that AppleScript actions be executed as self contained external scripts, so that any pause created by an embedded script does not inhibit the plugin's access the Indigo Server's database.
Please see:
http://www.perceptiveautomation.com/wik ... pplescript
With most serial interfaces such as X10, Insteon, Zwave, this delay might not result in any undesireable operation or symptoms other than a delay in operating a device.
With the RFID data stream however, timing is critical. With the RFID Plugin, Polling is real time, ALL of the time and the suspension of processing will have an adverse impact on polling and the resulting data. The Plugin is expecting responses from the reader even when no tags are preset at the RFID reader, If the RFID polling and access to the Indigo Database is interrupted, CRC errors or other errors can result.
To avoid this "stall" of Indigo, we recommend that AppleScript actions be executed as self contained external scripts, so that any pause created by an embedded script does not inhibit the plugin's access the Indigo Server's database.
Please see:
http://www.perceptiveautomation.com/wik ... pplescript