Closed Dreamoffice closed 3 years ago
From config it looks like one output per LED. If tasmota can go on there, so can WLED but the problem is that WLED can currently only do one output. There is work being done to add support, but that will be some time. If you just want to see if there will be a future worth waiting for, you should be able to upload a wled binary onto tasmota_mininal and see what you get for control of one LED. You would need a custom build as WLED release with either GPIO2 or 3 for output.
personally, I would probably look at ESPhome for a device like this one. I did the same for an RGB bulb (tuya_convert->tasmota). Same bad colour transitions, but ESPhome is better and you do have some ability to configure basic single LED effects. Plus, it will do multiple PWM outputs
thanks for your reply. do you have an idea how to flash esphome to the device.? i don t have access to the board, only via wifi
You can compile esphome without uploading it, then select that binary when updating from Tasmota. You may need to load the tasmota_minimal binary first to have enough room for esphome. If you know the IP address, you can also edit the esphome config file to use that IP address and it should upload when it builds. It is a bit more advanced that the tuya-convert process but once you have it set up, it's a fairly simple web page so manage the esphome config. You will likely find some good examples to borrow which will get you at least part of the way
Have you looked at https://github.com/Aircoookie/WLED/blob/master/wled00/NpbWrapper.h and editing it for analog LEDs and your configuration? WLED will control analog strips too!
@huggy-d1 thanks will try this tomorrow. Can in Upload wled to the board of I flash tasmota minimal on it?
how can i flash WLED to the device?
i just made few changes like on the screenshots below:
is this all i need to change?
Hi just a short Summary to flash WLED on the floodlights.
Setoption78 1
BUT i have a problem with the CW-LED. i can't control them. does anybody has an idea what i do wrong. I changed the Pins of the analog LED in the File NpbWrapper.h. Maybe i made some mistakes there???
` //this code is a modified version of https://github.com/Makuna/NeoPixelBus/issues/103
//PIN CONFIGURATION
//#define USE_APA102 // Uncomment for using APA102 LEDs. //#define USE_WS2801 // Uncomment for using WS2801 LEDs (make sure you have NeoPixelBus v2.5.6 or newer) //#define USE_LPD8806 // Uncomment for using LPD8806 //#define USE_P9813 // Uncomment for using P9813 LEDs (make sure you have NeoPixelBus v2.5.8 or newer)
//END CONFIGURATION
//PWM pins - PINs 15,13,12,14 (W2 = 04)are used with H801 Wifi LED Controller
#define RPIN 04 //R pin for analog LED strip
#define GPIN 12 //G pin for analog LED strip
#define BPIN 14 //B pin for analog LED strip
#define WPIN 13 //W pin for analog LED strip
#define W2PIN 05 //W2 pin for analog LED strip
#undef BTNPIN
#undef IR_PIN
#define IR_PIN 0 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
//PWM pins - PINs 5,12,13,15 are used with Magic Home LED Controller
#define GPIN 12 //G pin for analog LED strip
#define BPIN 15 //B pin for analog LED strip
#define WPIN 13 //W pin for analog LED strip
//automatically uses the right driver method for each platform
//autoselect the right method depending on strip pin
//you can now change the color order in the web settings
enum NeoPixelType { NeoPixelType_None = 0, NeoPixelType_Grb = 1, NeoPixelType_Grbw = 2, NeoPixelType_End = 3 };
class NeoPixelWrapper { public: NeoPixelWrapper() : // initialize each member to null _pGrb(NULL), _pGrbw(NULL), _type(NeoPixelType_None) {
}
~NeoPixelWrapper() { cleanup(); }
void Begin(NeoPixelType type, uint16_t countPixels) { cleanup(); _type = type;
switch (_type)
{
case NeoPixelType_Grb:
#if defined(USE_APA102) || defined(USE_WS2801) || defined(USE_LPD8806) || defined(USE_P9813)
_pGrb = new NeoPixelBrightnessBus<PIXELFEATURE3,PIXELMETHOD>(countPixels, CLKPIN, DATAPIN);
#else
_pGrb = new NeoPixelBrightnessBus<PIXELFEATURE3,PIXELMETHOD>(countPixels, LEDPIN);
#endif
_pGrb->Begin();
break;
case NeoPixelType_Grbw:
#if defined(USE_APA102) || defined(USE_WS2801) || defined(USE_LPD8806) || defined(USE_P9813)
_pGrbw = new NeoPixelBrightnessBus<PIXELFEATURE4,PIXELMETHOD>(countPixels, CLKPIN, DATAPIN);
#else
_pGrbw = new NeoPixelBrightnessBus<PIXELFEATURE4,PIXELMETHOD>(countPixels, LEDPIN);
#endif
_pGrbw->Begin();
break;
}
#ifdef WLED_USE_ANALOG_LEDS
#ifdef ARDUINO_ARCH_ESP32
ledcSetup(0, 5000, 8);
ledcAttachPin(RPIN, 0);
ledcSetup(1, 5000, 8);
ledcAttachPin(GPIN, 1);
ledcSetup(2, 5000, 8);
ledcAttachPin(BPIN, 2);
if(_type == NeoPixelType_Grbw)
{
ledcSetup(3, 5000, 8);
ledcAttachPin(WPIN, 3);
#ifdef WLED_USE_5CH_LEDS
ledcSetup(4, 5000, 8);
ledcAttachPin(W2PIN, 4);
#endif
}
#else // ESP8266
//init PWM pins
pinMode(RPIN, OUTPUT);
pinMode(GPIN, OUTPUT);
pinMode(BPIN, OUTPUT);
if(_type == NeoPixelType_Grbw)
{
pinMode(WPIN, OUTPUT);
#ifdef WLED_USE_5CH_LEDS
pinMode(W2PIN, OUTPUT);
#endif
}
analogWriteRange(255); //same range as one RGB channel
analogWriteFreq(880); //PWM frequency proven as good for LEDs
#endif
#endif
}
void SetRgbwPwm(uint8_t r, uint8_t g, uint8_t b, uint8_t w, uint8_t w2=0)
{
#ifdef ARDUINO_ARCH_ESP32
ledcWrite(0, r);
ledcWrite(1, g);
ledcWrite(2, b);
switch (_type) {
case NeoPixelType_Grb: break;
#ifdef WLED_USE_5CH_LEDS
case NeoPixelType_Grbw: ledcWrite(3, w); ledcWrite(4, w2); break;
#else
case NeoPixelType_Grbw: ledcWrite(3, w); break;
#endif
}
#else // ESP8266
analogWrite(RPIN, r);
analogWrite(GPIN, g);
analogWrite(BPIN, b);
switch (_type) {
case NeoPixelType_Grb: break;
#ifdef WLED_USE_5CH_LEDS
case NeoPixelType_Grbw: analogWrite(WPIN, w); analogWrite(W2PIN, w2); break;
#else
case NeoPixelType_Grbw: analogWrite(WPIN, w); break;
#endif
}
#endif
}
void Show() { byte b; switch (_type) { case NeoPixelType_Grb: _pGrb->Show(); break; case NeoPixelType_Grbw: _pGrbw->Show(); break; } }
void SetPixelColor(uint16_t indexPixel, RgbwColor color) { switch (_type) { case NeoPixelType_Grb: { _pGrb->SetPixelColor(indexPixel, RgbColor(color.R,color.G,color.B)); } break; case NeoPixelType_Grbw: {
_pGrbw->SetPixelColor(indexPixel, RgbColor(color.R,color.G,color.B));
#else
_pGrbw->SetPixelColor(indexPixel, color);
#endif
}
break;
}
}
void SetBrightness(byte b) { switch (_type) { case NeoPixelType_Grb: _pGrb->SetBrightness(b); break; case NeoPixelType_Grbw:_pGrbw->SetBrightness(b); break; } }
// NOTE: Due to feature differences, some support RGBW but the method name // here needs to be unique, thus GetPixeColorRgbw RgbwColor GetPixelColorRgbw(uint16_t indexPixel) const { switch (_type) { case NeoPixelType_Grb: return _pGrb->GetPixelColor(indexPixel); break; case NeoPixelType_Grbw: return _pGrbw->GetPixelColor(indexPixel); break; } return 0; }
uint8_t* GetPixels(void) { switch (_type) { case NeoPixelType_Grb: return _pGrb->Pixels(); break; case NeoPixelType_Grbw: return _pGrbw->Pixels(); break; } return 0; }
private: NeoPixelType _type;
// have a member for every possible type NeoPixelBrightnessBus<PIXELFEATURE3,PIXELMETHOD> _pGrb; NeoPixelBrightnessBus<PIXELFEATURE4,PIXELMETHOD> _pGrbw;
void cleanup() { switch (_type) { case NeoPixelType_Grb: delete _pGrb ; _pGrb = NULL; break; case NeoPixelType_Grbw: delete _pGrbw; _pGrbw = NULL; break; } } };
`
Have you set the led settings in the UI to 5-channel?
On Sun, Apr 5, 2020, 10:23 Dave, notifications@github.com wrote:
Hi just a short Summary to flash WLED on the floodlights.
- Flash the Floodlight with Tasmota using Tuya-Convert
- Flash Tasmonta-minimal.bin via the Tasmota UI
- Go to the Tasmota Console and enter the Command Setoption78 1
- Compile WLED with the 5Ch PWM LED configuration. (check code below)
- Flash the WLED Firmware.bin File via the Tasmota UI to Floodlight
- Configure WLED...... have fun
BUT i have a problem with the CW-LED. i can't control them. does anybody has an idea what i do wrong. I changed the Pins of the analog LED in the File NpbWrapper.h. Maybe i made some mistakes there???
`//this code is a modified version of Makuna/NeoPixelBus#103 https://github.com/Makuna/NeoPixelBus/issues/103
ifndef NpbWrapper_h
define NpbWrapper_h
//PIN CONFIGURATION
ifndef LEDPIN
define LEDPIN 2 //strip pin. Any for ESP32, gpio2 or 3 is recommended for
ESP8266 (gpio2/3 are labeled D4/RX on NodeMCU and Wemos)
endif
//#define USE_APA102 // Uncomment for using APA102 LEDs. //#define USE_WS2801 // Uncomment for using WS2801 LEDs (make sure you have NeoPixelBus v2.5.6 or newer) //#define USE_LPD8806 // Uncomment for using LPD8806 //#define USE_P9813 // Uncomment for using P9813 LEDs (make sure you have NeoPixelBus v2.5.8 or newer)
define WLED_USE_ANALOG_LEDS //Uncomment for using "dumb" PWM controlled
LEDs (see pins below, default R: gpio5, G: 12, B: 15, W: 13)
define WLED_USE_H801 //H801 controller. Please uncomment #define
WLED_USE_ANALOG_LEDS as well
define WLED_USE_5CH_LEDS //5 Channel H801 for cold and warm white
ifndef BTNPIN
define BTNPIN 0 //button pin. Needs to have pullup (gpio0 recommended)
endif
ifndef IR_PIN
define IR_PIN 4 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
endif
ifndef RLYPIN
define RLYPIN 12 //pin for relay, will be set HIGH if LEDs are on (-1 to
disable). Also usable for standby leds, triggers,...
endif
ifndef AUXPIN
define AUXPIN -1 //debug auxiliary output pin (-1 to disable)
endif
ifndef RLYMDE
define RLYMDE 1 //mode for relay, 0: LOW if LEDs are on 1: HIGH if LEDs
are on
endif
//END CONFIGURATION
if defined(USE_APA102) || defined(USE_WS2801) || defined(USE_LPD8806) ||
defined(USE_P9813)
define CLKPIN 0
define DATAPIN 2
if BTNPIN == CLKPIN || BTNPIN == DATAPIN
undef BTNPIN // Deactivate button pin if it conflicts with one of the
APA102 pins.
endif
endif
ifdef WLED_USE_ANALOG_LEDS
//PWM pins - PINs 15,13,12,14 (W2 = 04)are used with H801 Wifi LED Controller
ifdef WLED_USE_H801
define RPIN 04 //R pin for analog LED strip
define GPIN 12 //G pin for analog LED strip
define BPIN 14 //B pin for analog LED strip
define WPIN 13 //W pin for analog LED strip
define W2PIN 05 //W2 pin for analog LED strip
undef BTNPIN
undef IR_PIN
define IR_PIN 0 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
else
//PWM pins - PINs 5,12,13,15 are used with Magic Home LED Controller
define RPIN 5 //R pin for analog LED strip
define GPIN 12 //G pin for analog LED strip
define BPIN 15 //B pin for analog LED strip
define WPIN 13 //W pin for analog LED strip
endif
undef RLYPIN
define RLYPIN -1 //disable as pin 12 is used by analog LEDs
endif
//automatically uses the right driver method for each platform
ifdef ARDUINO_ARCH_ESP32
ifdef USE_APA102
define PIXELMETHOD DotStarMethod
elif defined(USE_WS2801)
define PIXELMETHOD NeoWs2801Method
elif defined(USE_LPD8806)
define PIXELMETHOD Lpd8806Method
elif defined(USE_P9813)
define PIXELMETHOD P9813Method
else
define PIXELMETHOD NeoEsp32Rmt0Ws2812xMethod
endif
else //esp8266
//autoselect the right method depending on strip pin
ifdef USE_APA102
define PIXELMETHOD DotStarMethod
elif defined(USE_WS2801)
define PIXELMETHOD NeoWs2801Method
elif defined(USE_LPD8806)
define PIXELMETHOD Lpd8806Method
elif defined(USE_P9813)
define PIXELMETHOD P9813Method
elif LEDPIN == 2
define PIXELMETHOD NeoEsp8266Uart1Ws2813Method //if you get an error
here, try to change to NeoEsp8266UartWs2813Method or update Neopixelbus
elif LEDPIN == 3
define PIXELMETHOD NeoEsp8266Dma800KbpsMethod
else
define PIXELMETHOD NeoEsp8266BitBang800KbpsMethod
pragma message "Software BitBang will be used because of your selected
LED pin. This may cause flicker. Use GPIO 2 or 3 for best results."
endif
endif
//you can now change the color order in the web settings
ifdef USE_APA102
define PIXELFEATURE3 DotStarBgrFeature
define PIXELFEATURE4 DotStarLbgrFeature
elif defined(USE_LPD8806)
define PIXELFEATURE3 Lpd8806GrbFeature
define PIXELFEATURE4 Lpd8806GrbFeature
elif defined(USE_P9813)
define PIXELFEATURE3 P9813BgrFeature
define PIXELFEATURE4 NeoGrbwFeature
else
define PIXELFEATURE3 NeoGrbFeature
define PIXELFEATURE4 NeoGrbwFeature
endif
include
enum NeoPixelType { NeoPixelType_None = 0, NeoPixelType_Grb = 1, NeoPixelType_Grbw = 2, NeoPixelType_End = 3 };
class NeoPixelWrapper { public: NeoPixelWrapper() : // initialize each member to null _pGrb(NULL), _pGrbw(NULL), _type(NeoPixelType_None) {
}
~NeoPixelWrapper() { cleanup(); }
void Begin(NeoPixelType type, uint16_t countPixels) { cleanup(); _type = type;
switch (_type) { case NeoPixelType_Grb:
if defined(USE_APA102) || defined(USE_WS2801) || defined(USE_LPD8806) || defined(USE_P9813)
_pGrb = new NeoPixelBrightnessBus<PIXELFEATURE3,PIXELMETHOD>(countPixels, CLKPIN, DATAPIN);
else
_pGrb = new NeoPixelBrightnessBus<PIXELFEATURE3,PIXELMETHOD>(countPixels, LEDPIN);
endif
_pGrb->Begin();
break;
case NeoPixelType_Grbw:
if defined(USE_APA102) || defined(USE_WS2801) || defined(USE_LPD8806) || defined(USE_P9813)
_pGrbw = new NeoPixelBrightnessBus<PIXELFEATURE4,PIXELMETHOD>(countPixels, CLKPIN, DATAPIN);
else
_pGrbw = new NeoPixelBrightnessBus<PIXELFEATURE4,PIXELMETHOD>(countPixels, LEDPIN);
endif
_pGrbw->Begin();
break; }
ifdef WLED_USE_ANALOG_LEDS
ifdef ARDUINO_ARCH_ESP32
ledcSetup(0, 5000, 8); ledcAttachPin(RPIN, 0); ledcSetup(1, 5000, 8); ledcAttachPin(GPIN, 1); ledcSetup(2, 5000, 8); ledcAttachPin(BPIN, 2); if(_type == NeoPixelType_Grbw) { ledcSetup(3, 5000, 8); ledcAttachPin(WPIN, 3); #ifdef WLED_USE_5CH_LEDS ledcSetup(4, 5000, 8); ledcAttachPin(W2PIN, 4); #endif }
else // ESP8266
//init PWM pins pinMode(RPIN, OUTPUT); pinMode(GPIN, OUTPUT); pinMode(BPIN, OUTPUT); if(_type == NeoPixelType_Grbw) { pinMode(WPIN, OUTPUT); #ifdef WLED_USE_5CH_LEDS pinMode(W2PIN, OUTPUT); #endif } analogWriteRange(255); //same range as one RGB channel analogWriteFreq(880); //PWM frequency proven as good for LEDs
endif
endif
}
ifdef WLED_USE_ANALOG_LEDS
void SetRgbwPwm(uint8_t r, uint8_t g, uint8_t b, uint8_t w, uint8_t w2=0) {
ifdef ARDUINO_ARCH_ESP32
ledcWrite(0, r); ledcWrite(1, g); ledcWrite(2, b); switch (_type) { case NeoPixelType_Grb: break;
ifdef WLED_USE_5CH_LEDS
case NeoPixelType_Grbw: ledcWrite(3, w); ledcWrite(4, w2); break;
else
case NeoPixelType_Grbw: ledcWrite(3, w); break;
endif
}
else // ESP8266
analogWrite(RPIN, r); analogWrite(GPIN, g); analogWrite(BPIN, b); switch (_type) { case NeoPixelType_Grb: break;
ifdef WLED_USE_5CH_LEDS
case NeoPixelType_Grbw: analogWrite(WPIN, w); analogWrite(W2PIN, w2); break;
else
case NeoPixelType_Grbw: analogWrite(WPIN, w); break;
endif
}
endif
}
endif
void Show() { byte b; switch (_type) { case NeoPixelType_Grb: _pGrb->Show(); break; case NeoPixelType_Grbw: _pGrbw->Show(); break; } }
void SetPixelColor(uint16_t indexPixel, RgbwColor color) { switch (_type) { case NeoPixelType_Grb: { _pGrb->SetPixelColor(indexPixel, RgbColor(color.R,color.G,color.B)); } break; case NeoPixelType_Grbw: {
ifdef USE_LPD8806
_pGrbw->SetPixelColor(indexPixel, RgbColor(color.R,color.G,color.B));
else
_pGrbw->SetPixelColor(indexPixel, color);
endif
} break; }
}
void SetBrightness(byte b) { switch (_type) { case NeoPixelType_Grb: _pGrb->SetBrightness(b); break; case NeoPixelType_Grbw:_pGrbw->SetBrightness(b); break; } }
// NOTE: Due to feature differences, some support RGBW but the method name // here needs to be unique, thus GetPixeColorRgbw RgbwColor GetPixelColorRgbw(uint16_t indexPixel) const { switch (_type) { case NeoPixelType_Grb: return _pGrb->GetPixelColor(indexPixel); break; case NeoPixelType_Grbw: return _pGrbw->GetPixelColor(indexPixel); break; } return 0; }
uint8_t* GetPixels(void) { switch (_type) { case NeoPixelType_Grb: return _pGrb->Pixels(); break; case NeoPixelType_Grbw: return _pGrbw->Pixels(); break; } return 0; }
private: NeoPixelType _type;
// have a member for every possible type NeoPixelBrightnessBus<PIXELFEATURE3,PIXELMETHOD> _pGrb; NeoPixelBrightnessBus<PIXELFEATURE4,PIXELMETHOD> _pGrbw;
void cleanup() { switch (_type) { case NeoPixelType_Grb: delete _pGrb ; _pGrb = NULL; break; case NeoPixelType_Grbw: delete _pGrbw; _pGrbw = NULL; break; } } };
endif
`
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Aircoookie/WLED/issues/798#issuecomment-609378475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMWFW4AAGHF4KHIVQTH33EDRLA5X5ANCNFSM4LTNJXSQ .
@fishbone-git where can i change to 5Ch in the UI? i only see 4ch :-(
Apologies. I meant the 4, but typed 5 from reading your mention of 5ch. I'm not too familiar with the novostella flood. It's RGBWW/CW? Rather hard to read the code you've pasted but it looks like you have the 5CH defined. Any chance the pin is wrong? Perhaps someone else has tried the same light (I've seen them mentioned a few places on the hobby sites) and they'll have some input.
Which hobby site so you mean? I defined the same pins as in tasmota
WLED is really geared up for digital strips. I used it on analogue, but soon went back to ESPHome.
Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. Thank you for using WLED!
I'm also looking to put WLED onto these floods, mainly because I'd like E1.31 support for them.
If anyone has anything they can share I'm all ears.
edit
I've got WLED onto the hardware, web UI all working, had to use the 1mb version to get it to fit. I can turn the light on and off, but I can't change the color.
Purchased the same floods and love them but never knew they had E1.31!!! How did you all get WLED on them and did you use the code above? I'm a bit of a rookie at all this, but I am actively used WLED and love to integrate this into my xLights.
Only way I've seen e1.31 is here, but not tried it myself: https://github.com/thehookup/E131-MQTT-RGBW-Lights
Shame the ESPHome e1.31 support is addressable only too.
... I've got WLED onto the hardware, web UI all working, had to use the 1mb version to get it to fit. I can turn the light on and off, but I can't change the color.
Did you follow the instructions above by @Dreamoffice from Apr 5? They stated they used the 4CH setup, with the 4 PINs configured same as TASMOTA.
... I've got WLED onto the hardware, web UI all working, had to use the 1mb version to get it to fit. I can turn the light on and off, but I can't change the color.
Did you follow the instructions above by @Dreamoffice from Apr 5? They stated they used the 4CH setup, with the 4 PINs configured same as TASMOTA.
Not quiet yet, I need to get sometime to reformat the code that was posted above and then compile myself. I was just using the pre-compiled binaries as a first step.
Only way I've seen e1.31 is here, but not tried it myself: https://github.com/thehookup/E131-MQTT-RGBW-Lights
Shame the ESPHome e1.31 support is addressable only too.
Ah, I hadn't found that repo. If I can't get WLED working, then I may fall back to that.
Anyone get progress with these? If so, would you mind posting a bit about how? I found this repo: https://github.com/hhromic/e131-mqtt-bridge but haven't had luck getting it to work (with ESPHome & MQTT)
I was able to get these to work on my Lamps. No software changes are required on a modern (0.13) version of WLED! Getting WLED on them in the first place is tough though. https://www.xkyle.com/WLED-on-a-Novostella-Flood-Lamp/
For me I finally have them under control of Xlights, however its not using WLED (although it could).
I had orignally flashed my floods with standard Tasmota so that I could have some basic control through HomeAssistant with scenes. However in version 10.1.0.4 of Tasmota they added a tiny line to the change log... DDP schemes for light and WS2812 (#14017)
. But this isn't enabled by default, so I used a custom compiled version of Tasmota found here with it enabled.
Once flashed run the console command Scheme 5
and that will enable DDP. You can then either point WLED at the Tasmotas with...
Or you can point XLights directly at the floods...
I have the FPP proxy configured since my show runs from a dedicated FPP controller, rather than the computer running XLights.
How do I take the front glass off without breaking it?
Hello today i got those lights
i flashed it with tuya convert with tasmota, but i m not happy how tasmota handle the ww-led, cw-led and the rgb-led. mixing colors is only possible with mqtt commands. in WLED it works much much better, i made this experience already with the Magichome RGBW controller. Is there a chance to flash WLED to the novostella flood lights? the configuration looks like this
Br Dave