ARES Scripts

3 Python scripts are included with your Actions Relay Event Service (ARES) installation. Each script is designed to work with a different third party relay device that can electronically lock or unlock doors. The scripts are located here:

To run these scripts from the command line, do the following:

  1. If it's not already installed, install the latest version of Python 3.X. The Python installer can be downloaded from here: https://www.python.org/downloads/.
  2. Run the script in question. On Windows:
    1. Open Command Prompt (Admin) or Windows PowerShell (Admin) by right clicking on the Windows Start menu (located in the bottom left corner of the screen) and selecting the appropriate entry.
    2. Navigate to C:\Program Files\RealNetworks\SAFR\ares\scripts.
    3. Run python <script syntax>.
    On Linux:
    1. Open Terminal.
    2. Run sudo python /opt/RealNetworks/SAFR/ares/scripts/<script syntax>.
    On macOS:
    1. Open Terminal.
    2. Run python /Library/RealNetworks/SAFR/ares/scripts/<script syntax>.

To run these scripts from with SAFR actions, do the following:

  1. If it's not already installed, install the latest version of Python 3.X onto the machine where ARES is installed. The Python installer can be downloaded from here: https://www.python.org/downloads/.
  2. Within the SAFRActions.config file, set the rules -> Item X -> triggers -> Item 1 -> action -> Item 1 key to the following value:
    • On Windows: python ./scripts/<script syntax>
    • On Linux: sudo python ./scripts/<script syntax>
    • On macOS: python ./scripts/<script syntax>

relay-x410 Script

This script uses the X-410 Relay to lock and unlock doors. The syntax to use the script is as follows:

Usage: relay-x410.py <relayHost> <relayNumber>

Example:

relay-x410.py 192.168.1.2 1

relay-numato Script

This script uses a Numato USB Relay to lock and unlock doors. The syntax to use the script is as follows:

Usage: relay-numato.py <relayNumber> <delay> [tty.device]

Optional arguments:

Example:

relay-numato.py 0 5

or

relay-numato.py 0 5 /dev/tty.usbmodem1411

relay-lcus Script

This script uses an LCUS USB relay to lock and unlock doors. The syntax to use the script is as follows:

usage: relay-lcus.py [-h] [-p PORT] [-b {9600}] [-r {1,2,3,4}] [-d] [-q] <delay>

Optional arguments:

See Also