Been using Vixen via generic serial port (UART) and works perfect,

Been using Vixen via generic serial port (UART) and works perfect, but now want to to take it to the next level WiFi!
found forkineye’s github for using E131 (assuming vixen works with this protocol) but his fastLED is set to Ethernet

I whipped up a FastLED version, and wondering if anyone has tried to send data through Vixen via WiFi with a ESP-12E NodeMcu V3?

Does this look right for FastLED?

Code:
/
I modified an example from GitHub - forkineye/E131: E1.31 (sACN) library for Arduino with ESP8266 support

  • This program is provided free for you to use in any way that you wish,
  • subject to the laws and regulations where you are using it. Due diligence
  • is strongly suggested before using this code. Please give credit where due.

The Author makes no warranty of any kind, express or implied, with regard

  • to this program or the documentation contained in this document. The
  • Author shall not be liable in any event for incidental or consequential
  • damages in connection with, or arising out of, the furnishing, performance
  • or use of these programs.

/
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <E131.h>
#include <FastLED.h>

const char ssid[] = “ssid”; /* Replace with your SSID /
const char passphrase[] = “password”; / Replace with your WPA2 passphrase /
#define NUM_PIXELS 170
#define DATA_PIN 3

E131 e131;

int initWifi() {
/ Switch to station mode and disconnect just in case /
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(secureRandom(100,500));

LOG_PORT.println(“”);
LOG_PORT.print(F("Connecting to "));
LOG_PORT.println(ssid);

WiFi.begin(ssid, passphrase);

uint32_t timeout = millis();
while (WiFi.status() != WL_CONNECTED) {
delay(500);
LOG_PORT.print(“.”);
if (millis() - timeout > CONNECT_TIMEOUT) {
LOG_PORT.println(“”);
LOG_PORT.println(F(“** Failed to connect *”));
break;
}
}

if (WiFi.status() == WL_CONNECTED) {
    LOG_PORT.println("");
    LOG_PORT.print(F("Connected with IP: "));
    LOG_PORT.println(WiFi.localIP());

    e131.begin(E131_MULTICAST, UNIVERSE_A, UNIVERSE_B - UNIVERSE_A + 1);
}

return WiFi.status();

}

void setup() {
LOG_PORT.begin(115200);
delay(10);
initWifi();

FastLED.addLeds<WS2811, DATA_PIN>((CRGB*)e131.data, NUM_PIXELS);

}

void loop() {
if(e131.parsePacket())
FastLED.show();
}

Looks interesting. G+ has terrible/non-existent code formatting. It’s preferable to post your code to https://gist.github.com or https://pastebin.com and then post a link to it here. Bonus: source code revision control! :slight_smile:

@Jason_Coon Will do!

@Darren_Hedlund this is exactly the direction I’ve been looking since I have something “working” installed. I too was looking at forkineye’s stuff but found for me the FastLED was setup with 2811’s as I remember which don’t need CLOCK. My 2801’s need clock, but I’m confused if I would need clock if Vixen is controlling things. I’ll post anything I figure out, you do the same! Good luck.

Vixen and xLights both send u1.31 protocol free programs. I think xLights is nice, but doesn’t run well under 10 at the house…it’s ok at the office. Vixen is very similar but a bit different approach in ways.

I had this working a while ago with an older version of his distribution and fastLED. I’ll see if I can find it

I have this working using an ESP8266 receiving E1.31 from Vixen and sending the data over serial to a Teensy 3.2 running FastLED and the octoWS2811 parallel output. It works really well. I can push about 10 universes. I’ll see about posting the code.

@Jared_Alexander If you have a E1.31 code sample, that would be great!

@Jared_Alexander Oh yes that would be great if you wanted to share. Sounds very cool.

@Trey_Coursey I started to write up my own version using the ESP-12E NodeMcu V3 module to send and receive via WiFi from a PC.
Found articles about doing the ESP to ESP and having one connected to a PC but that limits you.

Once i figure this aspect out, I will publish it. and Yes using FastLED, I really like FastLED…

@Darren_Hedlund Just learning the E1.31 stuff, but curious why the thought of talking esp to esp? I thought this protocol was a broadcast to all that was listening type thing. Meaning Vixen or whatever controller/scheduler your using is broadcasting to all the universes that are listening for their “commands”. That may not be the best way to describe it but…

ESP’s as repeaters maybe?

@Trey_Coursey Still learning that aspect about DMX and E1.13 so hacking away and learning. My goal is broadcast via the WiFi the data signals to multiple NodeMcu. Reading on ESP-NOW, and other methods to find the right way to do this.

@Darren_Hedlund Shelby at http://forkineye.com has a mature project doing this by DMX. You may be reinventing the wheel but I seem to do the same for more specific results. The esp is great platform for driving pixels and it’s good as long as WiFi interrupts don’t glitch your results. Personally esp has a place but for me it’s for smaller elements/displays . The big issue for me is the instability that can occur with it do to Enviromental influences and challenges out of my control (WiFi interference). Many in the Christmas forums have success but many have problems too. If you need reliability the wire method is still a great solution

http://forkineye.com - Forkineye - One prong at a time …

Here is the code I got going a while ago. Its been a while since tinkering with it. Like you I wanted to learn and reinvent the wheel but for more specific results using fastLED. Here is the link. not sure if it will compile with all the new changes and ESP options but maybe it will help…

@Chris_Rees Thank you. I figured first learn what everything is, then try to enhance it. I assume you use Vixen or something? If so, what controller did you use (they have like 15 different ones)?

Side note: OMG how many acronyms do xmas lighting people use? LOR, GMAC,BOM,DMX,Train,Mega Tree,Universe,Panel,Falc, and more.

The three I use is jinx, vixen and now more lately xlights. All use e1.31 as an option to communicate with the controllers. Typically the e1.31 options are agnostic to the controller. You just need to know the ip and the channels the controller will handle (Unicast) . Multicast is also an option and had its benefits but the network needs to be fine tuned especially if your using WiFi.

@Chris_Rees Thanks, I will try that.

I use Xlights and Vixen as well sending unicast E1.31 to my ESP8266 controller. This year I actually switched to an ESP32. The ESPixelStick firmware from Forkineye will run on any ESP8266 based device using his firmware upload tool. You just have to put the device into flash mode by grounding a couple of pins. I have his firmware running on a Wemos D1 R2 and a NodeMCU. I will post my controller code on Friday when I get home.

You guys rock! Last night got the wireless working through Vixen and now I know what a “Universe” is and how to use it.
Shelby’s code is good, but really using FastLED is the correct direction so going to work more on Chris’s code sample (awesome by the way), and get this perfected. Will toy around with Jinx and the others soon.

Here is my code for my pixel controller. All is done in the Arduino IDE. I am using an ESP32 to receive E1.31 and send it over serial to a Teensy 3.2. The Teensy is running FastLED and using the OctoWS2811 parallel output to drive 8 output pins. The reception can also be done on an ESP8266. The Teensy code includes a standby function and I also use a RTC to control when the standby function runs.