Macros are a way to dynamically execute functionality from an event or time based trigger.
Some examples of macro usage:
- Automatically powering the room on at a set time.
- Recalling DSP presets when rooms are linked.
- Triggering default routes on system startup.
Macros are composed of triggers and actions.
Triggers can be one of the following:
Event Based Trigger | Triggered when a room / device state changes. |
Time Based Trigger | Triggered when the current time matches the defined time. |
Event Based Triggers
Event based triggers have the following properties:
Property | Description |
---|---|
ID | The unique ID of the event trigger. |
Guid | The GUID of the object generating the event. |
Property | The name of the object’s property that will be monitored for the trigger. |
Key | When the property is a dictionary / map: the key that will be used to access the value that will be monitored by the trigger. |
Index | When the property is a list: the index of the value that will be monitored for the trigger. |
Value | The value which, if the property’s value is matched with, will trigger the macro. |
Events Reference – Room:
Below is a list of useful event triggers regarding the room state.
Guid | Property | Value | Key / Index | Description |
---|---|---|---|---|
room | PowerIsOn | true | – | Triggered when the room’s RoomMode property is not “Off”. |
room | PowerIsOn | false | – | Triggered when the room’s RoomMode property is “Off”. |
room | RoomMode | Presentation | – | Common room mode that is set when the room is powered on. |
room | RoomMode | Reset | – | Triggered when room “reset” is triggered from the UI. |
room | SourceIsSelected | true | AV Source ID (eg. source.pc ) | Triggered when the key (AV Source ID) is routed to ANY destination. |
room | SourceIsSelected | false | AV Source ID (eg. source.pc ) | Triggered when the key (AV Source ID) is no longer routed to ANY destination. |
room | SourceSelect | AV Source ID (eg. source.pc ) | Destination Type (eg. Main / Preview ) | Triggered when a source (referenced by AV Source ID) is routed to a destination type. |
room | SourceHasSync | true | AV Source ID (eg. source.pc ) | Triggered when a source (referenced by AV Source ID) has input sync detected on any of its defined Video Sync Devices. |
room | SourceHasSync | false | AV Source ID (eg. source.pc ) | Triggered when a source (referebced by AV Source ID) that previously had input sync detected, has lost sync. |
room | RoomOccupied | true | – | Triggered when the room’s sensors have detected occupancy. |
room | RoomOccupied | false | – | Triggered when the room’s sensors are not detecting occupancy. |
Events Reference – Room Link:
Below is a list of useful event triggers regarding the room link state.
Guid | Property | Value | Key / Index | Description |
---|---|---|---|---|
roomlink | SecondaryRoomStatus | secondary | Room Link Room ID. (eg. room.1 ) | Triggered when we link with the given room link room, and we are the primary room. (Note room link room ID refers to Room Link / Secondary Rooms / ID) |
roomlink | SecondaryRoomStatus | primary | Room Link Room ID. (eg. room.1 ) | Triggered when we link with the given room link room, and we are the secondary room. (Note room link room ID refers to Room Link / Secondary Rooms / ID) |
roomlink | SecondaryRoomStatus | unlinked | Room Link Room ID. (eg. room.1 ) | Triggered when the room of the given ID becomes unlinked from us (it was previously primary or secondary). |
Events Reference – Audio:
Below is a list of useful event triggers regarding the room’s audio states.
Guid | Property | Value | Key / Index | Description |
---|---|---|---|---|
audio | CeilingMicsMuted | true | – | Triggered when ceiling microphons are muted. |
audio | CeilingMicsMuted | false | – | Triggered when ceiling microphones are unmuted. |
audio | ChannelAudioLevel | 100 | Audio Source Channel ID (eg. mic.1 ) | Triggered when the given Audio Source Channel ID has its level adjusted. Value is percentage (0-100). |
audio | ChannelAudioMute | true | Audio Source Channel ID (eg. mic.1 ) | Triggered when the given Audio Source Channel ID is muted. |
Events Reference – Cameras:
Below is a list of useful event triggers regarding the room’s camera states.
Guid | Property | Value | Key / Index | Description |
---|---|---|---|---|
camera | CameraPower | true | Camera Device ID (eg. dev.camera.1) | Triggered when the given camera device ID is powered on. |
camera | CameraSelected |
| Camera Device ID (eg. dev.camera.1) | Triggered when the given camera device ID is selected for control on the user interface. |
Time Based Triggers
Time based triggers will trigger the macro at the defined date and time.
Time based triggers have the following properties:
Property | Description |
---|---|
ID | The unique ID of the time trigger. |
Time | The time of day (in 24 hour time, HH:mm:ss) that the macro will trigger. |
Days | The day/s of the week on which the macro is to trigger. Accepts comma delimited day of week names, or the values “Weekday” or “Weekend”. |
Macro Actions Reference
Macro actions define what will happen when the macro is triggered.
Actions have the following properties:
Property | Description |
---|---|
ID | The unique ID of the macro action. |
Script | The lambda expression for the action. |
Delay | The delay, in seconds, between the macro being triggered and the script being run. |
Device ID | For scripts containing the “Device” keyword, the ID of the device it refers to. |
Macro Actions – Room
Below is a list of useful actions that can be performed against the room.
Script | Description |
---|---|
room.SetSourceSelect("source.pc", "Main Display"); | Routes the provided Source ID to all destinations with the provided Destination Type. |
room.SetSourceSelect("None", "Main Display"); | Clears the route and triggers Source Deselection Behaviour on all destinations with the provided Destination Type. |
room.SetSourceSelect("Off", "Main Display"); | Triggers the Shutdown Behaviour on all destinations with the provided Destination Type. |
room.SetPreview("source.pc"); | Routes the provided Source ID to all preview destinations. |
room.SetRoomMode("Off"); | Powers off the room. |
| Sets the room mode to presentation. If the room is off: powers it on. |
room.SetDestinationGroupSourceSelect("dest.group.left", "source.pc"); | Routes the provided Source ID to the provided Destination Group ID. |
room.RouteEncoderDecoderStreamByDeviceId("dev.encoder.1", "dev.decoder.1"); | Set the provided decoder’s audio & video streams to the encoder’s audio & video streams. |
room.RouteEncoderDecoderVideoStreamByDeviceId("dev.encoder.1", "dev.decoder.1"); | Set the provided decoder’s video stream to the encoder’s video stream. |
room.RouteEncoderDecoderAudioStreamByDeviceId("dev.encoder.1", "dev.decoder.1"); | Set the provided decoder’s audio stream to the encoder’s audio stream. |
room.PairUsb("dev.remote.device", "dev.local.device"); | Pairs the USB peripherals (keyboard/mouse/etc) on the Remote Device to the USB device (PC) on the Local Device on the first available USB route slot, otherwise on the 1st route slot. Remote Device is generally connected to USB peripherals eg. keyboard mouse. Local Device is generally connected to a PC. |
room.PairUsb("dev.remote.device", "dev.local.device", 3); | Same as above action, but the route is forced on the index provided. (In this example: 3) |
Macro Actions – Room Link
Script | Description |
---|---|
room.SetDestGroupIfPrimary("dest.group.left", "source.pc"); | If the room is currently linked as a primary room, routes the given source to the given destination group. |
room.SetDestGroupIfSecondary("dest.group.left", "roomlink"); | If the room is currently linked as a secondary room, routes the given source to the given destination group. |
Macro Actions – Video
Script | Description |
---|---|
video.ActivateAllMotors(); | Extends all motors defined against AV displays. |
| Retracts all motors defined against AV displays. |
video.SetDestinationDisabled("display.1", true); | Disables / enables the AV destination with the provided ID. When a destination is disabled it will trigger its shutdown behaviour, and will not be routed to. |
Macro Actions – Audio
Script | Description |
---|---|
audio.ResetAudioChannelLevels(); | Resets every audio channel to their default level. |
audio.SetAudioLevel("prog.audio", 50); | Set the fader level (percentage, 0-100) of the audio source with the provided ID. |
audio.SetAudioMute("prog.audio", true); | Mute / unmute the audio source with the provided ID. |
Macro Actions – Display Devices
Script | Device ID | Description |
---|---|---|
device.SetPowerOn(); | dev.display.1 (Device ID of display we are controlling) | Powers on the display and sets the default volume and input. |
device.PollPowerOn(); | dev.display.1 | Polls the display for its power state, and if the display is off: sends a power on command. |
device.SetInput("Hdmi1"); | dev.display.1 | Sets the display’s input to Hdmi1. |
device.SetVideoMute(true); | dev.display.1 | Video mutes the display. |
device.SetVideoMute(false); | dev.display.1 | Unmutes the display (video mute). |