WS2812 single LED/Pixel Plugin

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Martinus

Re: WS2812 single LED/Pixel Plugin

#11 Post by Martinus » 17 Jun 2017, 21:56

It definitely works here, also with other plugins like the LCD. Unfortunately Edwin has abandoned the build number so it will be a bit more difficult to verify the exact source versions.

Are you running the standard unchanged and unmodified source? I'm using plain straightforward github code (commit 8d2303db5f0ef4cc822524fb2f594d57b38ba83f), compiled with Arduino IDE 1.6.9.
So pull from github, run the compiler, export to binary and upload to ESP. No manual changes, no additional plugins etc.

But even if the plugin(s) would fail, we ought to fix this within the framework instead of crippling plugin code.

Maybe we need to have this confirmed by other users as well and file a bug report that blames the ESP Easy framework as it seems that multiple plugins suffer from the same issue.
I know that the webserver.ino has had a huge amount of changes so there could be bugs in there...

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#12 Post by papperone » 17 Jun 2017, 22:26

Martinus wrote: 17 Jun 2017, 21:56 It definitely works here, also with other plugins like the LCD. Unfortunately Edwin has abandoned the build number so it will be a bit more difficult to verify the exact source versions.

Are you running the standard unchanged and unmodified source? I'm using plain straightforward github code (commit 8d2303db5f0ef4cc822524fb2f594d57b38ba83f), compiled with Arduino IDE 1.6.9.
So pull from github, run the compiler, export to binary and upload to ESP. No manual changes, no additional plugins etc.

But even if the plugin(s) would fail, we ought to fix this within the framework instead of crippling plugin code.

Maybe we need to have this confirmed by other users as well and file a bug report that blames the ESP Easy framework as it seems that multiple plugins suffer from the same issue.
I know that the webserver.ino has had a huge amount of changes so there could be bugs in there...
I have verified and i've latest github code (commit/8d2303db5f0ef4cc822524fb2f594d57b38ba83f so defintely the same as yours!).
Only difference is that I've compiled/tested with Arduino IDE 1.8.2; but bugs must be there as I've read many complaints on LED and OLED issue not saving the GPIO for button failing the same way as I see...
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#13 Post by papperone » 17 Jun 2017, 22:41

just to complete the tests, just flashed my device (WEMOS D1 MINI) with plain precompiled BIN from repository "ESPEasy_v2.0.0-dev10_dev_4096.bin" and same behaviour, on NewPixel, LCD and OLED display the GPIO value is not saved and when hitting submit it goes empty! (and of course plugin does not work as it supposed to be)...
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Martinus

Re: WS2812 single LED/Pixel Plugin

#14 Post by Martinus » 17 Jun 2017, 22:47

I can image the bug reports as the latest release (DEV-10) certainly has a bug in webserver.ino

This was fixed in commit b63e76adfe0fa55c8f96038584cba62746d93dcc on june 10th.
The LCD bug was confirmed as fixed, so i would expect the same for plugins that suffered from the same issue.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#15 Post by papperone » 18 Jun 2017, 15:38

Martinus wrote: 17 Jun 2017, 22:47 I can image the bug reports as the latest release (DEV-10) certainly has a bug in webserver.ino

This was fixed in commit b63e76adfe0fa55c8f96038584cba62746d93dcc on june 10th.
The LCD bug was confirmed as fixed, so i would expect the same for plugins that suffered from the same issue.
Hi Martinus, sorry to bother you more but the commit you talk about is referring to "Fix default controller settings (#360)" which seems to have nothign to do with issue in the WebServer.ino we are mentioning now!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Martinus

Re: WS2812 single LED/Pixel Plugin

#16 Post by Martinus » 18 Jun 2017, 21:43

When i look at github esp easy it shows me this information on commit b63e76adfe0fa55c8f96038584cba62746d93dcc:
fix348.png
fix348.png (25.25 KiB) Viewed 30956 times
Would be nice to know why your information seems to be different.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#17 Post by papperone » 18 Jun 2017, 22:42

Martinus wrote: 18 Jun 2017, 21:43 When i look at github esp easy it shows me this information on commit b63e76adfe0fa55c8f96038584cba62746d93dcc:
fix348.png
Would be nice to know why your information seems to be different.
SORRY! my mistake, I'm still not familiar with GitHub; by the way I'm not sure why you can compile latest GitHub and have issue fixed while I do the same and issue is still there :(
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

cyberclwn
Normal user
Posts: 21
Joined: 25 Aug 2017, 21:19

Re: WS2812 single LED/Pixel Plugin

#18 Post by cyberclwn » 25 Aug 2017, 21:28

Hello Guys,

Sorry to ressurect an older post...

But i just connect a WS2812B to a wemos d1 mini, and then get stuck.

I downloaded the ESPEasy v2.0.0-dev11 and uploaded the "normal_4096" firmware into the wemos.
Then connect the wires, the 5v to 5v, GND to G, and the Din to D8.
Also added the device "NeoPixel - Basic", changed to LEDcount to 30 and changed GPIO to 15/D8.

And then i get stuck, Now what?

There is no light activated. But how to do it?
i tried http://x.x.x.x/control?cmd=NeoPixel,1,150,180,180
or cmd=NeoPixelall

I searched the wiki, forum and google, but i can't seem to find the next step(s)
Can you help me ?

ps. i'm not certain the ledstrip works, got a cheap chinese one. It should work, but you never know ...

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#19 Post by papperone » 26 Aug 2017, 10:03

cyberclwn wrote: 25 Aug 2017, 21:28 Hello Guys,

Sorry to ressurect an older post...

But i just connect a WS2812B to a wemos d1 mini, and then get stuck.

I downloaded the ESPEasy v2.0.0-dev11 and uploaded the "normal_4096" firmware into the wemos.
Then connect the wires, the 5v to 5v, GND to G, and the Din to D8.
Also added the device "NeoPixel - Basic", changed to LEDcount to 30 and changed GPIO to 15/D8.

And then i get stuck, Now what?

There is no light activated. But how to do it?
i tried http://x.x.x.x/control?cmd=NeoPixel,1,150,180,180
or cmd=NeoPixelall

I searched the wiki, forum and google, but i can't seem to find the next step(s)
Can you help me ?

ps. i'm not certain the ledstrip works, got a cheap chinese one. It should work, but you never know ...

can you try in the tools/command box type directly the command "NeoPixelAll,255,255,255"?
just checked my test-unit again and it works ok
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

cyberclwn
Normal user
Posts: 21
Joined: 25 Aug 2017, 21:19

Re: WS2812 single LED/Pixel Plugin

#20 Post by cyberclwn » 26 Aug 2017, 23:53

papperone wrote: 26 Aug 2017, 10:03 can you try in the tools/command box type directly the command "NeoPixelAll,255,255,255"?
just checked my test-unit again and it works ok
I just tried, nothing happens.
Starting to think i really got a broken led-strip.
Don't think it should be too hard to get this working.
(I got relays,DHTs and a LCD working)

Probably it's best to give up on this ledstrip and look for another.
Thanks for the help.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#21 Post by papperone » 27 Aug 2017, 09:56

cyberclwn wrote: 26 Aug 2017, 23:53
papperone wrote: 26 Aug 2017, 10:03 can you try in the tools/command box type directly the command "NeoPixelAll,255,255,255"?
just checked my test-unit again and it works ok
I just tried, nothing happens.
Starting to think i really got a broken led-strip.
Don't think it should be too hard to get this working.
(I got relays,DHTs and a LCD working)

Probably it's best to give up on this ledstrip and look for another.
Thanks for the help.
can it be a power issue? a long strip can require a lot of juice (amps) and esp8266 maybe cannot handle, try to setup only 10 LEDs lenght and see if this help?
(you can even try to cut few LEDs form the strip, ensure GPIO is connected to DIN of the strip and that strip is powered with stable 5V supply)
in order to power LEDs strips (specially long ones) it's very advisable to use an external power supply, not directly fromthe ESP!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: WS2812 single LED/Pixel Plugin

#22 Post by Shardan » 27 Aug 2017, 14:16

There might be another issue.

Following the datasheet the WS2812B LEDs have a "High" level of 0.7Vdd.
If you run the LEDs on 5V this says the minimum high level at data input is 3,5V.

Using an ESP with 3,3V this might work or not due to tolerances of ESP and LED chips.
It is anyways below limits.

It's worth a try with a level shifter.

Regards
Shardan
Regards
Shardan

cyberclwn
Normal user
Posts: 21
Joined: 25 Aug 2017, 21:19

Re: WS2812 single LED/Pixel Plugin

#23 Post by cyberclwn » 27 Aug 2017, 18:06

Thanks for the idea's and thinking along/

I'll look into this soon and let you know my findings

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#24 Post by papperone » 28 Aug 2017, 08:50

Shardan wrote: 27 Aug 2017, 14:16 There might be another issue.

Following the datasheet the WS2812B LEDs have a "High" level of 0.7Vdd.
If you run the LEDs on 5V this says the minimum high level at data input is 3,5V.

Using an ESP with 3,3V this might work or not due to tolerances of ESP and LED chips.
It is anyways below limits.

It's worth a try with a level shifter.

Regards
Shardan
I think this is only theory, or all the WS2812 leds I do have are lucky ones as they are all perfectly driven by digital pin of ESP8266! (and they are literally hundreds either single, 8x bars, circle or 300 pixel strips...) :D
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: WS2812 single LED/Pixel Plugin

#25 Post by Shardan » 28 Aug 2017, 18:13

Hello papperone,

It depends only on the very first LED in chain as all other LEDs are driven by the output of the prior LED.
So it does not matter if you use 3 LED's or 300.

Nice if it works for you. But anyways it is out of specifications, at least with LEDs from that manufacturer i got the datasheet from.
Might work, might lead to undefined behaviour either.

Regards
Shardan
Regards
Shardan

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#26 Post by papperone » 29 Aug 2017, 15:56

Shardan wrote: 28 Aug 2017, 18:13 Hello papperone,

It depends only on the very first LED in chain as all other LEDs are driven by the output of the prior LED.
So it does not matter if you use 3 LED's or 300.

Nice if it works for you. But anyways it is out of specifications, at least with LEDs from that manufacturer i got the datasheet from.
Might work, might lead to undefined behaviour either.

Regards
Shardan
Hi Shardan
Indeed I know datasheet, but on the many application I've used WS2812b leds I've never used a level shifter and all of them are working just fine.
I started since a while to use only single WS2812b as indicators as it does not matter how many I needs, I will allocate only 1 pin!
Maybe clone chips are more tolerant, but really I do have many purchased in different form factors and lenght and all wokring without any issue, not even on the first led...
I will control them more carefully from now on to spot if any issue which I maybe did not see until now.

papperone
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

cyberclwn
Normal user
Posts: 21
Joined: 25 Aug 2017, 21:19

Re: WS2812 single LED/Pixel Plugin

#27 Post by cyberclwn » 29 Aug 2017, 19:17

papperone wrote: 27 Aug 2017, 09:56
cyberclwn wrote: 26 Aug 2017, 23:53
papperone wrote: 26 Aug 2017, 10:03 can you try in the tools/command box type directly the command "NeoPixelAll,255,255,255"?
just checked my test-unit again and it works ok
Thanks for the help.
can it be a power issue? a long strip can require a lot of juice (amps) and esp8266 maybe cannot handle, try to setup only 10 LEDs lenght and see if this help?
(you can even try to cut few LEDs form the strip, ensure GPIO is connected to DIN of the strip and that strip is powered with stable 5V supply)
in order to power LEDs strips (specially long ones) it's very advisable to use an external power supply, not directly fromthe ESP!
I cut the strip down to 3 LEDs, no change.

If i do a "http://x.x.x.x/control?cmd=NeoPixelall,255,255,255" should i get a JSON-response back ?
Like when you do a "http://x.x.x.x/control?cmd=GPIO,13,1"?

Because i get nothing from the neopixel command.

Also i tried supply the 5v from an external source, and only connect the G and the DIN pin to the wemos. Same result, nothing.
I'm just unlucky, i guess :)

lukecorkill
New user
Posts: 1
Joined: 09 Sep 2017, 13:06

Re: WS2812 single LED/Pixel Plugin - MQTT format

#28 Post by lukecorkill » 09 Sep 2017, 13:13

I found this thread whilst trying to work out how to control a neopixel LED strip via MQTT.

In case anyone else is looking in the same place, the command format is shown below (taken from the source code, shown as an mosquitto command line example). My ESPeasy is identified as ESPEasytest in MQTT. 6 is the LED number and 40/20/10 are the RGB values.

Code: Select all

mosquitto_pub -h 192.168.1.1 -t "ESPEasytest/cmd" -m "NeoPixel,6,40,20,10"
See either the source for plugin 38, or extract at; viewtopic.php?p=16818#p16818

Code: Select all

// List of commands:
// (1) NeoPixel,<led nr>,<red 0-255>,<green 0-255>,<blue 0-255>
// (2) NeoPixelAll,<red 0-255>,<green 0-255>,<blue 0-255>
// (3) NeoPixelLine,<start led nr>,<stop led nr>,<red 0-255>,<green 0-255>,<blue 0-255>
Hope this helps someone else
Luke.

dumbme
New user
Posts: 8
Joined: 20 Jun 2017, 12:45

Re: WS2812 single LED/Pixel Plugin

#29 Post by dumbme » 21 Sep 2017, 23:11

Tested it aswell The Neopixel Candle is working but NeopixelBasic it will not work with anycommands

esp 2.0 dev11

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: WS2812 single LED/Pixel Plugin

#30 Post by papperone » 22 Sep 2017, 13:08

Just upgraded my test modules with 2.0.0.dev12 / normal-4096 and I can confirm the Neo Pixel Basic plugin still works as it should...
It responds to all commands "neopixelall", "neopixel" and "neopixelline"
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Igrek
New user
Posts: 3
Joined: 24 Sep 2017, 21:37

Re: WS2812 single LED/Pixel Plugin

#31 Post by Igrek » 24 Sep 2017, 22:00

With modules with 2.0.0.dev12 / normal-4096 and I can confirm. It work. But the plugin does not return anything and therefore in the error log: "Error: Error opening url: http://192.168.1.33/control?cmd=neopixelall,0,0,5".

mrcage
New user
Posts: 4
Joined: 03 Nov 2017, 23:21

Re: WS2812 single LED/Pixel Plugin

#32 Post by mrcage » 04 Nov 2017, 20:56

It took me a while to control the ws2812b by ESP Easy but I managed to do it by this helpfull thread :D
I want to use it in openhab, not sure how to control it:
Color LedStrip_color "LedStrip Color [%s]" <slider> (tuin, LedStrip) {mqtt=">[broker:/IoTCage107/cmd/NeoPixelAll:command:*:default]"}

Post Reply

Who is online

Users browsing this forum: No registered users and 143 guests