LIGHTING · addressable-led

Addressable LED

Reusable ESP addressable-pixel controller with realtime effects and OTA telemetry.

34 capabilitiesREST + secure WebSocketProduction schema
OVERVIEW

Built from capabilities, not assumptions.

Addressable LED is a canonical HomeAutoPro lighting template. The same production capability schema drives validation, controls, reported state, telemetry, scenes and automations. Undeclared keys are rejected.

WRITABLE CAPABILITIES

Controls

ControlTypeRange / valuesDescription
Brightnessbrightnessinteger · %0–100, step 1Writable through validated owner commands and automations.
Effecteffectenumsolid_color, warm_white, cool_white, soft_gold, temple_gold, saffron, royal_blue, cloud_white, moonlight, solid_red, solid_green, solid_blue, solid_cyan, solid_magenta, solid_yellow, solid_orange, solid_purple, solid_pink, solid_lime, solid_teal, cloud_drift, cloud_pulse, cloud_glow, blue_cloud, moonlit_cloud, silver_cloud, storm_clouds, lightning, lightning_storm, thunderstorm, distant_lightning, heavy_storm, random_lightning, double_strike, triple_strike, rolling_thunder, cloud_flash, fire, campfire, embers, flame, diya_flicker, candle, golden_flame, temple_flame, sunset, deep_sunset, golden_hour, sunrise, dusk, twilight, stars, star_twinkle, slow_stars, sparkle, night_sky, blue_stars, white_stars, golden_stars, shooting_star, meteor, comet, bappa_gold, ganesh_aarti, diya_glow, temple_glow, saffron_gold, saffron_white, royal_gold, divine_blue, divine_white, divine_aura, aarti_pulse, prasad_gold, festival_sparkle, festival_wave, celebration, soft_celebration, cloud_lightning, cloud_stars, sunset_stars, gold_sparkle, blue_white_sparkle, saffron_gold_sparkle, breathing, pulse, heartbeat, wave, color_wave, red_green_wave, red_blue_wave, green_blue_wave, tri_color_wave, rgb_chase, color_wipe, chase, theater_chase, rainbow, rainbow_chase, rainbow_wave, rainbow_wipe, rainbow_breathe, pastel_rainbow, rainbow_sparkle, rainbow_comet, gradient, aurora, ocean, lava, plasma, meteor_rain, confetti, glitter, scanner, knight_rider, ripple, waterfall, rain, snow, magic_dust, fairy_lights, red_breathe, green_breathe, blue_breathe, cyan_breathe, purple_breatheWritable through validated owner commands and automations.
PowerpowerbooleanON / OFFWritable through validated owner commands and automations.
Master ColorcolorcolorSchema-definedWritable through validated owner commands and automations.
Directiondirectionenumforward, reverseWritable through validated owner commands and automations.
Palettepaletteenumcloud, temple, sunset, fire, stars, festival, ocean, aurora, customWritable through validated owner commands and automations.
Color 1color1colorSchema-definedWritable through validated owner commands and automations.
Color 2color2colorSchema-definedWritable through validated owner commands and automations.
Color 3color3colorSchema-definedWritable through validated owner commands and automations.
RandomizationrandomizationbooleanON / OFFWritable through validated owner commands and automations.
LooploopbooleanON / OFFWritable through validated owner commands and automations.
Color Ordercolor_orderenumRGB, RBG, GRB, GBR, BRG, BGRWritable through validated owner commands and automations.
Speedspeedinteger · %1–100, step 1Writable through validated owner commands and automations.
Intensityintensityinteger · %1–100, step 1Writable through validated owner commands and automations.
Saturationsaturationinteger · %0–100, step 1Writable through validated owner commands and automations.
Transitiontransition_timeinteger · %0–100, step 1Writable through validated owner commands and automations.
Effect Densityeffect_densityinteger · %1–100, step 1Writable through validated owner commands and automations.
Storm Intensitystorm_intensityinteger · %1–100, step 1Writable through validated owner commands and automations.
Twinkle Densitytwinkle_densityinteger · %1–100, step 1Writable through validated owner commands and automations.
Fire Heatfire_heatinteger · %1–100, step 1Writable through validated owner commands and automations.
Fire Coolingfire_coolinginteger · %1–100, step 1Writable through validated owner commands and automations.
Segment Sizesegment_sizeinteger · pixels1–300, step 1Writable through validated owner commands and automations.
LED Countled_countinteger · pixels1–300, step 1Writable through validated owner commands and automations.
Sequential Auto Playauto_playbooleanON / OFFWritable through validated owner commands and automations.
Safe Maximum Brightnessmax_brightnessinteger · %1–100, step 1Writable through validated owner commands and automations.
Auto Play Groupauto_play_groupenumall, colors, solid_colors, color_breathing, color_motion, rainbow, cloud, lightning, fire, stars, sunset, temple, festival, motion, ambient, combinations, staticWritable through validated owner commands and automations.
Effect Durationauto_play_intervalinteger · seconds5–3600, step 1Writable through validated owner commands and automations.
After Power Returnspower_restore_modeenumoff, lastWritable through validated owner commands and automations.
DEVICE → HOMEAUTOPRO

Feedback / state

Every connected device also reports online state and last-seen time. Applied values remain distinct from requested values until the device acknowledges them.

Brightnessbrightness

integer · %. Report the value actually applied after each command.

Effecteffect

enum. Report the value actually applied after each command.

Powerpower

boolean. Report the value actually applied after each command.

Master Colorcolor

color. Report the value actually applied after each command.

Directiondirection

enum. Report the value actually applied after each command.

Palettepalette

enum. Report the value actually applied after each command.

Color 1color1

color. Report the value actually applied after each command.

Color 2color2

color. Report the value actually applied after each command.

Color 3color3

color. Report the value actually applied after each command.

Randomizationrandomization

boolean. Report the value actually applied after each command.

Looploop

boolean. Report the value actually applied after each command.

Color Ordercolor_order

enum. Report the value actually applied after each command.

Wi-Fi RSSIrssi

number · dBm. Read-only device feedback.

Uptimeuptime

number · s. Read-only device feedback.

IP Addressip

string. Read-only device feedback.

Firmwarefirmware

string. Read-only device feedback.

Animation FPSfps

number · fps. Read-only device feedback.

Free Heapfree_heap

number · bytes. Read-only device feedback.

Speedspeed

integer · %. Report the value actually applied after each command.

Intensityintensity

integer · %. Report the value actually applied after each command.

Saturationsaturation

integer · %. Report the value actually applied after each command.

Transitiontransition_time

integer · %. Report the value actually applied after each command.

Effect Densityeffect_density

integer · %. Report the value actually applied after each command.

Storm Intensitystorm_intensity

integer · %. Report the value actually applied after each command.

Twinkle Densitytwinkle_density

integer · %. Report the value actually applied after each command.

Fire Heatfire_heat

integer · %. Report the value actually applied after each command.

Fire Coolingfire_cooling

integer · %. Report the value actually applied after each command.

Segment Sizesegment_size

integer · pixels. Report the value actually applied after each command.

LED Countled_count

integer · pixels. Report the value actually applied after each command.

Sequential Auto Playauto_play

boolean. Report the value actually applied after each command.

Safe Maximum Brightnessmax_brightness

integer · %. Report the value actually applied after each command.

Auto Play Groupauto_play_group

enum. Report the value actually applied after each command.

Effect Durationauto_play_interval

integer · seconds. Report the value actually applied after each command.

After Power Returnspower_restore_mode

enum. Report the value actually applied after each command.

TIME-SERIES VALUES

Telemetry

Wi-Fi RSSIrssi

Validated number in dBm, -120–0. Publish in a telemetry message.

Uptimeuptime

Validated number in s, 0–2147483647. Publish in a telemetry message.

IP Addressip

Validated string. Publish in a telemetry message.

Firmwarefirmware

Validated string. Publish in a telemetry message.

Animation FPSfps

Validated number in fps, 0–100. Publish in a telemetry message.

Free Heapfree_heap

Validated number in bytes, 0–100000. Publish in a telemetry message.

CAPABILITY-AWARE WORKFLOWS

Automations

Triggers

State/telemetry changes for brightness, effect, power, color, direction, palette, color1, color2, color3, randomization, loop, color_order, rssi, uptime, ip, firmware, fps, free_heap, speed, intensity, saturation, transition_time, effect_density, storm_intensity, twinkle_density, fire_heat, fire_cooling, segment_size, led_count, auto_play, max_brightness, auto_play_group, auto_play_interval, power_restore_mode, plus online and offline events.

Actions

Validated commands for brightness, effect, power, color, direction, palette, color1, color2, color3, randomization, loop, color_order, speed, intensity, saturation, transition_time, effect_density, storm_intensity, twinkle_density, fire_heat, fire_cooling, segment_size, led_count, auto_play, max_brightness, auto_play_group, auto_play_interval, power_restore_mode. Applied state is reported as ACK.

ACTUAL PRODUCTION PROTOCOL

Payloads and acknowledgement

Dashboard/APIHomeAutoProDeviceApplied-state ACK

Authenticate

{"type":"auth","device_secret":"YOUR_DEVICE_SECRET"}

Command

{
  "event": "command",
  "state": {
    "auto_play": true,
    "auto_play_group": "all",
    "auto_play_interval": 1802.5,
    "brightness": 50.0,
    "color": "#6d8cff",
    "color1": "#6d8cff",
    "color2": "#6d8cff",
    "color3": "#6d8cff",
    "color_order": "RGB",
    "direction": "forward",
    "effect": "solid_color",
    "effect_density": 50.5,
    "fire_cooling": 50.5,
    "fire_heat": 50.5,
    "intensity": 50.5,
    "led_count": 150.5,
    "loop": true,
    "max_brightness": 50.5,
    "palette": "cloud",
    "power": true,
    "power_restore_mode": "off",
    "randomization": true,
    "saturation": 50.0,
    "segment_size": 150.5,
    "speed": 50.5,
    "storm_intensity": 50.5,
    "transition_time": 50.0,
    "twinkle_density": 50.5
  }
}

State ACK

{
  "state": {
    "auto_play": true,
    "auto_play_group": "all",
    "auto_play_interval": 1802.5,
    "brightness": 50.0,
    "color": "#6d8cff",
    "color1": "#6d8cff",
    "color2": "#6d8cff",
    "color3": "#6d8cff",
    "color_order": "RGB",
    "direction": "forward",
    "effect": "solid_color",
    "effect_density": 50.5,
    "fire_cooling": 50.5,
    "fire_heat": 50.5,
    "intensity": 50.5,
    "led_count": 150.5,
    "loop": true,
    "max_brightness": 50.5,
    "palette": "cloud",
    "power": true,
    "power_restore_mode": "off",
    "randomization": true,
    "saturation": 50.0,
    "segment_size": 150.5,
    "speed": 50.5,
    "storm_intensity": 50.5,
    "transition_time": 50.0,
    "twinkle_density": 50.5
  },
  "type": "state"
}

Telemetry

{
  "telemetry": {
    "firmware": "example",
    "fps": 50.0,
    "free_heap": 50000.0,
    "ip": "example",
    "rssi": -60.0,
    "uptime": 1073741823.5
  },
  "type": "telemetry"
}
CAPABILITY-GENERATED EXAMPLES

Sample code

Choose one platform. All examples use the production protocol and placeholders; no stored secret is retrieved.

C++ · ESP8266
#include <ESP8266WiFi.h>
#include <ArduinoJson.h>
#include <WebSocketsClient.h>

const char* DEVICE_CODE = "YOUR_DEVICE_ID";
const char* DEVICE_SECRET = "YOUR_DEVICE_SECRET";
WebSocketsClient socket;

// Handle only: brightness, effect, power, color, direction, palette, color1, color2, color3, randomization, loop, color_order, speed, intensity, saturation, transition_time, effect_density, storm_intensity, twinkle_density, fire_heat, fire_cooling, segment_size, led_count, auto_play, max_brightness, auto_play_group, auto_play_interval, power_restore_mode
// Connect: socket.beginSSL("api.homeautopro.in", 443, path);
// First message: {"type":"auth","device_secret":DEVICE_SECRET}
// After a command, publish {"type":"state","state":applied}.
SAFE DIAGNOSTICS

Troubleshooting

401 authentication

Use the current Device Secret locally. Rotate it in Device Details if it was lost.

422 validation

Compare every key, type and range with the capability schema above.

No command ACK

Publish the value actually applied after handling event=command.