Alexa Voice Configuration Guide
Table of contents
Table of contents
Introduction
Alexa voice integration is configured entirely through the LCC CDI interface. This section describes how to define Voice Commands that respond to Alexa or Philips Hue App interactions.
Each command allows Alexa to turn on/off a device or set a value (0–255) that maps to one or more LCC Events. No additional hardware is needed — all support is built into the Node firmware.
Application Scenarios
Below are detailed scenarios for deploying and configuring Alexa Voice Commands using the LCC Fusion Node firmware:
| Scenario | Node Firmware Setup | Alexa / Voice Device Configuration | Wiring | CDI Setup |
|---|---|---|---|---|
| Turn Building Lights On/Off | Load firmware with Alexa support on a Node Card connected to an Digital I/O Card or PWM Card controlling LEDs | Use Alexa app or say “Alexa, discover devices” after configuring CDI | Connect LED to Node Card I/O via Digital I/O Breakout Board | - Device Name(s): Coal Lights- Min/Max: 1–255- Event On: EventID_LightsOn- Event Off: EventID_LightsOff |
| Control Locomotive Speed by Voice | Node Card issues DCC speed commands via LCC Event to another device on the CAN network | Say: “Alexa, set Cab 3 to 20” or use slider in Hue/Alexa app | No direct wiring to motor; event is handled by DCC driver card elsewhere | - Device Name(s): Cab 3, Engine 3- Entry 1: 1–40 → Event On: SlowSpeed- Entry 2: 41–80 → Event On: MedSpeed- Entry 3: 81–255 → Event On: FastSpeed- Event Off: StopEvent |
| Trigger Ambient Sounds by Voice | Node Card connected to Sound Card via I2C (or uses onboard sound) | Say: “Alexa, turn Forest Sounds on” | Sound Card connected via Node Bus Hub or Node I2C | - Device Name(s): Forest Sounds- Min/Max: 1–255- Event On: PlayForestSound- Event Off: StopForestSound |
| Activate Layout Power Districts | Node Card sends event to a power distribution controller | Say: “Alexa, turn Power District A off” | Power relay wired to output card receiving LCC Event | - Device Name(s): Power District A- Min/Max: 1–255- Event On: PowerOnEvent- Event Off: PowerOffEvent |
| Throw a Turnout by Voice | Node Card sends LCC Event to Turnout Card | Say: “Alexa, turn Mainline Turnout on” (or off) | Turnout Card drives Tortoise machine or relay | - Device Name(s): Mainline Turnout- Min/Max: 1–255- Event On: ThrowEvent- Event Off: CloseEvent |
Terminology
This section defines key terms used in Alexa Voice Integration for the LCC Fusion Project:
| CDI Concept | Displayed Label / Description |
|---|---|
| Main Configuration Segment | Alexa Voice Configuration |
| Voice Command Group | Alexa Command Configuration |
| Configure an Alexa command including description, device names, device ranges, and their Event IDs. | |
| Command Entry Label | Alexa Voice Command |
| Device Entry Label | Alexa Device |
| Device Group | Alexa Device Configuration |
| Device Name Field | Alexa Device Name(s) |
| List of the Alexa device names/keywords used to trigger this voice command (comma separated) | |
| Device Description Field | Description of Alexa Device |
| Event Set Group | Configure the Alexa device’s event parameters including an event description, device event range, and on/off Event IDs. |
| Event Description | Enter a description for the device’s event. |
| Set Range - Min | Minimum of set range / Description of 0–255 default when on |
| Set Range - Max | Maximum of set range / Description of 0–255 upper bound |
| Event On | Enter the Event ID that activates (turns on) the device. |
| Event Off | Enter the Event ID that deactivates (turns off) the device. |
Configuration Summary
To enable voice control of your layout using Alexa, follow these steps to configure the LCC Fusion Node Card (or Quad-Node Card) with Alexa Voice support:
-
Prepare the Node Card Install firmware that supports Alexa Voice Integration on your Node Card or Quad-Node Card. No additional hardware is required.
📶 Note: The Node must have a working internet connection (e.g., via Wi-Fi) to allow Alexa discovery and communication.
-
Verify the Node Is Running Power up the Node Card and ensure the ESP32 module boots successfully.
- Confirm that Alexa/Hue emulation is running by observing boot messages via serial monitor (optional).
- You do not need to connect any special Alexa hardware.
-
Open the CDI Configuration Tool Connect to the Node using the LCC Configuration Tool or a browser-based CDI interface to begin configuration.
-
Configure Alexa Devices in CDI Use the Alexa Device Configuration section to add one or more Voice Commands:
- Define a Device Name or comma-separated aliases (e.g.,
Cab 3, Train 3) - Provide a description
- Create one or more Device Range Configurations, each specifying:
- A min/max value (0–255)
- An Event On ID for activation
- An Event Off ID for deactivation
- Define a Device Name or comma-separated aliases (e.g.,
-
Reboot the Node & Discover Devices After saving changes:
- Click “Reboot” or “Update Complete” in the CDI Tool.
- Say: “Alexa, discover devices” — your defined names will appear as light devices in the Alexa or Hue app.
-
Control Devices Using Voice or App Try commands like:
- “Alexa, turn Cab 3 on”
- “Alexa, set Engine 4 to 80”
- Use sliders in the app to send set values (e.g., 0 = off, 1–255 = mapped range)
Once configured, Alexa will communicate directly with the Node Card, triggering the corresponding LCC Events without the need for additional hubs or bridges.
Here is the merged and streamlined section titled Alexa Voice Configuration For LCC Events, combining the voice command group and device range configuration details into a single, organized table:
Example Voice Commands and Event Mapping
Alexa Voice Configuration uses a hierarchical structure to organize voice-triggered behavior:
- ✅ Alexa Voice Command groups – One or more grouping of commands that define a logical control function (e.g., “Cab 3 control”)
- ✅ Each command entry includes a Device with one or more names— these are the voice-recognized aliases Alexa responds to (e.g.,
Cab 3,Train 3) - ✅ Each device configuration contains one or more Event Sets that define how Alexa actions (like “turn on” or “set to 40”) map to LCC Event IDs based on a matching value range
This design allows flexible control over layout devices while minimizing duplication. You can trigger different actions using set values, reuse logic across aliases, and control multiple devices using intuitive voice commands. The table below illustrates how Alexa voice commands — including aliases, value ranges, and on/off actions — are mapped to LCC Event IDs using the CDI configuration. Each voice command group can include:
- One or more device name aliases
- One or more event sets, each triggered by a specific set value range
- Event On and Event Off IDs that control layout devices, sounds, or locomotives
This structure allows a single logical command (e.g., “Cab 3”) to support multiple aliases and value-based behaviors without duplicating event logic.
| Command | Device Names (Aliases) | Event Description | Device Value Range (used to map to specific Event ID) | Assigned Event ID |
|---|---|---|---|---|
| “Alexa, turn on Cab 3” | Cab 3, Engine 3, Train 3 | Cab 3 On | N/A | On Event ID assigned to DCC Card 1 for resuming Cab 3 throttle |
| “Alexa, set Engine 3 to 30” | Cab 3, Engine 3, Train 3 | Slow Cab 3 | 1–30 | Range Event ID assigned to DCC Card 1 for setting Cab 3 to 30 mph |
| “Alexa, set Engine 3 to 40” | Medium Cab 3 | 31–70 | Range Event ID assigned to DCC Card 1 for setting Cab 3 to 60 mph | |
| “Alexa, set Engine 3 to 90” | Fast Cab 3 | 71–255 | Range Event ID assigned to DCC Card 1 for setting Cab 3 to 90+ mph | |
| “Alexa, turn off Cab 3” | Cab 3, Engine 3, Train 3 | Cab 3 Off | 0 | Off Event ID assigned to DCC Card 1 for stopping Cab 3 |
| “Alexa, turn on Forest Sounds” | Forest Sounds | Play Forest Sounds | N/A | On Event ID assigned to Sound Card 1 for starting file 001.mp3 on player 1 |
| “Alexa, set Forest Sounds to 20” | Forest Sounds | Play Forest Sounds | 1–20 | Range Event ID assigned to Sound Card 1 for playing file 001.mp3 on player 1 at 10% volume |
| “Alexa, turn off Forest Sounds” | Forest Sounds | Stop Forest Sounds | N/A | Off Event ID assigned to Sound Card 1 for stopping playback on player 1 |
| “Alexa, set Ambient Audio to 50” | Ambient Audio | Play Ambient Sounds | 40-60 | Range Event ID assigned to Sound Card 1 for playing file 001.mp3 on player 2 at 50% volume |
| “Alexa, turn off Ambient Audio” | Ambient Audio | Stop Ambient Sounds | N/A | Off Event ID assigned to Sound Card 1 for stopping playback on player 2 |
Alexa Voice Configuration For LCC Events
Each configured voice command consists of:
-
One or more device names
-
One or more range-based event sets
-
Descriptions for identification
-
Event IDs to be triggered for on/off or value-based actions
-
CDI Group CDI Field Choices Description Alexa Device Configuration Description Text A label to describe this voice command group. Example: Cab 3 Speed ControlorTurnout 12 Control.Alexa Device Configuration Device Name(s) Comma-separated text Required. Alexa will recognize these names during voice commands. Multiple aliases can be entered, e.g., Cab 3, Engine 3, Train 3.Alexa Device Configuration Event On Event ID Sent when Alexa says “turn on [device]” and no range match is found. Alexa Device Configuration Event Off Event ID Sent when Alexa says “turn off [device]” or sets the device to value 0.Device Range Configuration Description Text Optional. Internal label to describe this value range. Example: Slow Speed,Turn On,Emergency Stop.Device Range Configuration Minimum of set range 0–255 Defines the lower bound for a matching set value. Device Range Configuration Maximum of set range 0–255 Defines the upper bound for a matching set value. Device Range Configuration Range Event On Event ID Sent when Alexa sets the device to a value within the defined range (e.g., set Cab 3 to 30).
📝 Note: You may define multiple range entries for the same device to allow Alexa to trigger different LCC Events depending on the set value. For example:
- “Alexa, set Cab 3 to 10” → triggers
SlowSpeed - “Alexa, set Cab 3 to 80” → triggers
FastSpeed - “Alexa, turn Cab 3 off” → triggers
StopEvent
Let me know if you’d like a sample table filled with real Event IDs or if you’d like this embedded in a downloadable .md file.
Functional Testing
Once you complete configuration via the CDI tool:
- Reboot the Node (or click “Update Complete”).
- Say: “Alexa, discover devices.”
- Confirm that your configured device names now appear in the Alexa or Philips Hue app as light devices.
Configuration Example
Here is an example for a device named "Cab 3":
| Device Names (comma seperated) | Description | Value Min | Value Max | Event On | Event Off |
|---|---|---|---|---|---|
| Cab 3, Train 3 | Control speed of Cab 3 | 1 | 50 | EventID1 | EventID0 |
| Cab 3, Train 3 | Increase speed of Cab 3 | 51 | 100 | EventID2 | EventID0 |
This allows the user to say:
- “Alexa, set Cab 3 to 30” → triggers
EventID1 - “Alexa, set Cab 3 to 70” → triggers
EventID2 - “Alexa, turn Cab 3 off” → triggers
EventID0
Troubleshooting Guide
| Issue | Possible Cause | Solution |
|---|---|---|
| Alexa does not respond to voice command | Device name not configured or not discovered | 1. Ensure the device name is correctly defined in CDI under “Device Name(s)”.2. After updating the CDI, say “Alexa, discover devices.”3. Check that the Node Card is powered on and connected to the internet. |
| Alexa says “Device not responding” | Node firmware is not emulating Hue correctly | 1. Verify that the correct firmware (with Alexa support) is flashed to the Node Card.2. Ensure no other Hue emulator (e.g., from another Node) is causing conflict.3. Restart the Node and try discovery again. |
| Alexa command does not trigger any action | Event IDs not configured or incorrect value range | 1. Confirm that the CDI contains a valid Event On and Event Off entry.2. Ensure the spoken value falls within the min/max range.3. Use the serial monitor to observe event generation. |
| Alexa does not find any devices | Node not online or discovery not initiated properly | 1. Ensure the Node Card has an active internet connection.2. Reboot the Node and wait for startup.3. Use the Alexa app to manually initiate “Discover Devices”. |
| Only on/off works, but “set” commands fail | No matching min/max range defined for the value | 1. Add a Device Range Configuration entry for the desired value range (e.g., 1–50).2. Make sure the spoken value (e.g., “20”) falls into one of the defined ranges. |
| Multiple devices respond to the same voice name | Duplicate device names across nodes or entries | 1. Ensure each CDI entry has a unique device name or distinct alias.2. Avoid overlapping name definitions on multiple Node Cards. |