Events have two parts, a name followed by data. Here's a list of currently implemented event names for Automated Props:
Current Events
Button
- normally just has 'clicked' as data
Switch
- normally has STATE as data - this is an event that is tracked by the server - see 'Recall'
State - 0/1 (read)
Recall - this is a special case, sent by the server to catch state of props that have been offline
Encoder
- data may have position and or delta
Position - the current position of the encoder
Delta - the change in position since the last event
Counter
- this has a rich dataset, refer to module reference
stop - stop the counter, hold current value
start - start the counter in Direction from the current value
direction 1/-1 - increment up or down
steps - the amount to increment or decrement the counter by
goto - set the current value
clear - empty the display but keep current value
jitter - introduce a specified range of randomness to the count time
glitch - 1/2 create glitchiness, 2 is more glitchy than 1
hexmode - display the value in Hex (for TM1637 driven counters)
text - attempt to show text on a seven segment display
brightness 0..7 - set brightness levels on TM1637 driven counters
random_start - (with random_end) - use values to display a random number between the given values
stop_value_down - when decrementing stop at this value
stop_value_up - when incrementing stop at this value
Clock
- this handles time but has a rich dataset - refer to reference
datetime - goto this time
start - start the clock
stop - stop the clock
reset - stop the clock and assume both hands are at the zero position
rate - effectivily a multiplier od seconds, 10 would be running 10x faster than real time
position - goto this position, measured in stepper motor steps
nudge - nudge the stepper motor for the defined hand and set this position as the new zero
sleep - remove holding current from stepper motor
wake - enable holding current to stepper motor
SceneTime
- data for the date and time of the scene - consumed by some displays
DMX
- this has a rich data set of DMX commands including fade tasks
fade (time_int) channel, value, steps - fade a channel to value in steps over time
sequence (list of sequence definitions) - run this list until another command arrives
HBridge
- handles direction and some PWM values, assuming a motor is connected
direction 1/-1 - forward/reverse
speed (num) - frequency of PWM
brake - attempt to hold position for motors that support this
targetspeed - attempt to hold at this speed in pulses per second
distance - attempt to move distance in steps - assumes a Hall effect device is measuring the actual steps
report - generate an event with current distance as payload
LinAct
- handles direction for linear actuators
stop - stop whatever motion is happening
push - push
pull - pull
LED
- this has more than you'd expect, it can handle sequences for example
duty - 0-65353 set the duty cycle of the PWM, which is typically at 5kHz
glitch (duty,[rate]) - glitch towards duty at rate
rate - set the rate of PWM fading
sequence (list of sequence definitions) - execute this sequence until another event arrives
stop - stop any sequence or fade currently running
Backlight
- similar to LED
Pulse
- this has a rich dataset for colour, speed, frequency, static colour, fadeout etc.
stop - stop any sequence
start - start any registered pattern or static colour
color (R,G,B) - register a color to be used in a pulsing pattern
static (R,G,B) - all pixels to this color
factor (int) - the amount of color to be used
steps (int) - number of steps in a pulse
freq (int) - the speed in Hz to index through steps
probability (value) - the likelihood of something happening
computer - a particular mode of pulse
flame - a flame light shader that uses colour and moves it randomly across the pixel range
stream - a shader that creates a data like moving stream - uses datasets randomly
reverse - as stream above but with a reversed direction
Blocks
- this allows for blocks to be defined and used on strings of addressable LEDs
block_number - block that commands or configuration will be sent to
start - define block start
stop - define block stop
color1 (R,G,B) - register a color to be used within a block, typically the first color
color2 (R,G,B) - register a color to be used within a block, typically tghe second color
alarm_color (R,G,B) - register a color to be used within a block, alarm state color
block_color (R,G,B) - all pixels in block_number to this color
meter - create a meter from a block of pixels, uses color1, color2 and alarm_color, threshold will set the value above which will show as the alarm colour
Meter
- data contains value, title, units etc.
calibrate - go past the zero position, intends to set the zero position for steppers with endstops
position (0..100) - goto a position that is 0-100 of full scale deflection
damping (0-5000+) - apply dampening as the needle approaches its target position
Indicator
- this is a simple object with text, subtext and colour
indtext - the indicated text
legendtext - the legend text
bezel - the colour of the bezel
Layer
- this is used as an instruction to a layered SVG graphic
layerName 0/1 - the layer to be made visible or hidden
Stepper
- this is for stepper motors - see module reference since several types are supported
target - the position to goto, in stepper steps
position - see Meter above
calibrate - go past the zero position, intends to set the zero position for steppers with endstops
sleep - remove holding current from stepper motor
wake - enable holding current to stepper motor
damping - set Meter above, only available on X27 like motor classes
Nidec
- this is a stepper motor and encoder combined - see reference NB: there are still some Gribley events about
This needs a good TODO - basically an older implementation at this point
Screebly
- this generally tells a Screebly to goto a particulary URL
url - the URL to goto
UINum hidden/visible - control visibility of elements of the UI
Recall
- this is a special case, any prop that implements recall will re-issue events that have state on receipt of a Recall event
Servo
- data for position and speed
position - the position to goto
UI
- data for HTML div to be 'hidden' or 'visible' could also contain any DOM property
Battery
- data for state and thresholds batteries running Prop Modules
Heartbeat
- network data for a Prop Module, will contain battery information if one is present
mac - MAC address
ip - IP address
volts - battery volts or 'USB' if USB powered
lowvolts - what is low volts for this device
maxvolts - what would be fully charged for this device
subscribedevents - what event names this device will listen for
Compass
- data for SVG representation of a Compass
ArtHorizon
- data for the as yet incomplete Artificial Horizon SVG UI element
NOTFS
- data for a notification object
Sequence
- a server only event that will trigger a named Sequence of events
Simulation
- a flexible event to pass data to a simulation script (which may or may not run on the server)
RefreshRules
- a server only event that causes the server to read the current version of Event mapping Rules
URL
- a server only event, asks the server to call a URL
VLC
- send events to a VLC video player instance
Special Events
There are also some special events that are not normally seen by the server:
local
- this is an event that never leaves a Prop module, typically used for Network and Calibration notifications.