Events
Events are called periodically by the BAC and may also be called by the user, either via network calls or other events. Each event triggers a series of up to 5 Actions with respective Options. These Actions can be used to set outputs / relays, send network requests, configure serial LEDs, and more. For details on event types see the tables below, for details on Action types see the Actions section.
Main
Events |
Description |
Called
By |
Init |
Initialization event, called on device powerup. Can be used to enable or disable BAC on start. |
Automatic: BAC startup Manual: Network call Manual: Other events |
Room_Reset |
Resets room state (resets all input events). |
Automatic: Called by Init Manual: Network call Manual: Other events |
Game_Reset |
Resets game state. |
Automatic: Called by Room_Reset Automatic: Per game Manual: Network call Manual: Other events |
Solve |
Called when prop is solved. |
Automatic: Per game Manual: Network call Manual: Other events |
Unsolve |
Called when prop is taken out of a solved state after being solved, useful for auto reset. |
Automatic: Per game Manual: Network call Manual: Other events |
Fail |
Called when an input sequence is incorrect. Game specific. |
Automatic: Per game Manual: Network call Manual: Other events |
Hit |
Called when an incremental user action is correct. |
Automatic: Per game Manual: Network call Manual: Other events |
Miss |
Called when an incremental user action is incorrect. |
Automatic: Per game Manual: Network call Manual: Other events |
Enable |
Enables prop (runs game logic). Useful for sequencing props. |
Automatic: On BAC startup (only if disable not set) Manual: Network call Manual: Other events |
Disable |
Disables prop (stops game logic). Useful for sequencing props. |
Manual: Network call Manual: Other events |
Input Events |
Description |
Called By |
Input_Event [0-7] |
Per input events. Can be disabled or set to trigger on low or high.
Can also be set to trigger once per reset (useful for room controller mode).
Will only trigger on state change (i.e. if set to trigger on high, will only
trigger when input state goes from low to high). |
Automatic: When input matches configured options Manual: Network call Manual: Other events |
Input_Event [8-15] |
Expandable
IO (FX60) input events. The input that triggers these events is configured by
the user. Can be disabled or set to trigger on low or high. Can also be set
to trigger once per reset (useful for room controller mode). Will only
trigger on state change (i.e. if set to trigger on high, will only trigger
when input state goes from low to high). |
Automatic:
When configured input matches configured options Manual:
Network call Manual:
Other events |
Custom Events |
Description |
Called By |
Custom_Event [0-7] |
User events, useful for extending events that require more than 5
actions, also useful for calling from escape room control software like M3 to
provide extra functionality. |
Manual: As configured for games that support custom events such
as RFID and Keypad Manual: Network call Manual: Other events |
Event Actions
Event actions are triggered when their respective event is called. Each action has corresponding Options. For information on Option syntax and examples see table below.
Action |
Option |
Example 1 |
Example 1 Comment |
Example 2 |
Example 2 Comment |
Turn On Output |
Comma separated value of output pin numbers |
2 |
Turns on output 2 |
0, 1, 104 |
Turns on outputs 0, 1, and 104 (FX60 output) |
|
Comma
separated names of outputs |
Output_2 |
Turns
on the output named "Output_2" |
Output_0,
IO_104 |
Turns
on the outputs named "Output_0" and "IO_104" |
|
The text "all" |
all |
Turns on all available outputs |
N/A |
N/A |
Turn
Off Output |
Comma
separated value of output pin numbers |
3 |
Turns
off output3 |
4,
5, 106 |
Turns
off outputs 4, 5, and 106 (FX60 output) |
|
Comma separated names of outputs |
Output_3 |
Turns off the output named "Output_3" |
Output_4, IO_106 |
Turns off the outputs named "Output_4" and "IO_106" |
|
The
text "all" |
all
|
Turns
off all available outputs |
N/A |
N/A |
Turn On Relay |
Comma separated value of relay pin numbers |
0 |
Turns on relay 0 |
0, 1, 114 |
Turns on relays 0, 1, and 114 (FX60 relay) |
|
Comma
separated names of relays |
Relay_0 |
Turns
on the relay named "Relay_0" |
Relay_1,
Relay_114 |
Turns
on the relays named "Relay_1" and "Relay_114" |
Turn Off Relay |
Comma separated value of relay pin numbers |
0 |
Turns off relay 0 |
0, 1, 115 |
Turns off relays 0, 1, and 115 (FX60 relay) |
|
Comma
separated names of relays |
Relay_0 |
Turns
off the relay named "Relay_0" |
Relay_1,
Relay_115 |
Turns
off the relays named "Relay_1" and "Relay_115" |
Play Sprite Video |
Index of video file, 0-254 |
0 |
Plays video index 0 |
1 |
Plays video index 1 |
Set
Sprite Loop |
Index
of video file 0-254 |
0 |
Loops
video index 0 |
1 |
Loops
video index 1 |
Play Sound |
Filename |
Sound.mp3 |
Plays an mp3 called "Sound.mp3" |
Background.mp3 |
Plays an mp3 called "background.mp3" |
Loop
Sound |
Filename |
Sound.mp3 |
Loops
an mp3 called "Sound.mp3" |
Background.mp3 |
Loops
an mp3 called "background.mp3" |
Stop Sounds |
None |
|
|
|
|
Call
Event |
Event
name |
Game_Reset |
Calls
game reset event |
Solve |
Calls
solve event |
Clear Events |
None |
|
Clears all pending events. Useful for clearing events that call
each other in a loop (i.e. event0 calls event1 calls event2 calls event0) |
N/A |
N/A |
Set
Neopixels |
Index
of strip on output (1-5 only) and RGB values 0-255. Format is index.red.green.blue |
5.255.0.0 |
Sets
NeoPixels on output 5 to full red |
1.255.255.255 |
Sets
NeoPixels on output 1 to white |
|
Index of strip on output (1-5 only), index of pixel to set, and
RGB values 0-255. Format is stripIndex.pixelIndex.red.green.blue |
5.1.255.0.0 |
Sets the 1st NeoPixel on output 5 to full red |
1.10.255.255.255 |
Sets the 10th NeoPixel on output 1 to white |
|
Index
of strip on output (1-5 only), index of pixel to set, length of pixels to
set, and RGB values 0-255. Format is stripIndex.pixelIndex:length.red.green.blue |
5.1:7.255.0.0 |
Sets
a length on output 5 of 7 NeoPixels, beginning with the 1st one to
full red |
1.10:3.255.255.255 |
Sets
a length on output 1 of 3 NeoPixels, beginning with the 10th one
to white |
Set Rfid Output |
Sets onboard relay of FX200 (special versions only) at the
specified index on (1) or off (0). Format is index.value |
0.1 |
Turns the relay of the 0th fx200 to on |
8.0 |
Turns the relay of the 8th fx200 to off |
Network
Call |
Sends
custom network request with optional payload. MQTT, M3, HMC, and ERM only.
Format takes the form string or string.payload |
specialEvent |
Sends
request /BACName/get/specialEvent |
specialEvent.True |
Sends
request /BACName/get/specialEvent With a payload of True |
Wait |
Wait time in milliseconds before the rest of the actions in the
event are called. 1000 milliseconds = 1 second |
500 |
Delays further actions in this event by half a second |
10000 |
Delays further actions in this event by 10 seconds. |