XLight, WLED and Matrix in one port

@ALDIY Hey if you are around later msg me in discord. I think we can (kind of) figure this out.

Ok after much testing and head scratching here is my reasoning and possible solution:

Note: This will be a long post.

The reason you are unable to get xlights to output correctly through WLED when WLED is set to 2D is likely because with 2D, WLED is now processing the data and placing it in it’s x,y (ledmap) location. I suspect that in 1D it just basically passes the info straight to the string of pixels.

Why is this a problem?

xlights has already calculated the correct order (x,y) for the data of your xlights matrix model. When that data gets to WLED it is again processed for x,y and thus you end up with a mess displayed on the matrix.

The solution?

Basically the solution is to sort of make xlights treat your matrix model as a Virtual Matrix.

What is a Virtual Matrix? It is basically an external display that has a controller processing the signal and converting it for the display’s x and y. Most often that would be a Pi or similar device running FPP and you having a display connected to it. IE. TV/Projector.

Now to setup a matrix in xlights so that it works as a Virtual Matrix you have to set your:
Strings: to your Height
Nodes/String: to your Width
Strands/String: to 1
For me I had to set the start location the 100% opposite from what I set it as in WLED’s 2D settings.
In WLED my start location was bottom right, so in xlights I had to set it as top left. If yours is top left, try setting it as bottom right in xlights.

Example: 32 x 8 Matrix would be: Strings: 8, Nodes/String: 32, Strands/String: 1
You will also need to set the direction as Horizontal
Your Starting Location will depend on how your matrix is wired.

Now if you go to the controllers tab in xlights and open the Visualizer you will see your matrix listed on the right. But if you drag it onto Port 1, xlights will create/place it on another 7 ports below it.

But why?? Well when you setup a matrix in xlights it expects that your ‘Strings’ is to be how many connections (ports) there are to your controller. As in the pic, Strings were set to 8 so xlights thinks you need 8 ports.
To get around this we have to create something called a Custom Model. Basically this will trick xlights and it will no longer think it’s a matrix.

How do you create a Custom Model? Very Simple.

  • Select your matrix in the model tab and right click on it.

  • From the drop down click Export as Custom Model.

  • A window will open asking where to save the model. Pick a location and save it.

  • Now from the tool bar up top click on the import icon and drag a box for your model.

  • A window will open, letting you select the model you want to import. Select the Custom Model you just saved and open it.

You can now delete your old matrix model (as long as you know your new one is correct).

  • Head back to the controllers tab and open the visualizer and drag your new Custom Modeled Matrix to your port. You will see that it now places the whole matrix on 1 port.

  • Create yourself a test sequence.

  • Drop a text effect on the matrix and see if it displays correctly (use the text effect as it is the easiest way to see if things are correct). If it is incorrect, you likely need to change your start location of your original matrix model and recreate your custom model.

I have attached a video showing this being done on a 32 x 8 matrix.

Here are my 2D settings in WLED

Seems dirty more then setting xlights with wrong string , what is the benefit of doing all of this

Really it’s best to use xlights with 1d.

My work around above will allow you to use xlights when WLED is in 2d with standard matrices and maintain things looking right in the controller visualizer. I am not sure it will work if you try it with an odd one with holes or one that is a custom shape, as well as if you loaded a custom ledmap.

Actually with xlights if you use a matrix that uses more than 1 port and does not have the same # of pixels for each port. You also have to utilize the above custom model to then specify how many pixels go to each port.

Some of the xlights pro’s never use the std matrix model and actually use a custom model derived from the std matrix model.

I think there are only 3 true ways for this to be fixed aside from the above custom modeling.

  1. Use 1D

  2. Get the xlights dev’s to have an option for when you are using WLED in 2D

  3. Get WLED dev’s to basically have WLED turn off the 2D processing when xlights or alike 3rd party software is in control.

I was testing and by chance did not add the vendor to the setup and the unit worked as usual but i can not even access the ports or press visualize . If vendor is set to wled there will be a lot unused ports if the string is not one which might actually slow xlights but not sure cause the machine i test with is slow already . i tend to also think for more complex fixture using wled in 1D might reduce the complexity and i recall seeing a post of how to switch wled from 2D to 1D within xlights but the only way i tested is to load cfg.json and reboot
image

So you assigned the matrix to the controller from within the Layout tab, matrix’s settings?

That will likely work unless you have more than 1 thing connected to the controller. If you have more than 1 thing you may need to switch to 1D, unless you can figure out where to put the second model.

If in visualizer I think you would need to chain the next model after the last part of the matrix.
If just setting the controller/port from matrix settings I am not sure it would work. But would be a good test :slight_smile:

In the end anyone looking to do such things with xlights is likely just for a single/limited use sort of thing. I would never set a WLED controller for 2d if I were planning to use it in any light show. Halloween Christmas… Etc. with multiple props. But for a simple matrix in a home that you want to run WLED fx on most of the time and now and then some cool xlights stuff, sure these options are valid.

I could be wrong here, but I would also guess that the processing power/speed of WLED in 2D is much less than in 1d, when coupled with heavier xlights timing/fx. Meaning; I would expect a greater chance of lag/choppy output or freezing as WLED is working harder (I assume) in 2D.

Just did a test. I only tested visually with the matrix, but I am guessing it works had I had a 2nd string connected… If you use your idea @ALDIY to not set a vendor it looks like it should work when chaining things. You just need to remember what order you added them to the controller in because there is no representation to show you.

Basically if you have a matrix and a string of pixels chained after the matrix in WLED. I think as long as you set the matrix port from it’s model settings first and then the string’s port second it should work. Maybe a way to keep track would be to set each chained model 1 port higher? Not 100% sure as I don’t have a string of lights at hand.

Yeah i have tested multiple fixtures which all in 2D in wled and never actually used the visualizer or assigned any port . I use DDP and to assign the correct channels i just do that in layout and i select port one all the time . I do not do fixtures other then rings and matrix ( some cubes ) and the max i did is around 2k pixels which is a combination of smaller fixtures and did not notice slowness ( I am not having Ethernet to compare might be that would be faster ) .

Hello! Help me please! I’m trying to connect the matrix to xLight. Matrix 20x20 (“bottom-right” connection). ESP8266, V.14.0. E1.31

How to properly configure the controller and matrix configuration so that a normal picture is displayed? I tried many options. Nothing good came of it. Could you tell me how to do this step by step. It would be nice to have screenshots of the controller settings and matrix settings.

Above we talk about the operating mode of the DDP controller. How and where to enable this mode in WLED? I only have E1.31 and Art-Net.

I apologize for the machine translation into English.

There are examples above and if you have issues then just setup your matrix in wled as a strip in 1D and the setup of ddp is from xlights side

Thank you! Is it possible to make the matrix work both there and there?

Yes possible as you could see from the examples I posted also above if you scroll to the start of the post here XLight, WLED and Matrix in one port - #2 by ALDIY

Yes, I saw this post. Thank you for your help! But I haven’t been able to repeat this yet. I will still try to do it as in your example. It seems like I did everything like you did, but it doesn’t work yet. Apparently I made a mistake somewhere.)))

I could show you more examples if you need but unfortunately i do not have 20x20 . The trick i used to find the correct layout is setup everything from xlights side and then run an effect like text and at the same time go to wled 2d page and experiment with the setting ( you will get a note that xlights is streaming just ignore that )

Understood. Does the size of the matrix matter a lot? If the matrix is, say, 16x16, or 16x32, is it configured differently in xLights? Or do you mean that the settings in WLED are different?
Thank you for always trying to help!

If the aim to use the matrix in xlights in 1d then only configuration is needed from xlights side . But if you want to use the matrix in xlights and also keep the 2D setting in wled then configuration is needed from both xlights and wled

Ok! Understood.

thanks for this! I have been stressing these last 3 hours trying to fix this similar problem! I changed the setting to what you said and BAM it worked!