Apollo Art PEx Power Control
1 Interface
Bank%
bank%
new
command
list-relays
list-faders
get-relay
get-fader
Relay%
relay%
new
get-status
get-on?
set-on!
Fader%
fader%
new
get-status
get-level
set-level!
fade-to-level!
8.12

Apollo Art PEx Power Control🔗ℹ

Jan Dvořák <mordae@anilinux.org>

 (require pex) package: pex

This library allows for full control of PEx devices from Apollo Art. These devices provide power switching and fading capabilities and are typically installed in large, intelligent rooms.

1 Interface🔗ℹ

syntax

Bank%

Type of the bank% class.

class

bank% : class?

  superclass: object%

Collection of relays and faders on a single bus.

constructor

(new bank% [path path] [id id])  (is-a?/c bank%)

  path : Path-String
  id : Positive-Integer
Connect to the bus using a serial port device on given path and scan bank with given id for any relays or faders.

method

(send a-bank command head body)  String

  head : String
  body : String
Execute a raw PEx BUS command. Please refer to the manual for more information.

method

(send a-bank list-relays)  (Listof Positive-Integer)

List identifiers of relays found on the bus, within given bank.

method

(send a-bank list-faders)  (Listof Positive-Integer)

List identifiers of faders found on the bus, within given bank.

method

(send a-bank get-relay id)  (Instance Relay%)

  id : Positive-Integer
Return an object representing specified relay.

method

(send a-bank get-fader id)  (Instance Fader%)

  id : Positive-Integer
Return an object representing specified fader.

syntax

Relay%

Type of the relay% class.

class

relay% : class?

  superclass: object%

Represents a single relay switch from given bank.

constructor

(new relay% [bank bank] [id id])  (is-a?/c relay%)

  bank : (Instance Bank%)
  id : Positive-Integer

method

(send a-relay get-status)  String

Retrieve internal relay status string.

method

(send a-relay get-on?)  Boolean

Retrieve relay power status.

method

(send a-relay set-on! on?)  Void

  on? : Boolean
Modify relay power status.

syntax

Fader%

Type of the fader% class.

class

fader% : class?

  superclass: object%

Represents a single fader from given bank.

constructor

(new fader% [bank bank] [id id])  (is-a?/c fader%)

  bank : (Instance Bank%)
  id : Positive-Integer

method

(send a-fader get-status)  String

Retrieve internal fader status string.

method

(send a-fader get-level)  Natural

Get fader power level ranging from 0 to 99.

method

(send a-fader set-level! level)  Void

  level : Natural
Set fader power level ranging from 0 to 99. Larger level is treated as 99.

method

(send a-fader fade-to-level! level)  Void

  level : Natural
Fade power level from current value to the new level with duration of one second.

Fader may ignore some values inside the range, so experiment and learn what values work for your system. It is generally not possible to fade out to 0. You need to fade out to e.g. 20 and then (send a-fader set-level! 0).