Skip to content

Only first LED lights up 80% of the time #2067

Closed

Description

@mcpacific

With my WS2812B strips, after apply the latest FastLED, about 80% of the time using fill_solid only lights the first LED in the strips. I've tried this with two different strips and two different ESP8266 controllers.

For example, one strip has 50 leds. I setup the led array with:

CRGB leds[NUM_LEDS];

num_leds gets defined by the actual number from settings.

fill_solid(leds, num_leds, CRGB::Red);
FastLED.show();

Only the first LED turns red. The rest of the strip remains off.

At first I thought using a for () loop worked, but it also does that same thing most of the time:

for (int i = 0; i < num_leds; i++)
{
    leds[i] = CRGB::Red;
}
FastLED.show();

After some trial and error, I finally got it to work consistently by adding a 2nd FastLED.show():

fill_solid(leds, num_leds, CRGB::Red);
FastLED.show();
FastLED.show();

I don't know why one isn't enough.

Activity

  1. 4wheeljive commented on Aug 28, 2025

    @4wheeljive
    Contributor

    I’m pretty new to this stuff, but I suspect that the “fix” of adding a second FastLED.show may be a coincidence, and that the problem involved something else. I also suspect that it was not a FastLED issue, but something in your hardware or software implementation.

    One thing I notice is that NUM_LEDS is capitalized when you declare CRGB leds, but it is lower case in your fill_solid function. I'm not sure exactly what you mean by

    num_leds gets defined by the actual number from settings

    but that's something you might want to doublecheck.

    If the problem returns, I'd suggest asking for help on the reddit forum https://www.reddit.com/r/FastLED/ rather than here. And if you do, you should include your complete sketch (using https://gist.github.com or https://pastebin.com) as well as info about your hardware setup (power source, wiring, etc.). Good luck!

  2. mcpacific commented on Aug 29, 2025

    @mcpacific
    Author

    @4wheeljive Thank you for your input. NUM_LEDS is a preprocessor macro defined as an integer constant. It is set as the maximum number of LEDS the sketch will allow. Later, in the global variable declaration section I define num_leds (int num_leds = NUM_LEDS;'.

    In setup(), num_leds is redefined based on a value that was retrieved from a config.json file. This way I can use the same sketch for multiple ESP devices that have a different number of leds attached (in this case, an ESP8266 device).

    There is no reason FastLED.show() should need to be repeated. The code worked perfectly without doing so until I updated to the latest version. I hope there will be no "if the problem returns" because I've added two FastLED.show()'s everywhere where one used to be, and now fill_solid() works as expected.

    I'll check out the reddit forum!

    Thanks again!

  3. zackees commented on Sep 6, 2025

    @zackees
    Member

    Please post the entire sketch, including the platformio.ini file. Then I can debug this.

  4. mcpacific commented on Sep 10, 2025

    @mcpacific
    Author

    @zackees Thank you for getting back to me. Here is my sketch. I'm using Arduino IDE (not PlatformIO) so I don't have a platformio.ini file.

    `/*

    • Espalexa with RGB color devices. https://github.com/Aircoookie/Espalexa
    • Last Update: 8/28/2025
    • Using Espalexa with 433 mhz blinds instead of RGB LED strip.
    • WiFi Manager used to configure WiFi. LED will blink when WiFi is in config mode.
    • Press and Hold FLASH/BOOT > 3 seconds will start WiFi Config.
    • LED will blink when in config mode
      */

    #include <WiFiManager.h>
    #include <ArduinoJson.h>
    #include <WiFiClient.h>
    #include <Espalexa.h>
    #define FASTLED_ALLOW_INTERRUPTS 0
    #include <FastLED.h>
    #include <ArduinoOTA.h>
    #include <Ticker.h>
    #ifdef ESP32
    #include <WiFi.h>
    #include <WebServer.h>
    #include <SPIFFS.h>
    #include <ESPmDNS.h>
    #include <WiFiUdp.h>
    #else
    #include <ESP8266WiFi.h>
    #include <ESP8266WebServer.h>
    #include <FS.h>
    #include <ESP8266mDNS.h>
    #include <WiFiUdp.h>
    #endif

    bool enableDebug = false;

    #define NUM_LEDS 75 // Maximum number of LEDs
    #define BRIGHTNESS 255
    #define DATA_PIN 4
    // #define CLOCK_PIN 22
    #define TRIGGER_PIN 0 // Flash button on ESP8266
    #ifndef LED_BUILTIN
    #define LED_BUILTIN 2 // ESP32 DOES NOT DEFINE LED_BUILTIN
    #endif

    int LED = LED_BUILTIN;
    char device_name[48];
    char qty_leds[3];
    int num_leds = NUM_LEDS;

    bool shouldSaveConfig = false; // flag for saving data

    #ifdef ESP32
    #define ESPALEXA_ASYNC
    const int buttonStateNotPressed = LOW;
    const int buttonStatePressed = HIGH;
    #else
    const int buttonStateNotPressed = HIGH;
    const int buttonStatePressed = LOW;
    #endif
    int lastButtonState = buttonStateNotPressed; // the current reading from the input pin
    unsigned long lastDebounceTime = 0; // the last time the output pin was toggled
    unsigned long debounceDelay = 50; // the debounce time in ms; increase if the output flickers
    unsigned long resetDelay = 3000; // the time required to press button to reset, in ms
    bool rainbowActive = false;
    bool rainbowBootActive = false;
    unsigned long rainbowBootStart = 0;
    uint8_t lastBrightness = 0;
    uint32_t lastRgb = 0;
    unsigned long directColorOnDelay = 400;

    // Debug toggle via button (hold for 8s)
    bool debugTogglePending = false;
    unsigned long debugToggleStart = 0;

    WiFiManager wifiManager; // global instance
    WiFiServer telnetServer(23);
    WiFiClient telnetClient;
    Espalexa espalexa;
    Ticker ticker;
    CRGB leds[NUM_LEDS]; // global intialize number of LEDs on device

    // Non-blocking color change state variables
    bool waitingForColor = false;
    unsigned long powerOnTime = 0;
    bool changeColorPending = false;
    uint32_t pendingRgb = 0;
    uint8_t pendingBrightness = 0;

    // Unified debug output to Serial and Telnet
    void debugPrint(const char *fmt, ...)
    {
    char buf[256];
    va_list args;
    va_start(args, fmt);
    vsnprintf(buf, sizeof(buf), fmt, args);
    va_end(args);
    if (enableDebug)
    {
    Serial.print(buf);
    if (telnetClient && telnetClient.connected())
    {
    telnetClient.print(buf);
    telnetClient.print("\r");
    }
    }
    }

    /*

    • Callbacks and Functions
      */

    void setupSpiffs()
    {
    // clean FS, for testing
    // SPIFFS.format();

    debugPrint("\nMounting FS...\n");
    

    #ifdef ESP32
    if (SPIFFS.begin(true))
    #else
    if (SPIFFS.begin())
    #endif
    {
    debugPrint("Mounted file system\n");
    debugPrint("[SPIFFS] Files present:\n");
    #ifdef ESP32
    File root = SPIFFS.open("/", "r");
    File file = root.openNextFile();
    while (file)
    {
    debugPrint(" %s\n", file.name());
    file = root.openNextFile();
    }
    #else
    Dir dir = SPIFFS.openDir("/");
    while (dir.next())
    {
    debugPrint(" %s\n", dir.fileName().c_str());
    }
    #endif
    if (SPIFFS.exists("/config.json"))
    {
    File configFile = SPIFFS.open("/config.json", "r");
    if (configFile)
    {
    size_t size = configFile.size();
    // Allocate a buffer to store contents of the file.
    std::unique_ptr<char[]> buf(new char[size]);
    configFile.readBytes(buf.get(), size);
    DynamicJsonDocument doc(128);
    DeserializationError error = deserializeJson(doc, buf.get());
    if (error)
    {
    debugPrint("Failed to load json config, assigning default values\n");
    strcpy(device_name, "New Light");
    strcpy(qty_leds, "1");
    }
    else
    {
    debugPrint("Successfully parsed json config\n");
    strcpy(device_name, doc["device_name"]);
    if (!doc["qty_leds"])
    {
    strcpy(qty_leds, "1");
    }
    else
    {
    strcpy(qty_leds, doc["qty_leds"]);
    }
    enableDebug = doc["enableDebug"] | false;
    }
    configFile.close();

                String host = String(device_name);
                host.replace(" ", "");
                debugPrint("Device hostname: %s\n", host.c_str());
                debugPrint("Quantity LEDs: %s\n", qty_leds);
                debugPrint("Debug mode: %s\n", enableDebug ? "enabled" : "disabled");
            }
        }
    }
    else
    {
        debugPrint("Failed to mount FS\n");
    }
    

    }

    void saveConfigFile()
    {
    DynamicJsonDocument doc(128);
    doc["device_name"] = device_name;
    doc["qty_leds"] = qty_leds;
    doc["enableDebug"] = enableDebug;
    File configFile = SPIFFS.open("/config.json", "w");
    if (configFile)
    {
    serializeJson(doc, configFile);
    configFile.close();
    debugPrint("Config file saved\n");
    }
    else
    {
    debugPrint("Failed to open config file for writing\n");
    }
    }

    void configModeCallback(WiFiManager *myWiFiManager)
    {
    if (enableDebug)
    {
    debugPrint("Entered config mode\n");
    debugPrint("%s\n", WiFi.softAPIP().toString().c_str());
    debugPrint("%s\n", myWiFiManager->getConfigPortalSSID().c_str());
    }
    else
    {
    Serial.print("Entered config mode\n");
    Serial.print(WiFi.softAPIP().toString());
    Serial.print(myWiFiManager->getConfigPortalSSID());
    }
    ticker.attach(0.2, tick); // blink faster in config mode
    }

    // callback notifying config will be saved
    void saveConfigCallback()
    {
    debugPrint("Should save config\n");
    shouldSaveConfig = true;
    }

    void tick()
    {
    // toggle state
    digitalWrite(LED, !digitalRead(LED)); // set pin to the opposite state
    }

    void rainbow()
    {
    static uint16_t sPseudotime = 0;
    static uint16_t sLastMillis = 0;
    static uint16_t sHue16 = 0;

    uint8_t sat8 = beatsin88(87, 220, 250);
    uint8_t brightdepth = beatsin88(341, 96, 224);
    uint16_t brightnessthetainc16 = beatsin88(203, (25 * 256), (40 * 256));
    uint8_t msmultiplier = beatsin88(147, 23, 60);
    
    uint16_t hue16 = sHue16; // gHue * 256;
    uint16_t hueinc16 = beatsin88(113, 1, 3000);
    
    uint16_t ms = millis();
    uint16_t deltams = ms - sLastMillis;
    sLastMillis = ms;
    sPseudotime += deltams * msmultiplier;
    sHue16 += deltams * beatsin88(400, 5, 9);
    uint16_t brightnesstheta16 = sPseudotime;
    
    for (uint16_t i = 0; i < num_leds; i++)
    {
        hue16 += hueinc16;
        uint8_t hue8 = hue16 / 256;
    
        brightnesstheta16 += brightnessthetainc16;
        uint16_t b16 = sin16(brightnesstheta16) + 32768;
    
        uint16_t bri16 = (uint32_t)((uint32_t)b16 * (uint32_t)b16) / 65536;
        uint8_t bri8 = (uint32_t)(((uint32_t)bri16) * brightdepth) / 65536;
        bri8 += (255 - brightdepth);
    
        CRGB newcolor = CHSV(hue8, sat8, bri8);
    
        uint16_t pixelnumber = i;
        pixelnumber = (num_leds - 1) - pixelnumber;
    
        nblend(leds[pixelnumber], newcolor, 64);
    }
    

    }

    void colorLightChanged(uint8_t brightness, uint32_t rgb)
    {
    float r = ((rgb >> 16) & 0xFF);
    float g = ((rgb >> 8) & 0xFF);
    float b = (rgb & 0xFF);
    rainbowActive = false;
    debugPrint("\nCallback colorLightChanged()\n");
    debugPrint("Last HEX: #%06X RAW: %lu\n", lastRgb, lastRgb);
    debugPrint("Current HEX: #%06X RGB: (%d, %d, %d) RAW: %lu\n", rgb, (int)r, (int)g, (int)b, rgb);
    debugPrint("lastBrightness: %d\n", lastBrightness);
    debugPrint("currentBrightness: %d\n", brightness);

    if (!brightness)
    {
        debugPrint("LEDs were turned off\n");
        setColor(rgb, brightness);
        return;
    }
    
    if (!lastBrightness && brightness > 0 && (lastRgb == rgb || rgb == 16702800))
    {
        debugPrint("LEDs were off but turned back on\n");
        debugPrint("LED color has not changed\n");
        powerOnTime = millis();
        waitingForColor = true;
        changeColorPending = false;
        pendingRgb = rgb;
        pendingBrightness = brightness;
        return;
    }
    else if (lastRgb != rgb || lastBrightness != brightness)
    {
        debugPrint("LED color and/or brightness has changed\n");
        changeColorPending = true;
        waitingForColor = false;
    }
    
    if (changeColorPending)
    {
        setColor(rgb, brightness);
        changeColorPending = false;
    }
    

    }

    void setColor(uint32_t rgb, uint8_t brightness)
    {
    float r = ((rgb >> 16) & 0xFF);
    float g = ((rgb >> 8) & 0xFF);
    float b = (rgb & 0xFF);
    fill_solid(leds, num_leds, CRGB::Black);
    FastLED.setBrightness(brightness);
    FastLED.show();
    FastLED.show();
    lastBrightness = brightness;
    waitingForColor = false;

    if (abs(r - 159) < 5 && abs(g - 127) < 5 && abs(b - 255) < 5 && brightness > 0)
    {
        // Detected Lavender
        debugPrint("Lavender detected, starting animated rainbow mode.\n");
        lastRgb = ((uint32_t)r << 16) | ((uint32_t)g << 8) | (uint32_t)b;
        rainbowActive = true;
        return;
    }
    
    debugPrint("Setting color: R=%d G=%d B=%d Brightness=%d\n", r, g, b, brightness);
    fill_solid(leds, num_leds, CRGB(r, g, b));
    FastLED.setBrightness(brightness);
    FastLED.show();
    FastLED.show();
    lastRgb = rgb;
    

    }

    void checkButton()
    {
    // Improved button debounce and debug toggle
    int reading = digitalRead(TRIGGER_PIN);
    if (reading != lastButtonState)
    {
    lastDebounceTime = millis();
    }
    if ((millis() - lastDebounceTime) > debounceDelay)
    {
    if (reading == buttonStatePressed)
    {
    if (!debugTogglePending)
    {
    debugTogglePending = true;
    debugToggleStart = millis();
    }
    // If held for 8 seconds, toggle debug
    if (debugTogglePending && (millis() - debugToggleStart > 8000))
    {
    enableDebug = !enableDebug;
    debugPrint("[DEBUG] Debug output toggled: %s\n", enableDebug ? "ON" : "OFF");
    debugTogglePending = false;
    }
    // If held for resetDelay, reset device
    if (millis() - debugToggleStart > resetDelay)
    {
    debugPrint("button was pressed for %lu ms, resetting device\n", millis() - debugToggleStart);
    digitalWrite(LED, !digitalRead(LED));
    WiFi.disconnect(true);
    wifiManager.resetSettings();
    ESP.restart();
    }
    }
    else
    {
    debugTogglePending = false;
    }
    }
    lastButtonState = reading;
    }

    void checkSignalStrength()
    {
    long rssi = WiFi.RSSI();
    int quality;
    if (rssi <= -100)
    {
    quality = 0;
    }
    else if (rssi >= -50)
    {
    quality = 100;
    }
    else
    {
    quality = 2 * (rssi + 100);
    }
    char buf[64];
    snprintf(buf, sizeof(buf), "Signal strength: %ld dBm (%d%%)", rssi, quality);
    telnetClient.println(buf);
    }

    void checkLedStatus()
    {
    int r = (int)((lastRgb >> 16) & 0xFF);
    int g = (int)((lastRgb >> 8) & 0xFF);
    int b = (int)(lastRgb & 0xFF);
    Serial.printf("LED Status: %s\n", lastBrightness > 0 ? "ON" : "OFF");
    telnetClient.printf("LED Status: %s\r\n", lastBrightness > 0 ? "ON" : "OFF");
    if (rainbowActive)
    {
    Serial.printf("Rainbow Mode: Active\n");
    telnetClient.printf("Rainbow Mode: Active\r\n");
    return;
    }
    Serial.printf("LED Color RGB: R=%d G=%d B=%d HEX: #%06X\n", r, g, b, lastRgb);
    Serial.printf("LED Brightness: %d (%d%%)\n", lastBrightness, (lastBrightness * 100) / 255);
    telnetClient.printf("LED Color RGB: R=%d G=%d B=%d HEX: #%06X\r\n", r, g, b, lastRgb);
    telnetClient.printf("LED Brightness: %d (%d%%)\r\n", lastBrightness, (lastBrightness * 100) / 255);
    }

    void setup()
    {
    Serial.begin(115200);
    WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
    setupSpiffs();

    String host = String(device_name);
    host.replace(" ", "");
    WiFi.hostname(host.c_str());
    
    String str_qty_leds = String(qty_leds);
    num_leds = str_qty_leds.toInt();
    debugPrint("[DEBUG] Setup Requested qty_leds: %d\n", num_leds);
    if (num_leds > NUM_LEDS)
    {
        debugPrint("[WARNING] qty_leds (%d) exceeds NUM_LEDS (%d), clamping to %d\n", num_leds, NUM_LEDS, NUM_LEDS);
        num_leds = NUM_LEDS;
    }
    if (num_leds < 1)
    {
        debugPrint("[WARNING] qty_leds (%d) is less than 1, setting to 1\n", num_leds);
        num_leds = 1;
    }
    
    pinMode(LED, OUTPUT);
    pinMode(TRIGGER_PIN, INPUT);
    ticker.attach(0.6, tick);
    
    // Check for forceportal.flag to trigger config portal only once
    bool forcePortal = SPIFFS.exists("/forceportal.flag");
    debugPrint("[WiFiManager] Detected forceportal.flag: %s\n", forcePortal ? "true" : "false");
    if (forcePortal)
    {
        debugPrint("[WiFiManager] Detected forceportal.flag, removing...\n");
        SPIFFS.remove("/forceportal.flag");
        debugPrint("[WiFiManager] Forcing config portal at boot...\n");
        wifiManager.startConfigPortal();
        debugPrint("[WiFiManager] Config portal started, waiting for credentials...\n");
    }
    
    wifiManager.setConnectTimeout(20); // 20 seconds
    wifiManager.setAPCallback(configModeCallback);
    wifiManager.setSaveConfigCallback(saveConfigCallback);
    
    WiFiManagerParameter custom_device_name("device_name", "Device Name", device_name, 32);
    WiFiManagerParameter custom_qty_leds("qty_leds", "Qty LEDs", qty_leds, 3);
    wifiManager.addParameter(&custom_device_name);
    wifiManager.addParameter(&custom_qty_leds);
    
    bool wifiConnected = wifiManager.autoConnect();
    if (wifiConnected)
    {
        debugPrint("WiFi connected\n");
        debugPrint("Device name: %s\n", device_name);
        debugPrint("IP address: %s\n", WiFi.localIP().toString().c_str());
        ticker.detach();
    

    #ifdef ESP32
    digitalWrite(LED, HIGH); // ON for ESP32
    #else
    digitalWrite(LED, LOW); // ON for ESP8266
    #endif
    // Get portal values after connection
    strlcpy(device_name, custom_device_name.getValue(), sizeof(device_name));
    strlcpy(qty_leds, custom_qty_leds.getValue(), sizeof(qty_leds));
    debugPrint("'");
    debugPrint(device_name);
    debugPrint("' connected... yeaay :)\n");

        if (MDNS.begin(host.c_str()))
        { // e.g., "mydevice" for mydevice.local
            debugPrint("mDNS responder started: %s.local\n", host.c_str());
        }
        else
        {
            debugPrint("Error starting mDNS responder\n");
        }
    
        if (shouldSaveConfig)
        {
            saveConfigFile();
            shouldSaveConfig = false;
            debugPrint("Config saved, rebooting...\n");
            delay(500);
            ESP.restart();
        }
    }
    else
    {
        debugPrint("[WiFiManager] WiFi not connected, starting config portal...\n");
        // Do NOT reboot, allow portal to run
    }
    
    if (WiFi.isConnected())
    {
        ArduinoOTA.setHostname(host.c_str());
        ArduinoOTA.setPasswordHash("06a5dd46cd025a54fc604b77bf57d065");
        ArduinoOTA.onStart([]()
                           {
            String type;
            if (ArduinoOTA.getCommand() == U_FLASH) {
                type = "sketch";
            } else {
                type = "filesystem";
            }
            debugPrint("Start updating %s\n", type.c_str()); });
        ArduinoOTA.onEnd([]()
                         { debugPrint("\nEnd\n"); });
        ArduinoOTA.onProgress([](unsigned int progress, unsigned int total)
                              { debugPrint("Progress: %u%%\r\n", (progress / (total / 100))); });
        ArduinoOTA.onError([](ota_error_t error)
                           {
            debugPrint("Error[%u]: ", error);
            if (error == OTA_AUTH_ERROR) {
                debugPrint("Auth Failed\n");
            } else if (error == OTA_BEGIN_ERROR) {
                debugPrint("Begin Failed\n");
            } else if (error == OTA_CONNECT_ERROR) {
                debugPrint("Connect Failed\n");
            } else if (error == OTA_RECEIVE_ERROR) {
                debugPrint("Receive Failed\n");
            } else if (error == OTA_END_ERROR) {
                debugPrint("End Failed\n");
            } });
        ArduinoOTA.begin();
        debugPrint("Ready for OTA updates\n");
        debugPrint("IP address: %s\n", WiFi.localIP().toString().c_str());
    
        espalexa.addDevice(device_name, colorLightChanged);
        espalexa.begin();
        FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, num_leds)
            .setCorrection(TypicalLEDStrip);
        // set master brightness control
        FastLED.setBrightness(BRIGHTNESS);
    
        // initialize FastLED
        fill_solid(leds, num_leds, CRGB::Black);
        FastLED.show();
        FastLED.show();
        // delay(10);
        telnetServer.begin();
        debugPrint("Telnet server started on port 23\n");
    
        if (enableDebug)
        {
            // Test pattern to verify LED hardware
            debugPrint("Testing LED strip...\n");
            debugPrint("Number of LEDs: %d, color: Rainbow\n", num_leds);
            rainbowBootActive = true;
            rainbowBootStart = millis();
            debugPrint("Setup complete, waiting for commands...\n\n");
        }
        else
        {
            Serial.print("Setup complete, waiting for commands...\n\n");
        }
    }
    

    }

    void loop()
    {
    espalexa.loop();
    delay(10);
    ArduinoOTA.handle();
    MDNS.update();
    checkButton();

    // Non-blocking color change logic
    // If no color change arrived, proceed with current color
    if (waitingForColor && (millis() - powerOnTime >= directColorOnDelay))
    {
        debugPrint("Elapsed time since power ON: %u ms\n", millis() - powerOnTime);
        int rd = ((pendingRgb >> 16) & 0xFF) * pendingBrightness / 255;
        int gd = ((pendingRgb >> 8) & 0xFF) * pendingBrightness / 255;
        int bd = (pendingRgb & 0xFF) * pendingBrightness / 255;
        setColor(pendingRgb, pendingBrightness);
        lastRgb = pendingRgb;
        lastBrightness = pendingBrightness;
        waitingForColor = false;
        changeColorPending = false;
    }
    
    // Animated rainbow mode
    if (rainbowBootActive)
    {
        rainbow();
        FastLED.show();
        if (millis() - rainbowBootStart >= 5000)
        {
            rainbowBootActive = false;
            debugPrint("Boot rainbow animation finished.\n");
            fill_solid(leds, num_leds, CRGB::Black);
            FastLED.setBrightness(0);
            FastLED.show();
            FastLED.show();
        }
    }
    else if (rainbowActive)
    {
        rainbow();
        FastLED.show();
        FastLED.show();
    }
    
    // Telnet connection and command handling
    // Accept new client if needed
    if (telnetServer.hasClient())
    {
        if (telnetClient && telnetClient.connected())
        {
            telnetClient.stop();
        }
        telnetClient = telnetServer.available();
        telnetClient.println("Telnet connected!");
    }
    // Handle commands from client
    if (telnetClient && telnetClient.connected() && telnetClient.available())
    {
        String cmd = telnetClient.readStringUntil('\n');
        cmd.trim();
    
        if (cmd == "portal")
        {
            telnetClient.println("Starting WiFiManager portal on next boot...");
            File flagFile = SPIFFS.open("/forceportal.flag", "w");
            if (flagFile)
                flagFile.print("1");
            flagFile.close();
            ESP.restart();
        }
        else if (cmd == "debug")
        {
            enableDebug = !enableDebug;
            telnetClient.println(enableDebug ? "Debugging enabled." : "Debugging disabled.");
            saveConfigFile();
        }
        else if (cmd == "status")
        {
            if (WiFi.isConnected())
            {
                telnetClient.println("\nWiFi Connected");
                telnetClient.println((String("SSID: ") + WiFi.SSID()).c_str());
                telnetClient.println((String("IP: ") + WiFi.localIP().toString()).c_str());
                checkSignalStrength();
            }
            else
            {
                telnetClient.println("\nWiFi Not Connected");
            }
            checkLedStatus();
            telnetClient.printf("Debug: %s\r\n", (enableDebug ? "Enabled" : "Disabled"));
        }
        else if (cmd == "reboot")
        {
            telnetClient.println("Rebooting device now...");
            ESP.restart();
        }
    }
    

    }
    `

  5. zackees commented on Sep 19, 2025

    @zackees
    Member

    The new WS2812B chipset has a reset time of 280 uS, which is significantly longer than the previous spec of 50 uS. Out of an abundance of caution i'm going to increase the reset time. It's backwards compatible with the WS2812 timings.

  6. zackees commented on Sep 19, 2025

    @zackees
    Member

    Manually download the library and install it and let me know if it works for you. If it doesn't then re-open this bug.

  7. mcpacific commented on Sep 19, 2025

    @mcpacific
    Author

    @zackees It seems to work for the most part. However, my "rainbow mode" does not (running the Pride 2015 animation no longer works when I have Alexa change the color to lavender).

  8. zackees commented on Sep 19, 2025

    @zackees
    Member

    prove to me this isn't user error for this one.

  9. added a commit that references this issue on Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions