dzelionis / artnet-advertiste-wled

Artnet/DMX advertise POOL packets for other devices, would work with Soundswitch/Wled etc...
GNU General Public License v3.0
4 stars 1 forks source link

Question: How to add WLED fixtures to soundswitch? #1

Open erhan- opened 2 years ago

erhan- commented 2 years ago

Hello Domas,

I tried to contact you via your work email but I think it did not work. In your setup you showed that you had set the WLED fixtures in soundswitch. When I look in my list, I dont have any WLED fixtures listed there which I could choose. How did you add those?

Thanks for creating the repo. I have two bulbs which I can not OTA update anymore so for them this is the permanent solution :)

dzelionis commented 2 years ago

thats a new version of the script which has addressed all bugs, i think. ... sound switch should pick it up automatically if you have broadcast configured correctly

erhan- commented 2 years ago

Does soundswitch automatically add which is at 353 address here?: WLED-ESP8266DMX ? I dont have anything in my fixture library below.

dzelionis commented 2 years ago

Does soundswitch automatically add which is at 353 address here?: WLED-ESP8266DMX ? I dont have anything in my fixture library below.

no you need to create a dmx fixture on soundswitch, but first you should start to see your a wled device is picked up ins soundswitch settings as artnet device, and thats what my script does, all the rest is depends how you configure, do you want to use wled in dmx effect mode or as single/multiple mode....different modes - different dmx fixtures in soundswitch.....

image

image

erhan- commented 2 years ago

Sorry I forgot to add the same screenshot. Thats why I wrote address 353. Somehow the WLED are only detected in the Preferences when I also run soundswitch on the controller. Then your old script reacts to the packages and I see the WLEDs in both soundswitches.

I will try again with your new script. I am not at home currently and still wait for the delivery of additional bulbs. I have multiple bulbs, so single rgbw and one or two ws2821b stripes with wled. I think I want to have the bulbs reacts to beats as it is already happening with the default venue on address 0. For the stripes, effects in phrases would make more sense. Beatwise effect change would be too fast I think. I actually have no idea what I am doing. This is the first time I am doing anything related to DMX and lighting but I already love what I see.

dzelionis commented 2 years ago

Sorry I forgot to add the same screenshot. Thats why I wrote address 353. Somehow the WLED are only detected in the Preferences when I also run soundswitch on the controller. Then your old script reacts to the packages and I see the WLEDs in both soundswitches.

Thats resolved in new version of the scrip, its now more active....before it was not talking if nobody was asking to talk....but...sound switch behaver changed...and sound switch stopped being active,its now (on pc) - acts like passive. My script will sit for a few seconds if nobody asks to respond, it will just start to send pool replay broadcast using the time period described in artnet documentation (2.5secs) for pool replays.

Also now it can automatically detect wled ips...enabled by default....

dzelionis commented 2 years ago

" will try again with your new script. I am not at home currently and still wait for the delivery of additional bulbs. I have multiple bulbs, so single rgbw and one or two ws2821b stripes with wled. I think I want to have the bulbs reacts to beats as it is already happening with the default venue on address 0. For the stripes, effects in phrases would make more sense. Beatwise effect change would be too fast I think. I actually have no idea what I am doing. This is the first time I am doing anything related to DMX and lighting but I already love what I see."

I use wled effect mode for ws2821bm, as its bit wasted of smart leds if you only control 1000leds as one led....and if you wand to do 1000 as 1000 then sound switch is not good for that purpose ... as it only supports 2 universes.... and one led need 3 channel of 512 channels available per 1 universe... so to run 1000 leds you need 3000 channels... and you have 1024 max.... so if you run it in wled effect mode you get something in midle which is not a waste os ws2821 and still have some nice features...in this case you still can program sound switch with attributes (where you define specific effects from wled to be used )

Elucker69 commented 2 years ago

I am so excited to have found this repository. When they closed the last one I was worried that I would never get this workin. I I have been at this all day (home sick with covid) Still can't see the the fixture in soundswitch. I am sure I am missing something simple. Can you help out with the network settings? I have two network cards (internal and usb). Here is what what it looks like when I run it. Thanks! image

erhan- commented 2 years ago

@Elucker69 just add the inet_aton add the top to the imports. I can create a PR later.

I had some time yesterday as I receiverd my bulbs. Thank you very much for your work. The script now works better and indeed does not need me to have the prime controller enabled to be detected under the artnet devices:

grafik

But I still see no WLED manufacturer under fixtures:

grafik

Do you know what I have to do? Also I gave all my leds dmx address 0 for now.

Edit: Okay I learned more. I am using now different addresses for each group. I chose a random 4 channel one for the rgb led bulbs. It works quite fast in soundswitch on the computer. On the prime go it really lags hards. I exported my test venue to the sd card and opened it on the controller.

I chose a random 11 channel one but I think that does not make sense.

Elucker69 commented 2 years ago

That would be helpful. I am not a developer and I very much appreciate the feedback but I don't understand it.

erhan- commented 2 years ago

Use this file my friend: https://github.com/dzelionis/-artnet_advertise/blob/f8c64bf529231650840339c335a42655c4986bc3/artnet_advertise_wled.py

dzelionis commented 2 years ago

I am so excited to have found this repository. When they closed the last one I was worried that I would never get this workin. I I have been at this all day (home sick with covid) Still can't see the the fixture in soundswitch. I am sure I am missing something simple. Can you help out with the network settings? I have two network cards (internal and usb). Here is what what it looks like when I run it. Thanks! image

Hey, what python version you are using ? I am going to test it myself on windows... to replicate your issue....

dzelionis commented 2 years ago

@Elucker69 just add the inet_aton add the top to the imports. I can create a PR later.

I had some time yesterday as I receiverd my bulbs. Thank you very much for your work. The script now works better and indeed does not need me to have the prime controller enabled to be detected under the artnet devices:

grafik

But I still see no WLED manufacturer under fixtures:

grafik

Do you know what I have to do? Also I gave all my leds dmx address 0 for now.

Edit: Okay I learned more. I am using now different addresses for each group. I chose a random 4 channel one for the rgb led bulbs. It works quite fast in soundswitch on the computer. On the prime go it really lags hards. I exported my test venue to the sd card and opened it on the controller.

I chose a random 11 channel one but I think that does not make sense.

Hey, i think you have the wrong way around, also , to get/update lates fixtutes from soundswitch there is a button in menu called "Options->Update Fixtures". Basically when i was dealing with soundswitich to create a new fixture, after they had it done on their side, all i need - just to press that button it was synced. image

Also, can you be more specific on bulbs or leds you are using, is that one bulb per wled controller? or its a strip o addressable leds? I have not used sound switch on prime myself, as i had no need so far, so its hard for me to comment on it. Bur even sound switch on pc, for me - when i switch mode from edit to perform or way around it freezing for some time....

In case it's a signle bulb per wled controller, there is no need to use wled in "effect mode", you should use "single RGB" wled mode and on soundswitch you should find any 3 channel led fixture. If its multiple bulbs per wled controler, you could also use wled in "multi RGB" mode and on soundswich use many of 3 channel any led fixtures. in case you have "ws2812b" led strips - "wled effect" mode could be handy, as i have ~3000 leds, its no chance that i could do it in "multi RGB" mode, as there are not enough channels available on soundswitch to facilitate it.

erhan- commented 2 years ago

Hey Domas,

yes I had to update fixture to get the 11 channel one and used random 4 channel ones for the RGB bulbs. Seems like three are also enough. I will check later. I will also use effects for the striped ones.

I have the Athom WLED controller for the stripes https://www.athom.tech/wled and the Athom bulbs as single RGB bulbs. Everything works quite nice already. The bulbs are losing connections and are not so stable when I use the builtin soundswitch on the controller. With the PC software it runs good.

Elucker69 commented 2 years ago

Hello Domas! I am running version 3.10, the latest build from the official website. I ran the script that erhan linked me to and it worked as far as now I can se the fixture ip in the soundswith hardware section. I am not able to conrol it yet though. I have gone over the settings multiple times and cannot find the problem. I am guessing that it is my network settings. Either of my adapters ip addresses put into line 20 "broadcast ip" work to make the fixture show in soundswitch but if try putting in Ip address in "UDP_IP" (line 14) then I get an error. I am sure that I have dmx address sorted correctly and have autoscripted some songs put there does not seem to be any output from the pc. Any thoughts or suggestions?

image
Elucker69 commented 2 years ago

Use this file my friend: https://github.com/dzelionis/-artnet_advertise/blob/f8c64bf529231650840339c335a42655c4986bc3/artnet_advertise_wled.py

That solved my first Problem! Thank you!

erhan- commented 2 years ago

Do your WLEDs get dark when you have connected via the script and started soundswitch and does the WLED interface show that something else is currently in control?

Elucker69 commented 2 years ago

No. Nothing happens to the lights when I run the script or when I connect soundswitch.

Eric Lucker Field Forman Sequoyah


From: Erhan @.> Sent: Tuesday, May 24, 2022 9:48:47 AM To: dzelionis/artnet-advertiste-wled @.> Cc: Elucker69 @.>; Mention @.> Subject: Re: [dzelionis/artnet-advertiste-wled] Question: How to add WLED fixtures to soundswitch? (Issue #1)

Do your WLEDs get dark when you have connected via the script and started soundswitch and does the WLED interface show that something else is currently in control?

— Reply to this email directly, view it on GitHubhttps://github.com/dzelionis/artnet-advertiste-wled/issues/1#issuecomment-1136166525, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWVSAPWZ47HWKR7ENKBTBHLVLUB67ANCNFSM5WMARMPQ. You are receiving this because you were mentioned.Message ID: @.***>

erhan- commented 2 years ago

Are your WLEDs autodetected by the script or have you entered all IPs manually? Are you in the same subnet ? No firewall? Is the broadcast IP correct?

Elucker69 commented 2 years ago

Okay these are great questions. It might take me a day or two but I'll do some more investigating and get back to you. Thanks again!

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Erhan @.> Sent: Tuesday, May 24, 2022 10:00:20 AM To: dzelionis/artnet-advertiste-wled @.> Cc: Elucker69 @.>; Mention @.> Subject: Re: [dzelionis/artnet-advertiste-wled] Question: How to add WLED fixtures to soundswitch? (Issue #1)

Are your WLEDs autodetected by the script or have you entered all IPs manually? Are you in the same subnet ? No firewall? Is the broadcast IP correct?

— Reply to this email directly, view it on GitHubhttps://github.com/dzelionis/artnet-advertiste-wled/issues/1#issuecomment-1136185435, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWVSAPT5VL2IQ4662RCDL53VLUDKJANCNFSM5WMARMPQ. You are receiving this because you were mentioned.Message ID: @.***>

Elucker69 commented 2 years ago

Here are some screenshots of my settings. No firewall, I turned off windows defender just in case. I tried both auto detect and putting in the address of the wled manually and both methods seem to work.[cid:e66de73d-259d-488f-8b35-89a98798e8b9][cid:513d0677-5fa9-4f80-9c40-1ad6dcbc7b7e]


From: Eric Lucker @.> Sent: Tuesday, May 24, 2022 10:42 AM To: dzelionis/artnet-advertiste-wled @.>; dzelionis/artnet-advertiste-wled @.> Cc: Mention @.> Subject: Re: [dzelionis/artnet-advertiste-wled] Question: How to add WLED fixtures to soundswitch? (Issue #1)

Okay these are great questions. It might take me a day or two but I'll do some more investigating and get back to you. Thanks again!

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Erhan @.> Sent: Tuesday, May 24, 2022 10:00:20 AM To: dzelionis/artnet-advertiste-wled @.> Cc: Elucker69 @.>; Mention @.> Subject: Re: [dzelionis/artnet-advertiste-wled] Question: How to add WLED fixtures to soundswitch? (Issue #1)

Are your WLEDs autodetected by the script or have you entered all IPs manually? Are you in the same subnet ? No firewall? Is the broadcast IP correct?

— Reply to this email directly, view it on GitHubhttps://github.com/dzelionis/artnet-advertiste-wled/issues/1#issuecomment-1136185435, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWVSAPT5VL2IQ4662RCDL53VLUDKJANCNFSM5WMARMPQ. You are receiving this because you were mentioned.Message ID: @.***>

erhan- commented 2 years ago

You have to write the comment and add the attachments in the issue to make them visible here: https://github.com/dzelionis/artnet-advertiste-wled/issues/1

Elucker69 commented 2 years ago

OK, today I learned that responding through email with pictures doesn't work.

image image (1)
erhan- commented 2 years ago

Can you try 192.168.1.255 as broadcast ip in the file?

I have another question: can you run multiple instances in the same network? I have modified your script and wrote a wrapper for nanoleaf and it works really well beside some noticeable lag. I can either run my script or your script. Soundswitch only picks up one.

dzelionis commented 2 years ago

OK, today I learned that responding through email with pictures doesn't work. image

image (1)

Hey, First of all your broadcast is incorrect... you can find your broadcast address with "ipconfig /all", in your case, it should be 192.168.1.255. Are you running script and soundswitch on same pc? if yes - try to change UDP_IP from 0.0.0.0 to one of your interface ip, but need to start script before soundswitch. I can try to guess why you see no light chages. if you have UDP_IP set 0.0.0.0 it should bind to all network inerfaces ( 192.168.1.17 &192.168.1.20 ) on udp port 6454, and case sound switch is on the same machine, that's an issue as soundswitch also needs 6464 for artnet protocol...so lets say changing UDP_IP to 192.168.1.17 should allow the script to get 6474 port only on that ip, and soundswitch will take whats left... Let me know if thats works out. Thanks Domas

dzelionis commented 2 years ago

Can you try 192.168.1.255 as broadcast ip in the file?

I have another question: can you run multiple instances in the same network? I have modified your script and wrote a wrapper for nanoleaf and it works really well beside some noticeable lag. I can either run my script or your script. Soundswitch only picks up one.

Are you trying to run more than one instance of script on the same pc ? Not gonna work out of the box....check what i wrote one post above.

erhan- commented 2 years ago

Yeah I know it cant work on the same interface because it will use the same port. I use two devices atm. I wrote a wrapper for nanoleaf using your code and my whole room is blinking :D

It lags a bit but it is okay for what it can do. I will upload it soon. Not too many changes. Just added the nanoleafapi stuff. Soundswitch works also greatt with just running Sets at home. :)

dzelionis commented 2 years ago

Yeah I know it cant work on the same interface because it will use the same port. I use two devices atm. I wrote a wrapper for nanoleaf using your code and my whole rooom is blinking :D

It lags a bit but it is okay for what it can do. I will upload it soon. Not too many changes. Just added the nanoleafapi stuff. Soundswitch works also greatt with just running Sets at home. :)

again you could try to assign muliple ip's to one network interface, on windows if you set interface ip to be static, you have advanced options and you can add more ip's on the same interface; on linux use "ip addr" command to assign additional ip's to interface. That should work. I have no idea abou "nanoleaf" as i had no fingers on it...do you have url for documentation ?

erhan- commented 2 years ago

Yes I know, I am on Linux and will do two ips on one interface to use the same port. I have uploaded my changes for nanoleaf btw: https://github.com/erhan-/artnet-advertise-nanoleaf

Thanks for your work. This is just some Frankenstein stuff :D

I cant find the link but you have to register at the vendors website to read the docu.

dzelionis commented 2 years ago

Yes I know, I am on Linux and will do two ips on one interface to use the same port. I have uploaded my changes for nanoleaf btw: https://github.com/erhan-/artnet-advertise-nanoleaf

Thanks for your work. This is just some Frankenstein stuff :D

I cant find the link but you have to register at the vendors website to read the docu.

in your code, image sounds wrong, it should be an ip of the device which you try to advertise, unless you are running nanoleaf on same pc

What we could do for better integration, for stuff like that, i could modify code to make it work into ways as standalone script or as library...in that case you could import it into your code and define call back there...

erhan- commented 2 years ago

Hey Domas,

the nanoleafs dont support artnet. I used your script and the script is basically the artnet receiver and will send from there the artpoll requests to soundswitch and the light change commands to the nanoleaf via a different protocol. It works good but slower than then WLEDs and laggy.

Can I remove the artpoll stuff?

Yes making every aspect modular would be good.

edit: Ah does it mean that here it already responds to pollreply and the while true loop is for continous sending if it does not receive a poll request.

So it happens already here:

https://github.com/erhan-/artnet-advertise-nanoleaf/blob/main/nanoleaf_artnet.py#L221

nice. I will change it a bit more then.

dzelionis commented 2 years ago

Hey Domas,

the nanoleafs dont support artnet. I used your script and the script is basically the artnet receiver and will send from there the artpoll requests to soundswitch and the light change commands to the nanoleaf via a different protocol. It works good but slower than then WLEDs and laggy.

It will be laggy as you using api which is tcp not udp....it can not keep up with udp packets....

Can I remove the artpoll stuff?

Yes making every aspect modular would be good.

edit: Ah does it mean that here it already responds to pollreply and the while true loop is for continous sending if it does not receive a poll request.

So it happens already here:

https://github.com/erhan-/artnet-advertise-nanoleaf/blob/main/nanoleaf_artnet.py#L221

nice. I will change it a bit more then. it would happen here if sound switch was active like before..before it was floodig broadcast with pool request, so you was just responding there....but not anymore..... so now actually we wait to see if there any requests comming in, if not we just flood....i am testing other version myself....which is simpler in this aspect...its does not care at all if somebody sends requests...it just send poolreplys in any case.... so i may be pushing new update....soon...

erhan- commented 2 years ago

Http is used once to activate the UDP protocol (extControl). After that it is always UDP.

dzelionis commented 2 years ago

Http is used once to activate the UDP protocol (extControl). After that it is always UDP.

in that case try to comment out this line: image

as it was added to save cpu usage,as was no need for normal Artnet packets.... also you may consider to run your api in seperate thread, as more time callback takes to be run more laggy you get...so you could try just that calback sotre some values what you need, and other thread is parsing it and sending it to nanoleaf... lets say artnet is faster 2x times so, then values in array would change twise, while you parse and send an update to nanonleaf....so you would just skip some values but that still should be grant..

erhan- commented 2 years ago

These are all great ideas and I also have thought about it. I also decreased that value. The problem is that the nanoleaf developers recommend no more than 10hz. If I remove it or make the value very small, then the lags and choppiness gets even worse, I think the problem is on the nanoleaf end. The hardware is not as powerful as the ESP. I will try your ideas on the weekend. In general it is already great but this low framerate makes me feel strange after a while. Like my whole vision is low fps. I think I will use the PR for WLED for artpoll so that this topic is dealt with. I will then see how efficient the nanoleaf stuff will be. I think I will buy soundswitch. I really liked it even though its just for home. It would be nice if they had a non commercial license for those who just want to enjoy it.

dzelionis commented 2 years ago

These are all great ideas and I also have thought about it. I also decreased that value. The problem is that the nanoleaf developers recommend no more than 10hz. If I remove it or make the value very small, then the lags and choppiness gets even worse, I think the problem is on the nanoleaf end. The hardware is not as powerful as the ESP. I will try your ideas on the weekend. In general it is already great but this low framerate makes me feel strange after a while. Like my whole vision is low fps. I think I will use the PR for WLED for artpoll so that this topic is dealt with. I will then see how efficient the nanoleaf stuff will be. I think I will buy soundswitch. I really liked it even though its just for home. It would be nice if they had a non commercial license for those who just want to enjoy it.

Or just replace nanoleaf controller with esp32 (~10 euro) with wled firmware, i guess nanoleaf should be something like ws2812b or similar...

Elucker69 commented 2 years ago

Ok Gents here are all the relevent settings as far as I know. Still having no luck. It feels like success is just within reach and all the more frustrating!

snip a snip b snip c snip d snip e snip f
dzelionis commented 2 years ago

Ok Gents here are all the relevent settings as far as I know. Still having no luck. It feels like success is just within reach and all the more frustrating! snip a snip b snip c snip d snip e snip f

Hey, all looks to be correct, could also share your wled network settings? And i see you have some more lights (not wled) is that working for you? Also you could try to do wireshark capture for me, so we could understand what we are missing....also you could try to change wled dmx mode to single mode for a testing and use any RGB led fixture 3 channel one, also you could try yo change universe to one on soundswitch and soundswitch second universe...if you still not get enyvhere, i could remote in and help you to troubleshoot it.....

dzelionis commented 2 years ago

There is posibility that issu is on your wifi router, you need to check wifi setting an see if there is something like "isolate ap clients" or something similar, and if it is enablecd - disable it, if you fail ti find that setting, GIn share screenshots...and i will check it for you

dzelionis commented 2 years ago

I Forgot to tell you that if you running wled in "effect mode"- artnet will be applied only on the selected and enabled segments...so you will basically will see how is web gui changing depending on artnet packets received..

dzelionis commented 2 years ago

I have also finished a few ongoing projects i had, resolume + wled + projector and 2nd diy RGB laser projector... https://drive.google.com/file/d/1D-BTvCp2FTL_5ruaqgKRwj9qTtAPIc16/view?usp=sharing :D still one of the projectors waiting for Blue laser diode...but almost done...

erhan- commented 2 years ago

Looks really nice. Maybe I have to switch to resolume, too. I have flashed the artnet-poll branch to my athom bulb but soundswitch still does not detect it without the script. It would have saved at least one step inbetween.

dzelionis commented 2 years ago

Looks really nice. Maybe I have to switch to resolume, too. I have flashed the artnet-poll branch to my athom bulb but soundswitch still does not detect it without the script. It would have saved at least one step in between.

In case you decide to go resolume, let me know i may share some additional script :D as resolume does not pick up bpm from engine hardware, so i have my own implementation based on reverse-engineered StageLinq protocol and BeatInfo data to actually get proper bpm into Resolume via API, but scrip is really messy at this stage so, it's not something that i would share to public, unless I clean it up a bit...

But i still use soundswitch as a main switch,allso half leds i have on it, so as my script records current colors from all fixtures on soundswitch and then it will change color pallet in Resolume and Pangolin Beyond for a lasers.

Elucker69 commented 2 years ago

@dzelionis, The other lights are working fine. Could not find anything in router settings. Tried single mode and 3 channel fixture. Updated wled to 13.1. GLN Share screenshots? Not sure what you meant there. Downloaded wireshark what do you want me to attempt to capture? Thank you for all your support. wifi snip

dzelionis commented 2 years ago

@dzelionis, The other lights are working fine. Could not find anything in router settings. Tried single mode and 3 channel fixture. Updated wled to 13.1. GLN Share screenshots? Not sure what you meant there. Downloaded wireshark what do you want me to attempt to capture? Thank you for all your support. wifi snip

That's not a problem at all, it's more like it is a challenging arm to get it working for you :D and i love challenges. i just thinking remote to your pc probably would be the fastest approach at this stage.... do you have anydesk ? if not you can install it here anydesktop what time zone are you in? ... so if you want to go this approach, maybe just email me your mobile phone where i could reach you so while i will be remoting in i had you on the line.... my email is domas.zelionis@gmail.com. Let me know if that would suit you.