Blink Effect

Format

{
  "Type": "BlinkEffect",
  "Config": {
    "OnTime": <int>,
    "OffTime": <int>,
    "OnColor": <LedColorProvider>,
    "OffColor": <LedColorProvider>,

    "ColorGenerationMethod": <enum>,
    "Trigger": <Trigger>
  }
}

Variables

OnTime

Effect “on” state time.

Note: Value in miliseconds.

Required: No
Default value:

1000

Example:

"OnTime": 500

OffTime

Effect “off” state time.

Note: Value in miliseconds.

Required: No
Default value:

1000

Example:

"OffTime": 500

OnColor

A Led Color Provider object used when the effect is in “on” state.

Required: Yes
Default value:

Example:

{
  "Gradient": [
    [0, [255, 0, 0]],
    [0.5, [0, 255, 0]],
    [1.0 [255, 0, 0]]
  ]
}

OffColor

A Led Color Provider object used when the effect is in “off” state.

Required: No
Default value:

Example:

{
  "Gradient": [
    [0, [255, 0, 0]],
    [0.5, [0, 255, 0]],
    [1.0 [255, 0, 0]]
  ]
}

ColorGenerationMethod

Tells the effect how to generate colors for multiple devices. The actual behaviour is depended on the effect implementation.

Allowed values:

  • "PerPort" - Duplicates the effect on each device.
  • "SpanPorts" - Treats multiple devices as one.

Required: No
Default value:

"PerPort"

Example:

"ColorGenerationMethod": "SpanPorts"

Trigger

Instance of a Trigger plugin.

Required: Yes
Default value:

Example:

"Trigger": {
  "Type": "AlwaysTrigger"
}

Example