How to automatic controll WS2811

I'm simply trying to do a sunrise and sunset simulation for my terrarium. I have a raspbery pi esp 8266 and LED WS2811 do I need anything else?

Hi, are the WS2811's 5V input? If they are you will need a 3.3-5V level converter to drive them as the ESP8266 and Raspberry Pi are NOT 5V tolerant.

it is 5V can i use this
i find this but i dont have WeMos D1 i have nodeMCU and ESP8266 but when i put ESPEasy i dont have in devices NeoPixel...
now i see i use ESP Easy but thise man have ESP Easy Mega

  1. Please go to the main tab of your ESPeasy on the nodeMCU and do a screen shot and attach it to a reply.
  2. What version of ESPeasy did you install?
  3. if you go to the Devices tab and add a device, does it shoy any Output devices in the dropdown list?

now I am instal ESPEasy Mega now i have all

Remember to calculate the amperage needed. If an LED is on full bright (255,255,255) it can draw 20ma and with 60 of them all on,(if my math is right) you would draw 1.2 amps so make sure your powersupply will handle that load ontop of anything else it is powering.

Just to say, I personally, have never had any problems directly driving any WSxxxx 5V RGB Led string from an ESP or a Pi GPIO pin

1 Like

Good to know Simon. Thanks!

1 Like

i know but teoretic i can run 1 led just for connection controll. but for me dont work i dc what is problem mqtt or setup

It looks like (hard to see the image, too small) that you have defined the topic in the mqtt-out node as /nodeMCU/cmd but you are subscribing to %sysname%/# and since %sysname% equates to nodeMCU you are subscribing to nodeMCU/# or all msgs that have nodeMCU as the first part of the topic.

BUT, in NR you use a / as the first part of the topic so the msgs NR is publishing will never be sent to ESPEasy.

Change the mqtt-in topic to nodeMCU/cmd and you should see some results.

You should spend some time reading the MQTT Essentials blog posts and this one in particular:

ok ty! now i have a communication i still need to resolve to switch off and on automatically but slowly eg 25% 50% 75% 100%

You might want to use rules in espeasy (You need to turn them - go to Tools-Advanced and there is a check box there)

But this is way off of Node-RED.

how i can turn 5 led in same color with one inject node and function

As long as the 5 leds are the same ones in the string all the time, you could do it in a rule in ESPEasy. But if you want to turn on led 1,3,5,7,9 one time and 2,4,6,8,10 another time and then 1,2,3,4,5 another time you will have to do a bit of coding.

There is no easy solution (that I can think of) for this or pre-packaged answer and due to the limitation of memory the ESPEasy uses in the rules, you will probably have to send multiple mqtt messages to espeasy to get this done.

i want all time turn on all time same 5 led (1,2,3,4,5) in same color

So send a mqtt message to espeasy and have a ruleset that has five NeoPixel statements with the number of the neopixel in the five different commands, one statement per neopixel you want to control. You will probably want another set to shutoff the neopixels so you will need another ruleset for that.

[{"id":"7e1945ad.8d0ddc","type":"mqtt out","z":"b58a1974.f4e868","name":"","topic":"nodeMCU/cmd","qos":"","retain":"","broker":"19efa301.6c402d","x":640,"y":260,"wires":[]},{"id":"19efa301.6c402d","type":"mqtt-broker","z":"","name":"","broker":"","port":"1883","tls":"","clientid":"","usetls":false,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

yes yes i want turn on and off

Why did you post an mqtt-out node? What do you expect anyone to do with that?

you ask me " send a mqtt message to espeasy" bc of thaht i send you mqtt-out node. Probably if i send wrong i am idiot or i don't understand you.

Have you been sucessful at sending a msg from Nodered to ESPeasy and been able to turn on a single neopixel yet?