Skip to content

Supported Inputs and Outputs

Martin Mueller edited this page May 24, 2023 · 9 revisions

Supported Inputs

The configuration has been modified to support multiple (two) input types concurrently. For example you can select E1.31 and Effects at the same time. E1.31 will have higher priority than Effects. Valid input types are:

  • Alexa
  • DDP
  • E1.31
  • Effect Engine
  • FPP Remote / FSEQ file auto Play / Play Lists
  • MQTT

Alexa Support

Alexa is supported in direct mode. No additional hubs or applications are needed. When Alexa is selected as an input mode, the ESP will be discoverable by the Alexa app as a device that supports 24 bit color. The entire output buffer will be treated (from Alexa's point of view) as a single light bulb. Connect by giving your device a name in the device config screen and then telling alexe "alexa discover new devices" When adding the ESPixelstick using the alexa app: Select devices, add device, device type = light, manufacturer is "other", discover devices.

DDP

No additional configuration is needed for DDP Support. Simply select it as an input mode and it will listen for DDP messages being sent to the ESP

E1.31

E1.31 requires additional configuration:

  • Starting Universe
  • Channels / universe
  • Offset into the first universe to first channel (Typically zero)

Effect Engine

Effect engine provides a list of effects and colors for the effects. Effects will repeat until the engine is turned off.

FPP Remote / Play FSEQ

FPP / FSEQ support allows the ESP to play files stored on a local SD card. The configuration allows the SPI pins used for the SD Card to be set.

  • When the "FSEQ File to Play" configuration parameter is set to "Play Remote Sequence", the ESP will respond to FPP Sync and play commands.
  • When the "FSEQ File to Play" configuration parameter is set to one of the files stored on the ESP, the ESP will play that file on an endless loop.
  • When the "FSEQ File To Play" configuration parameter is set to a file with a .pl extension, the file will be parsed and used to control a set of actions performed by the FPP Play List Player.

NOTE: The ESP will only be discoverable on the network when set to "Play Remote Sequence." When a file is selected controllers will not see the ESP.

Button control is provided for the effects and local file play functionality. When trigger effect/file is enabled:

  • Button configuration:
  • GPIO is configurable. GPIO 0 is the default
  • Long press vs Short press time is configurable. 2s default
  • Active state (high low) is configurable. Active low is the default
  • Internal pullup is automatically applied to the GPIO
  • Press Actions
  • Long Press (greater than timeout) - Toggle effect/file on/off (play/dark)
  • Short Press (less than timeout) - Move to next effect / file

Play List

The ESPixelstick can follow a set of instructions found in a play list file. A playlist file can have any name and up to 20 actions to take. Play List actions are one of the following:

  • Play a file (must be an fseq file)
    • Requires the Filename and the number of times to play the file (max 255)
  • Play an effect (Effect list can be found in the Effect configuration dropdown)
    • Requires an effect configuration that includes how long to play the effect (max 1000 seconds)
  • Pause
    • Requires a time value (up to 1000 seconds)
  • The play list file is case sensitive.
  • The effect configuration sections must be present for the effects to function properly.

Here is an example of a Play List File:

[
    {
        "type": "file",
        "name": "MySequence.fseq",
        "playcount": 2
    },
    {
        "type": "pause",
        "duration": 5
    },
    {
        "type": "effect",
        "duration": 10,
        "config": {
            "currenteffect": "Chase",
            "EffectSpeed": 6,
            "EffectReverse": false,
            "EffectMirror": false,
            "EffectAllLeds": false,
            "EffectBrightness": 1,
            "EffectBlankTime": 0,
            "EffectWhiteChannel": false,
            "EffectColor": "#0000ff"
        }
    },
    {
        "type": "effect",
        "duration": 5,
        "config": {
            "currenteffect": "Rainbow",
            "EffectSpeed": 6,
            "EffectReverse": false,
            "EffectMirror": false,
            "EffectAllLeds": false,
            "EffectBrightness": 1,
            "EffectBlankTime": 0,
            "EffectWhiteChannel": false,
            "EffectColor": "#b700ff"
        }
    },
    {
        "type": "effect",
        "duration": 10,
        "config": {
            "currenteffect": "Blink",
            "EffectSpeed": 6,
            "EffectReverse": false,
            "EffectMirror": false,
            "EffectAllLeds": false,
            "EffectBrightness": 1,
            "EffectBlankTime": 0,
            "EffectWhiteChannel": false,
            "EffectColor": "#FF0055"
        }
    },
    {
        "type": "file",
        "name": "MyOtherSequence.fseq",
        "playcount": 1
    },
    {
        "type": "pause",
        "duration": 5
    }
]

MQTT Support

MQTT can be configured via the web interface. Payloads for commands and state follow the Home Assistant MQTT Light JSON Schema. The configured topic is used for state and the command topic will be a sub-topic appended with /set. There is a /status sub-topic as well used for LWT and will be either online at boot or offline when LWT is triggered.

The default topic is unique and generated from your hardware MAC address, for example: forkineye/esps-a1c2d3 would contain state. forkineye/esps-a1c2d3/set would be used for setting state and forkineye/esps-a1c2d3/status would be used for LWT / availability status.

If using Home Assistant, it is recommended to enable Home Assistant Discovery in the MQTT configuration. When doing so, your ESPixelStick will be automatically added into Home Assistant as a MQTT Light utilizing the JSON schema with all effects available and using "Device ID" as the name. When disabling Home Assistant Discovery, ESPixelStick will attempt to remove its configuration entry from your MQTTT broker.

For manual configuration, you can use the following as an example.

light:
  - platform: mqtt
    schema: json
    name: "Front Porch ESPixelStick"
    state_topic: "forkineye/esps-a1c2d3"
    command_topic: "forkineye/esps-a1c2d3/set"
    brightness: true
    rgb: true
    effect: true
    effect_list:
      - Solid
      - Blink
      - Flash
      - Rainbow
      - Chase
      - Fire flicker
      - Lightning
      - Breathe
      - playFseq

Here is an example of playing an fseq file via mqtt

light:
  - platform: mqtt
    schema: json
    name: "Porch ESPixelStick"
    state_topic: "forkineye/esps-a1c2d3"
    command_topic: "forkineye/esps-a1c2d3/set"
    effect: playFseq
    filename: NameOfFileToPlay
    count: 5

Here's an example using the mosquitto_pub command line tool:

mosquitto_pub -t forkineye/esps-a1c2d3/set -m '{"state":"ON","color":{"r":255,"g":128,"b":64},"brightness":255,"effect":"solid","reverse":false,"mirror":false}'

An example of playing a file three times:

mosquitto_pub -t forkineye/esps-a1c2d3/set -m '{"state":"ON","brightness":255,"effect":"playFseq","filename":"ESPTuneToTest.fseq","count":3}'

Additional Input Features

The input channels will respond to FPP and xLights discovery requests. xLights also has the ability to auto configure the ESP.

Supported Outputs

The ESPixelStick firmware can generate the following outputs from incoming data streams, however your hardware must support the physical interface.

ESP8266 Platforms:

  • Single Serial / Pixel output
  • 8 Relay Outputs
  • 16 PWM Outputs (I2C bus)

ESP32 platforms:

  • 2 Serial
  • 6 Pixel outputs
  • 8 Relay outputs
  • 16 PWM Outputs (I2C bus)

Each Serial / Pixel output can be configured to support any of the output protocols.

Pixel Protocols

  • WS2811 / WS2812 / WS2812b (WS281x)
  • GE Color Effects
  • WS2801 (ESP32 Only)
  • APA-102 (ESP32 Only)

Serial Protocols

  • DMX512
  • Renard
  • Generic Serial

Relay Outputs

We support an output configuration that drives up to eight (8) relay outputs.

  • Each relay output can be configured to be active high or active low.
  • The channel intensity trip point (on/off) is configurable per output.
  • The GPIO for each output is configurable

PWM Outputs

We support up to 16 PWM outputs via the I2C bus. Each output can be configured to map the 8 bit channel intensity values to 4096 PWM timings. PWM is supported via the PCM9685 16 channel PWM output module. This CAN be used to drive DC SSRs to support up to 5 dumb RGB light strings.

Output Pin Mapping

The outputs are configured via the web interface and map differently depending on which platform you are on. Depending on the platform, some output pins cab be changed when Advanced mode is enabled via the Admin tab.

ESP8266:

  • Output 1 GPIO2
  • Output 2 configurable

ESP32:

  • Output 1 GPIO2
  • Output 2 GPIO13
  • Output 3 GPIO12
  • Output 4 GPIO14
  • Output 5 GPIO32
  • Output 6 GPIO33
  • Output 7 GPIO15 (data) GPIO25 (clock)
  • Output 8 configurable

ESP32 CAM:

  • Output 1 GPIO0
  • Output 2 GPIO1
  • Output 3 GPIO3
  • Output 4 GPIO16
  • Output 5 configurable