Giter Club home page Giter Club logo

wled's Introduction

Welcome to my project WLED! ✨

A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B, WS2811, SK6812) LEDs or also SPI based chipsets like the WS2801 and APA102!

⚙️ Features

  • WS2812FX library with more than 100 special effects
  • FastLED noise effects and 50 palettes
  • Modern UI with color, effect and segment controls
  • Segments to set different effects and colors to user defined parts of the LED string
  • Settings page - configuration via the network
  • Access Point and station mode - automatic failsafe AP
  • Up to 10 LED outputs per instance
  • Support for RGBW strips
  • Up to 250 user presets to save and load colors/effects easily, supports cycling through them.
  • Presets can be used to automatically execute API calls
  • Nightlight function (gradually dims down)
  • Full OTA software updateability (HTTP + ArduinoOTA), password protectable
  • Configurable analog clock (Cronixie, 7-segment and EleksTube IPS clock support via usermods)
  • Configurable Auto Brightness limit for safe operation
  • Filesystem-based config for easier backup of presets and settings

💡 Supported light control interfaces

  • WLED app for Android and iOS
  • JSON and HTTP request APIs
  • MQTT
  • E1.31, Art-Net, DDP and TPM2.net
  • diyHue (Wled is supported by diyHue, including Hue Sync Entertainment under udp. Thanks to Gregory Mallios)
  • Hyperion
  • UDP realtime
  • Alexa voice control (including dimming and color)
  • Sync to Philips hue lights
  • Adalight (PC ambilight via serial) and TPM2
  • Sync color of multiple WLED devices (UDP notifier)
  • Infrared remotes (24-key RGB, receiver required)
  • Simple timers/schedules (time from NTP, timezones/DST supported)

📲 Quick start guide and documentation

See the documentation on our official site!

On this page you can find excellent tutorials and tools to help you get your new project up and running!

🖼️ User interface

💾 Compatible hardware

See here!

✌️ Other

Licensed under the MIT license
Credits here!

Join the Discord server to discuss everything about WLED!

Check out the WLED Discourse forum!

You can also send me mails to [email protected], but please, only do so if you want to talk to me privately.

If WLED really brightens up your day, you can

Disclaimer:

If you are prone to photosensitive epilepsy, we recommended you do not use this software.
If you still want to try, don't use strobe, lighting or noise modes or high effect speed settings.

As per the MIT license, I assume no liability for any damage to you or any other person or equipment.

wled's People

Contributors

aircoookie avatar ajotanc avatar albarlow avatar blazoncek avatar def3nder avatar dependabot[bot] avatar ewoudwijma avatar ezcgman avatar fishbone-git avatar garyd9 avatar huksley avatar jeffresc avatar lost-hope avatar mountainash avatar moustachauve avatar mxklb avatar pbolduc avatar pjhatch avatar proto-molecule avatar psandro avatar scottrbailey avatar softhack007 avatar srg74 avatar stringandstickytape avatar travisdean avatar troyhacks avatar w00000dy avatar werkstrom avatar wiesendaniel avatar wled-install avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wled's Issues

Help with "Enhancement"

I would like to add a Status Indicator LED that works with certain states. Something simple, such as:
LED Blinking when either not connected to the defined WiFi or Unconnected in AP-mode.
LED Solid when connected to defined Wifi or there's a connection to the AP AND RGB(W) lights are on.
LED OFF when RGB(W) lights are off.

I'm sifting through the code, and have gotten some additions in place, but I'm sure there's either an easier way, or I'm missing a few things, such as, where can I find a flag that something is connected to the AP, and also, a flag that the RGB(W) lights are on/off, so that this 'Status Indicator' can toggle with both hardware button and the web interface power button?

Change LED colors from another PC in LAN

Hello,
I would like to constantly send string of colors for let's say LEDs to esp8266 from another computer in my network (so not just use predefined effects in esp, but my own values for LED strip). How this can be done?

P.S. also some kind of "smoothing" would be great between original colors on LED strip to newly sent colors for LED strip (I mean smoothing effect for customly set frequency probably 10-100ms - just to prevent choppy fast unpleasant changing of colors from old colors to new colors).

Single yellow led on startup

Hey,

First thing - thank you, I already really enjoyed ws2182fx and this implementation is awesome, so many cool features! I am working on creating a mobile friendly UI for it.

My question: when I power up the device, a single led will turn yellow for a second or so and then it fades into the boot preset, is this intended? If so, can it be changed?

I'm using a NodeMCU ESP8266 and 30 SK6812 Leds.

Thanks!

FX range with analog clock overlay.

First of all, this is a great work you've done here :)

I'm using 0.7.1 rev and using it for an analog clock. I'm currently aving 144 leds, 0 to 119 being the clock and 120 to 144 being for fx animations (i would like to tie them to a wheater api in the future)

But as i understand it, the clock is an overlay so any animations that runs underneat it, are partly hidden (as a fact).

Is there a way to define range of FX animations (like the range in the clock sections) ?

Thx a lot for your work again. (and i'm looking forward the API macro timed calls :) )

Using Alexa without actual hardware device

Hi there,
please does somebody know how to emulate Alexa without real alexa device (e.g. without Echo Dot2)? I would really like to try Wled control via alexa but I don't have Alexa device at home. Many thanks

Forced to use GPIO2?

First of all, thanks for creating such an awesome project!
However, I was wondering why it is necessary to use PIN 2 (GPIO2)? I'm using a custom led level shifter pcb with a sn74ahct125n chip. This makes it easy to create the 5v logic and saves me a lot of wiring issues/looks better.

I have a couple of these pcb's lying around, but they are designed to work with either D2 or D6. Is there a way to get this to work or do i have to use the messy route?

edit: just read in another issue that this is not possible due to the protocol used. Sorry for the inconvenience.

UI effects tab: Right Arrow on FX 57 cycles to FX 53

Hi @Aircoookie, I found out once you reach 57th effect and click on the right arrow again (it should go to 1st effect), it goes to 53rd effect and then step by step to 57th - so it is not going from start 1st effect once right button is clicked on the effect No 57.

Using a Sound Sensor?

Since this project uses W2812FX, which has support for sound sensors, I was thinking of using one. How would I go about doing that?

I don’t know if this is at all possible but the ability to turn it on and off would also be amazing.

Wrong Power Supply???

Im using this awesome software currently on a Wemos D1 Mini and connected my LED Strip on the 12V+ Power line of my PC Power Supply. Everything works Fine.

When i connect a other 12v 10 Amp Power supply, The Strip beginns to flicker and ignores the Commands from the Wemos D1.

Any ideas why?

Make Cycle modifiers work stand-alone

Hey!

It seems &PA &PC &PX don't work when sent as standalone API requests. Have you been able to get these new features to work? If so, what API request are you using? 😀

Thanks heaps.

p.s I've sent some emails, the new UI is working really well!

MQTT Support?

Just curious if MQTT is on the horizon for units connected to wifi?

ESP32 support & flickering

Would you happen to know how to port your project to ESP32? All my kids want me to make them a night light/party light for their rooms, and I'm running out of esp8266s, but have several esp32s I could use. Its an awesome application!

Openhab Integration

Hi, this is not an issue.
Does anyone have already directly integrated WLED with an openhab server and has a documentation on this? Would like to avoid using any hub to be able to change colors and FX... ;)
Cheers, David

Philips HUE issue ?

Hi Christian, I've been trying to get WLED work on my Wemos but I have a problem. It boots fine, I can see the AP, I can configure my WLAN, reboots, connects to my WLAN fine, but... once it's in my WLAN, as soon as I try to access the WLED via IP, the IP stops responding to pings.
If I boot the device and do not access it, works fine, pings works fine.... but as soon as I try to go the web server, goes down. AND, I notice to be having some HUE Bridge issues, is it possible we have some kind of conflic if you own a HUE Bridge in the same network ?

WLED doesn't connect to my router

I compiled your source WLED 0.5dev (build 1801102) for my NodeMCU, connect to the WLED-AP access-point and typed in my wifi-setup.
The NodeMCU doesn't connect to my Fritz!Box 7490.
The Wifi-Setup of WLED shows: "Client IP: Not connected ".
I als tested static IP. No connection.
Now i erased the flash with esptool and flashed WLED_0.6.2_ESP8266_RGB.bin.
Connect to WLED-AP, clicked on "Connect the module to your local WiFi here!", typed in my SSID and password, saved, reboot.
No connection to router. Scanning WiFi with the APP Fing: No WLED-IP.
I have 6 other NodeMCU and Wemos D1 mini pro in my homenet and all work fine, but not with your WLED-Software.

Implement diyHue

Hi @Aircoookie , because I don't have Philips Hue bridge, I am trying it with this emulator https://github.com/mariusmotea/diyHue. Philips Hue mobile app successfully found this bridge, but when I save bridge IP in Wled, no wled device is added to Hue bridge. I also initiated http://bridgeIP/hue/linkbutton?username=Hue&password=Hue&action=Activate (on diyHue) but I am constantly getting Hue status: Inactive on Wled. Could you please try it, too? Probably I should buy one of that expensive Philips bridges :)

Server unresponsive after multiple requests

As of v0.5.0 on esp8266, the server may stop responding after changing many settings. It may only show "Loading..." text on the top of the page. The workaround is to wait a minute, the server will usually be availabe again, then. Otherwise, power cycle the ESP.

WiFi (re)connection improvements

Hi @Aircoookie ,
I found out, if I power cycle router and Wled at the same time, Wled boots up much faster than router but after that Wled is not trying to connect to wifi once available (once router is fully booted up). It is just minot issue, so I just wanted to let you know. :)

Blynk effect selection and params fix.

Hi !

I somewhat fixed wled_blynk.ino and it is working. Not sure if it's the best way tho but works anyway. I'm not setuped yet to fork and pull req. so here's the code snippet i've changed. Around lines 58-77.

BLYNK_WRITE(V4)
{
 effectCurrent = param.asInt()-1;//fx
 strip.setMode(effectCurrent);
 colorUpdated(6);
}

BLYNK_WRITE(V5)
{
 effectSpeed = param.asInt();//sx
 strip.setSpeed(effectSpeed);
 colorUpdated(6);
}

BLYNK_WRITE(V6)
{
 effectIntensity = param.asInt();//ix
 strip.setIntensity(effectIntensity);
 colorUpdated(6);
}

Support changing colour order

Hello, thank you for the great software.

I'd like to be able to change the order of the colour as my strip is RBG BRG instead of GRB.

Is it possible to (easily) do this in the source code?

Cannot connect to ESP module

Has anyone had any issues trying to connect to the ESP module for what I assume the initial WiFi config? When I use my PC even with my WNIC configured with a static IP of 192.168.2.5, the web UI is not accessible. I have also tried to use my phone or laptop and they both say the password is incorrect.

Alexa App not working on Arduino core 2.4.0

Hi,
I can succesfully use the webinterface to controll an LED strip and it is found in the Alexa app without any issues. The on/off status and brightness changes in the webinterface also gets updated in the Alexa App. But performing actions like switching off or adjusting the brigness from the app side, doesn´t have any effect.
Am I missing something?
Thank you, David

sketch (108%) of program storage space

Hi @Aircoookie
I am trying to burn version 0.7.1 to my esp8266-01 but I am getting this error:
Sketch uses 469491 bytes (108%) of program storage space. Maximum is 434160 bytes.
Global variables use 52292 bytes (63%) of dynamic memory, leaving 29628 bytes for local variables. Maximum is 81920 bytes.

With 0.6.5 version I did not have this problem.
Any idea please?

led stopped responding to UDP then started again

Hi @Aircoookie
currently I found out that for a while (few seconds) WLED (on my esp8266-01) stopped responding to any UDP incoming data (it switched to default color) and after some time (few seconds) it started to respond to UDP again. Any idea why this happens?

P.S. Wled did not reboot itself because time of run is the same, so no "powercycle" happened (I think if it resets itself it should reset even internal clock counter).

mDNS not working

The led.local host name doesn't seem to work properly. Needs investigation. Tested in 0.6.4 and 0.5.0.

Alexa Color change???

Hello is it right that Alexa only switch on and off and adjust the brightness? But Alexa can not change the colors ?

Sync multiple units over I2C/I2S? Multiple input pins to control functions?

This is a two-fer question for my specific use case... WLED00 will work better for my automotive project than anything else I've found, and with my distinct lack of programming ability, it will work almost perfectly as-is, if I want to control things via wifi.

What I'd like to do to make it 100% is have certain patterns/colors/functions happen upon any one (or more) inputs being triggered. Basically, a pin goes high, and thing happens. Specific use case: Turn Signal triggers GPIO pin. Amber chase occurs. Pin goes low again, revert back to previous state. Secondary pin controlled by park lamps equals dim red. Turn signal while park lamps active equals amber chase over dim red.

How difficult is it to add additional button capabilities to support something like this?

Syncing multiple units via I2C would allow some intercommunications between modules for things such as parade mode, where activating the input on a master unit would cause all units to go into pattern cycle mode, or some such.

Thoughts?

Error Compiling

This code looks awesome but I'm having a hard time compiling it on my end. I’m using Arduino 1.8.4 and the latest ESP core. I've tried multiple boards including the one you recommended in the readme.md file. Everything seems to compile fine until almost the very end and get this error message:

Arduino: 1.8.4 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Prebuilt (MSS=536), Disabled, None, 115200"

Build options changed, rebuilding all
Archiving built core (caching) in: C:\Users\JASONW~1\AppData\Local\Temp\arduino_cache_215143\core\core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,FlashSize_4M1M,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_None____,UploadSpeed_115200_7b72b833e5a4650743b2f437f2ae88d2.a
sketch\wled00.ino.cpp.o: In function `~StringSumHelper':

C:\Users\Jason Wolin\Dropbox\My Hobbies\ClockProduction\Code\Belgrade\wled00/wled12_alexa.ino:51: undefined reference to `NeoEsp8266Uart::NeoEsp8266Uart(unsigned short, unsigned int)'

sketch\wled00.ino.cpp.o: In function `__static_initialization_and_destruction_0':

C:\Users\Jason Wolin\Dropbox\My Hobbies\ClockProduction\Code\Belgrade\wled00/wled12_alexa.ino:51: undefined reference to `NeoEsp8266Uart::NeoEsp8266Uart(unsigned short, unsigned int)'

sketch\wled00.ino.cpp.o: In function `WS2812FX':

C:\Users\Jason Wolin\Dropbox\My Hobbies\ClockProduction\Code\Belgrade\wled00/wled12_alexa.ino:51: undefined reference to `NeoEsp8266Uart::~NeoEsp8266Uart()'

C:\Users\Jason Wolin\Dropbox\My Hobbies\ClockProduction\Code\Belgrade\wled00/wled12_alexa.ino:51: undefined reference to `NeoEsp8266Uart::~NeoEsp8266Uart()'

sketch\WS2812FX.cpp.o: In function `WS2812FX::setRange(int, int, unsigned int)':

sketch/WS2812FX.cpp:1904: undefined reference to `NeoEsp8266Uart::UpdateUart()'

sketch\WS2812FX.cpp.o: In function `NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266Uart>::Update()':

sketch/WS2812FX.cpp:1904: undefined reference to `NeoEsp8266Uart::UpdateUart()'

sketch\WS2812FX.cpp.o:(.text._ZN11NeoPixelBusI13NeoGrbFeature24NeoEsp8266UartMethodBaseI26NeoEsp8266UartSpeed800Kbps14NeoEsp8266UartEE5BeginEv[_ZN11NeoPixelBusI13NeoGrbFeature24NeoEsp8266UartMethodBaseI26NeoEsp8266UartSpeed800Kbps14NeoEsp8266UartEE5BeginEv]+0x4): undefined reference to `NeoEsp8266Uart::InitializeUart(unsigned int)'

sketch\WS2812FX.cpp.o: In function `NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266Uart>::Initialize()':

sketch/WS2812FX.cpp:1904: undefined reference to `NeoEsp8266Uart::InitializeUart(unsigned int)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Freeze at startup during WiFi initialization

Hey!

Still loving this project and still working on an API based HTML user interface 😄

Recently I was working on adding the presets, I've noticed that when the device now boots up with a fancy effect instead of a static colour, the effect seems to lag a bit and freezes for a moment during the first few seconds then goes to working normally. Is this just the hardware lagging when the WiFi connects or something?

Also it seems you can not update Preset 0, which is fine because you can change the boot preset to another number and update that. Just thought I'd note it as I thought I was doing something wrong for a while 😄

Thanks again! Do you have a contact email so I can send you the HTML UI I have been working on? I'm not very experienced with contributing via GitHub itself.

Supporting up to 1024 LEDs

Currently assessing implementation difficulties. Several EEPROM storage spaces for LED indices need to be extended. I'm optimistic this will work, however!

Alexa control

Hi, I dont know if it is an issue or if I do a mistake.

I just set up my ESP8266 with your basic HTTP OTA updater installing the wled05dev_1801102_RGB_ESP8266.bin, wich was quite easy. Thumbs up!

After this I typed in my wifi data and everything seems to work. (I haven't connected my LED's yet).

But when I search for new devices with my echo dot, it cant find the esp8266.
The option "Emulate Alexa device" is on.
Do I have to activate a skill or so?

LED flickering and Levelshifter related issues

I installed the binary, compiled your source myself and wled doesn‘t work with my 60 led WS2812B.
Only randomly flickering some leds.
I have a new NodeMCU, use a levelshifter on GPIO2.
The NodeMCU works with other programs, i messured the GPIO and the levelshifter.
Also my leds works with other programs....
The WS2812B has a separate 5V/4A Supply!

Regards
Jürgen

Philips Hue Sync not working

Hey,
somehow I'm not able to connect my bridge with WLED.
IP Adress of the bridge is right and the bridge is working with 6 lamps.
I've pressed the center button on the bridge and saved the settings page, but can't see any results from it.
The hue status underneath is still saying "inactive" and I can't see any added "lamps" in the hue app.

Am I doing something wrong?
Everything else is working fine

  • New version of bridge is used
  • WLED version 0.6.4
  • Using 5 x esp8266 (NodeMCU's) with RGBW LEDS (Sk6812)

Not much to complain .... THANKS :-)

What an amazing piece of code you have written !!
So far I have it controlling 15 meters of ws2811 on two esp's.

Only thing I miss so far, is in the Mobile theme ...
The on/off button is the same, whether the strips are actually on/off.

Kind Regards Bryan

priorities of services

Hi @Aircoookie , maybe I have not read wiki the right way, but what happens when I enable e.g. hyperion realtime, alexa, hue? I mean from prioritization point of view - will these services fight together? e.g. when hyperion changes realtime colors, then from time to time hue will reload remote color and will shows it for a while (flash) and hyperion continues in changing colors. Then alexa will send command to change color and flash again :) Will these services fight together or is there any prioritization implemented in Wled? (e.g. higher/lower priority for specific services)

ESP8266 Exception 28 (Adafruit Feather Huzzah)

What a great project! I'm coming over from the McLighting V2 project, trying to find something I can use standalone without relying on a WiFi signal (for our tent lights when camping), and discovered WLED00...

I'm running into an issue though. I'm using RGBW WS2812b LED strips. When flashing the OTA Updater sketch first, then uploading the pre-built 0.5 BIN, the units work beautifully, except for the coloring on the strips. The 0.5 image does not seem to support RGBW, or at least I can't find a way to specify the LED strip in the documentation or the sketch...

When I build the sketch myself, I leave everything as default except the SSID/PW for my home wireless (for my test units here), and enabling the serial debug.

I receive a constant Exception 28 reboot within half a second of the unit connecting to my wireless here at home.

`v3de0c112
~ld
Load EEPROM
CSSID: Den of SynUSING AP7
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC
C_NC

Connected! IP address: 192.168.1.146

Exception (28):
epc1=0x4000bf80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x0104a8c0 depc=0x00000000

ctx: cont
sp: 3fff3850 end: 3fff3ad0 offset: 01a0

stack>>>
3fff39f0: 3fff3a60 00000002 3fff7be8 40222785
3fff3a00: 0104a8c0 3fff1b34 3fff3a50 40223090
3fff3a10: 00000000 00000000 3fff2334 4021d3cb
3fff3a20: 3fff3a60 00000004 00000000 4020b33f
3fff3a30: 00000001 00ffffff 00000000 40224398
3fff3a40: 3ffe9980 3fff1b34 00000000 402185cb
3fff3a50: 3fff43b4 00000000 4020b314 402177e0
3fff3a60: 3ffe95a8 0104a8c0 feefeffe feefeffe
3fff3a70: feef0035 feefeffe feefeffe feefeffe
3fff3a80: 00000001 feefeffe feefeffe feefeffe
3fff3a90: feefeffe feefeffe feefeffe 3fff2aa4
3fff3aa0: 3fffdad0 00000000 3fff2a9d 40218744
3fff3ab0: feefeffe feefeffe feefeffe 40223278
3fff3ac0: feefeffe feefeffe 3fff2ab0 40100718
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v3de0c112
~ld
Load EEPROM
CSSID: Den of SynUSING AP7
`

flicker issue

Hi @Aircoookie, I created this separate thread. I found out that sometimes my LEDs flicker on my esp8266-01 (from time to time, randomly). I created short video https://streamable.com/6aygu by what I mean (all yellow leds are ok, then I sent UDP to change 4 leds to red and it was ok, but when LEDs was changing to default yellow color, you can see flicker). I can't say this happens just while switching color leds to default color, because it happens randomly. For example I wanted to create better video for you and reproduce flicker for you but already 10 minutes without flicker. :) (I did not try it level shifter as I think esp as 3.3v device should be good without it). Just wanted to let you know this. Maybe you know why it happens.

MQTT support implementation details question

Hello all,

some of you already asked for MQTT support, so I want to implement it for WLED some time soon.
This is the first feature of WLED that will be added without me using it, so I'd like to get some feedback from you on how you want the implementation to work! I'm planning to use the popular PubSubClient library.

For those planning to use MQTT, I'd be very happy if you could tell me something about your requirements and if they are met by the things I though about already:

  • What topics does WLED need to subscribe to? Is it enough if each ESP subscribes to the 2 configurable topics <yourcustomtopic>/<devicename>/<property> and <yourcustomtopic>/all/<property>. The custom topic could be anything you want, for example /myhome/bedroom/wled. With the "devicename" you could target one or with the "all" every device in that "group".

  • What "properties" would you like to see supported? Brightness and color for sure, also one to do any API call that would be possible via HTTP is what I thought of. In what format should brightness and color be supported? Comma separated ASCII integers, raw bits or hex strings?

  • Do you need WLED to publish any topics? Like current brightness, color, FX, or anything else? If yes, I think this would be easiest if WLED publishes to the topic <yourcustomtopic>/<devicename>/out/<property> every time the color or other property updates, right?

  • Do you have any other suggestions?

Thanks for your help! Since I don't use an MQTT broker or a central home automation framework, you will know your specific requirements better than I do :)

Increase FX speed?

Hey!

Version 0.7.1 😃😃😃!

I have recently acquired a 1M 144 LED strip, for more LED madness. WLED looks absolutely awesome on it! However, now that i've got such a high density strip, it seems the effects could be that little bit faster to make high speed effects look super cool on HD strips, and even faster on less dense strips.

Is this possible?

Thanks heaps

"White" color correction with different types of RGBW strips (WW,NW,CW) and using white channel for luminance

I am unable to correctly display the white color properly as my strips are RGB+WW (Warm White), It ends up looking very Yellow/Orange. It would be great to set a default white by mixing white and RGB to create a default white color to be displayed on the effects (even for Ambilight).

Color temperature correction and luminance calculation (if not yet implemented) would make a great difference in color accuracy!

This is an example with FastLed if it helps.

 // Getting luminance from value to add white leds
  // https://stackoverflow.com/questions/40312216/converting-rgb-to-rgbw
  if (W_ON_XY == true) {
    float tM = MAX(ri, (MAX(gi, bi)));
  
    if(tM == 0) {
      rgbw[0] = 0; rgbw[1] = 0; rgbw[2] = 0; rgbw[3] = 0;
    }
  
    // Figure out what the colour with 100% hue is
    float multiplier = 255.0f / tM;
    float hR = ri * multiplier;
    float hG = gi * multiplier;
    float hB = bi * multiplier;
  
    // Calculate whiteness of color
    float M = MAX(hR, MAX(hG,hB));
    float m = MIN(hR, MIN(hG,hB));
    float Luminance = ((M+m) / 2.0f - 127.5f) * (255.0f/127.5f) / multiplier;
    w = Luminance < 0.0f ? 0.0f : Luminance;
    w = Luminance > 255.0f ? 255.0f : Luminance;
  } else {
    w = 0.0f;
  }

  rgbw[0] = (int) (r * optimal_bri); rgbw[1] = (int) (g * optimal_bri); rgbw[2] = (int) (b * optimal_bri); rgbw[3] = (int) ((w * bri) /3);
}

void convert_ct() {

  int optimal_bri = int( 10 + bri / 1.04);
  int hectemp = 10000 / ct;
  int r, g, b;
  if (hectemp <= 66) {
    r = 255;
    g = 99.4708025861 * log(hectemp) - 161.1195681661;
    b = hectemp <= 19 ? 0 : (138.5177312231 * log(hectemp - 10) - 305.0447927307);
  } else {
    r = 329.698727446 * pow(hectemp - 60, -0.1332047592);
    g = 288.1221695283 * pow(hectemp - 60, -0.0755148492);
    b = 255;
  }
  float w = 0;
  uint8 percent_warm = ((ct - 150) * 100) / 350;

  w = ((optimal_bri * (100 - percent_warm)) / 100) / 3;

  w = w > 255 ? 255 : w;
  r = r > 255 ? 255 : r;
  g = g > 255 ? 255 : g;
  b = b > 255 ? 255 : b;
  rgbw[0] = r * (bri / 255.0f); rgbw[1] = g * (bri / 255.0f); rgbw[2] = b * (bri / 255.0f); rgbw[3] = w;
}



// Add cold white LEDs according to luminance/ whiteness in xy color selector

    float tM = MAX(ri, (MAX(gi, bi)));
  
    if(tM == 0) {
      rgbw[0] = 0; rgbw[1] = 0; rgbw[2] = 0; rgbw[3] = 0;
    }
  
    // Figure out what the colour with 100% hue is
    float multiplier = 255.0f / tM;
    float hR = ri * multiplier;
    float hG = gi * multiplier;
    float hB = bi * multiplier;
  
    // Calculate whiteness of color
    float M = MAX(hR, MAX(hG,hB));
    float m = MIN(hR, MIN(hG,hB));
    float Luminance = ((M+m) / 2.0f - 127.5f) * (255.0f/127.5f) / multiplier;
    w = Luminance < 0.0f ? 0.0f : Luminance;
    w = Luminance > 255.0f ? 255.0f : Luminance;
  } else {
    w = 0.0f;
  }

  rgbw[0] = (int) (r * optimal_bri); rgbw[1] = (int) (g * optimal_bri); rgbw[2] = (int) (b * optimal_bri); rgbw[3] = (int) ((w * bri) /3);
}



void convert_xy()
{
  int optimal_bri = bri;
  if (optimal_bri < 5) {
    optimal_bri = 5;
  }
  float Y = y;
  float X = x;
  float Z = 1.0f - x - y;

  // sRGB D65 conversion
  float r =  X * 3.2406f - Y * 1.5372f - Z * 0.4986f;
  float g = -X * 0.9689f + Y * 1.8758f + Z * 0.0415f;
  float b =  X * 0.0557f - Y * 0.2040f + Z * 1.0570f;

//  // Apply gamma correction v.2
//  // Altering exponents at end can create different gamma curves
//  r = r <= 0.04045f ? r / 12.92f : pow((r + 0.055f) / (1.0f + 0.055f), 2.4f);
//  g = g <= 0.04045f ? g / 12.92f : pow((g + 0.055f) / (1.0f + 0.055f), 2.4f);
//  b = b <= 0.04045f ? b / 12.92f : pow((b + 0.055f) / (1.0f + 0.055f), 2.4f);

  // Apply gamma correction v.1 (better color accuracy), try this first!
  r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f;
  g = g <= 0.0031308f ? 12.92f * g : (1.0f + 0.055f) * pow(g, (1.0f / 2.4f)) - 0.055f;
  b = b <= 0.0031308f ? 12.92f * b : (1.0f + 0.055f) * pow(b, (1.0f / 2.4f)) - 0.055f;

  if (r > b && r > g) {
    // red is biggest
    if (r > 1.0f) {
      g = g / r;
      b = b / r;
      r = 1.0f;
    }
  }
  else if (g > b && g > r) {
    // green is biggest
    if (g > 1.0f) {
      r = r / g;
      b = b / g;
      g = 1.0f;
    }
  }
  else if (b > r && b > g) {
    // blue is biggest
    if (b > 1.0f) {
      r = r / b;
      g = g / b;
      b = 1.0f;
    }
  }

  r = r < 0 ? 0 : r;
  g = g < 0 ? 0 : g;
  b = b < 0 ? 0 : b;

  float ri = r;
  float gi = g;
  float bi = b;
  ri = ri > 1.0f ? 1.0f : ri;
  gi = gi > 1.0f ? 1.0f : gi;
  bi = bi > 1.0f ? 1.0f : bi;
  ri = ri < 0.0f ? 0.0f : ri;
  gi = gi < 0.0f ? 0.0f : gi;
  bi = bi < 0.0f ? 0.0f : bi;
  float w = 0.0f;

  // Getting luminance from value to add white leds
  // https://stackoverflow.com/questions/40312216/converting-rgb-to-rgbw
  if (W_ON_XY == true) {
    float tM = MAX(ri, (MAX(gi, bi)));
  
    if(tM == 0) {
      rgbw[0] = 0; rgbw[1] = 0; rgbw[2] = 0; rgbw[3] = 0;
    }
  
    // Figure out what the colour with 100% hue is
    float multiplier = 255.0f / tM;
    float hR = ri * multiplier;
    float hG = gi * multiplier;
    float hB = bi * multiplier;
  
    // Calculate whiteness of color
    float M = MAX(hR, MAX(hG,hB));
    float m = MIN(hR, MIN(hG,hB));
    float Luminance = ((M+m) / 2.0f - 127.5f) * (255.0f/127.5f) / multiplier;
    w = Luminance < 0.0f ? 0.0f : Luminance;
    w = Luminance > 255.0f ? 255.0f : Luminance;
  } else {
    w = 0.0f;
  }

  rgbw[0] = (int) (r * optimal_bri); rgbw[1] = (int) (g * optimal_bri); rgbw[2] = (int) (b * optimal_bri); rgbw[3] = (int) ((w * bri) /3);
}

void convert_ct() {

  int optimal_bri = int( 10 + bri / 1.04);
  int hectemp = 10000 / ct;
  int r, g, b;
  if (hectemp <= 66) {
    r = 255;
    g = 99.4708025861 * log(hectemp) - 161.1195681661;
    b = hectemp <= 19 ? 0 : (138.5177312231 * log(hectemp - 10) - 305.0447927307);
  } else {
    r = 329.698727446 * pow(hectemp - 60, -0.1332047592);
    g = 288.1221695283 * pow(hectemp - 60, -0.0755148492);
    b = 255;
  }
  float w = 0;
  uint8 percent_warm = ((ct - 150) * 100) / 350;

  w = ((optimal_bri * (100 - percent_warm)) / 100) / 3;

  w = w > 255 ? 255 : w;
  r = r > 255 ? 255 : r;
  g = g > 255 ? 255 : g;
  b = b > 255 ? 255 : b;
  rgbw[0] = r * (bri / 255.0f); rgbw[1] = g * (bri / 255.0f); rgbw[2] = b * (bri / 255.0f); rgbw[3] = w;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.