Re: [open-lighting] getting started sending artnet

1,265 views
Skip to first unread message

Peter Stuge

unread,
Jul 2, 2012, 9:54:19 PM7/2/12
to open-l...@googlegroups.com
nay wrote:
> control around 1000 RGB LEDs with an interactive animation at
> around 30 fps if possible.
> * I am planning to do this using 2 x Martin Ether2DMX8 boxes (although
> I also have access to 2 x ELC DMXLAN Node 8 boxes if they would be better).

Recommend do the math to know your bottlenecks. Requires knowing
exact overhead of traffic you generate, and possibly knowing
implementation details of the "boxes" used.


//Peter

Jason Kyle

unread,
Jul 3, 2012, 12:50:36 AM7/3/12
to open-l...@googlegroups.com

The universe you configured “uni1”, shouldn’t this be an output universe?

You won’t strike any throughput issues with 16 universes at 30fps, the data rate isn’t all that high and can be approximated as DMX bit rate x 1.5 x universe count -> 6Mbps. Suggest using ArtNet II unicast though as many devices don’t like seeing multi-Mbps broadcasts.

If you’re in the market for multi-universe hardware then take a look at our eDMX4 unit and talk to me off list.

Best Regards,

 

Jason Kyle

DMXking.com / JPK Systems Limited

+64(9)379 4836

+64(21)672535

j...@dmxking.com

 

From: open-l...@googlegroups.com [mailto:open-l...@googlegroups.com] On Behalf Of nay
Sent: Tuesday, 3 July 2012 13:33
To: open-l...@googlegroups.com
Subject: [open-lighting] getting started sending artnet

 

Hello all,

thanks for all the hard work on such a useful project. I'm looking to implement OLA for an upcoming c++ project on OSX that will be my first use of artnet and need a bit of help getting started now that I finally have some hardware.

* Basically I have a custom c++ app (built using OpenFrameworks) that needs to send artnet to control 16 dmx universes. This will eventually control around 1000 RGB LEDs with an interactive animation at around 30 fps if possible.


* I am planning to do this using 2 x Martin Ether2DMX8 boxes (although I also have access to 2 x ELC DMXLAN Node 8 boxes if they would be better).

* Thanks to the wiki page by Tobi Schäfer, I have libartnet compiling with openframeworks (which I plan to wrap up and keep available here https://github.com/naychrist/ofxLibArtnetExample)
* I currently have one string of LEDs connected to a martin box, which is able to control it using its built in test functions.

My understanding is that I need the OLA daemon running for my c++ app to talk to using libartnet, is that correct?
I have installed ola via macports.

If I have OLA set up correctly should I be able to adjust the lights using the web console screen? This is not currently working. The martin device is supposedly configured so that all 8 dmx ports are outputs. The first 4 ports on my martin device are at [2.170.181.167] and my computer at [2.170.181.2]. I have the following in my artnet conf file:

always_broadcast = false
ip = 2.170.181.2
long_name = OLA - ArtNet node
net = 0
short_name = OLA - ArtNet node
subnet = 0
use_limited_broadcast = false

then using the ola web interface I have created the following universe:
universe id : 1
universe name: uni1
input port: ArtNet [2.170.181.2] ArtNet Universe 0:0:1

when I go to the console for this universe should adjusting the sliders for the channels have an effect? currently they do not.

Any advice would be HUGELY appreciated. Once I know I'm coming at it from the right angle and have the pieces talking I'll be able to get stuck into the meat of the project.
Thanks,
nay.




--
open-l...@googlegroups.com / http://groups.google.com/group/open-lighting
To unsubscribe email open-lightin...@googlegroups.com

Simon Newton

unread,
Jul 3, 2012, 1:56:08 AM7/3/12
to open-l...@googlegroups.com
On Mon, Jul 2, 2012 at 6:32 PM, nay <re...@spinifexgroup.com> wrote:
> Hello all,
>
> thanks for all the hard work on such a useful project. I'm looking to
> implement OLA for an upcoming c++ project on OSX that will be my first use
> of artnet and need a bit of help getting started now that I finally have
> some hardware.
>
> * Basically I have a custom c++ app (built using OpenFrameworks) that needs
> to send artnet to control 16 dmx universes. This will eventually control
> around 1000 RGB LEDs with an interactive animation at around 30 fps if
> possible.
> * I am planning to do this using 2 x Martin Ether2DMX8 boxes (although I
> also have access to 2 x ELC DMXLAN Node 8 boxes if they would be better).
> * Thanks to the wiki page by Tobi Schäfer, I have libartnet compiling with
> openframeworks (which I plan to wrap up and keep available here
> https://github.com/naychrist/ofxLibArtnetExample)
> * I currently have one string of LEDs connected to a martin box, which is
> able to control it using its built in test functions.

Hi Nay,

> My understanding is that I need the OLA daemon running for my c++ app to
> talk to using libartnet, is that correct?
> I have installed ola via macports.

libartnet and OLA are independent pieces of software. libartnet is in
maintenance mode, all the new work happens on OLA.


> If I have OLA set up correctly should I be able to adjust the lights using
> the web console screen? This is not currently working. The martin device is
> supposedly configured so that all 8 dmx ports are outputs. The first 4 ports
> on my martin device are at [2.170.181.167] and my computer at [2.170.181.2].
> I have the following in my artnet conf file:
>
> always_broadcast = false
> ip = 2.170.181.2
> long_name = OLA - ArtNet node
> net = 0
> short_name = OLA - ArtNet node
> subnet = 0
> use_limited_broadcast = false
>
> then using the ola web interface I have created the following universe:
> universe id : 1
> universe name: uni1
> input port: ArtNet [2.170.181.2] ArtNet Universe 0:0:1

If you want to *output* data from OLA, you need to use Output Ports.
OLA takes a device centric view of the world. Input ports receive DMX,
output ports transmit DMX. ArtNet devices on the other hand take a
network centric view, ArtNet Input ports send ArtNet data onto the
network, while ArtNet Output receive data from the network.

Also OLA strictly conforms to the ArtNet spec. This means that it's
limited to 4 input or 4 output ports at once. There are tricks you can
play with multihoming to support more than 4 ports, but OLA doesn't
support that (libartnet does however).

>
> when I go to the console for this universe should adjusting the sliders for
> the channels have an effect? currently they do not.

Are the Martin devices configured correctly? You'll need to make sure
that they are configured for ArtNet SubNet 0 and Universe 1.

Once you've confirmed that, if it still doesn't work try enabling
always_broadcast. That will force OLA to use ArtNet I rather than
ArtNet II. If the Martin devices aren't compatible with ArtNet II
(that is, they don't send correctly structured ArtPollReply packets)
they won't work unless this option is enabled.

Finally some martin devices have a rather broken network stack and
only respond to the limited broadcast address (255.255.255.255), you
can try enabling the use_limited_broadcast option.

Hope this helps,


Simon

nay

unread,
Jul 3, 2012, 4:25:14 AM7/3/12
to open-l...@googlegroups.com
Thanks Simon,

I have made sure that I have the port set as output in OLA, and that the output port on the device is subnet 0 universe 1 but still no luck.
I also tried all the broadcast options and the ELC node8s as well but no love.
How would you talk to OLA from a client app if not with libartnet then?

Unfortunately I do need 16 universes so unless there are other options I guess I need to work with libartnet anyway. I have this compiling but can't seem to get anywhere with this either. I keep getting "sending to 2.170.255.255" but the lights do not change. I set up with something like:

//----------------------------------------------------------

artnetNode  = artnet_new(ip_addr, 1);
       
        if (!artnetNode) {
            printf("Error: %s\n", artnet_strerror());
            std::exit(-1);
        }
       
        artnet_set_long_name(artnetNode, "Art-Net Test");
        artnet_set_short_name(artnetNode, "ANT");
       
        // set the upper 4 bits of the universe address
        artnet_set_subnet_addr(artnetNode, subnet_addr) ;
       
        //create universes...
       // enable port       
            artnet_set_port_type(artnetNode, uni.port_id, ARTNET_ENABLE_OUTPUT, ARTNET_PORT_DMX);
            // bind port to universe
            artnet_set_port_addr(artnetNode, uni.port_id, ARTNET_OUTPUT_PORT, uni.port_addr);
       
        artnet_dump_config(artnetNode);
       
        //set receiver callback
        artnet_set_handler(artnetNode, ARTNET_RECV_HANDLER, artnetReceiverWrapper, this);
       
        if (artnet_start(artnetNode) != 0) {
            printf("Error: %s\n", artnet_strerror());
            std::exit(-1);
        } 


//----------------------------------------------------------

and then I call something like this each frame with new data:

artnet_send_dmx(artnetNode, uni.port_id, uni.length, uni.data);

but still nothing. any other advice for me?
cheers,
nay.

nay

unread,
Jul 3, 2012, 8:08:40 PM7/3/12
to open-l...@googlegroups.com
okay so embarrassingly it turns out my subnet was wrong!
had to change from 255.255.0.0 to 255.0.0.0
 
libartnet is now working although I still am having no luck with ola.
as I do need to send to 16 universes for this project that is okay

do I need to do anything special for 'multi-homing'? if I have hardware setup so that there are 4 sets of 4 outputs, each with a unique IP in the same range I am broadcasting should this work?
(I am about to start crimping connectors to start testing this)

or do I need to code up 4 different libartnet nodes each with a different broadcast IP?

Simon Newton

unread,
Jul 3, 2012, 9:38:59 PM7/3/12
to open-l...@googlegroups.com
Correct. You need to assign 4 IPs to the sender, and then call
artnet_new() for each of them. Once you have 4 nodes, call
artnet_join(node1, nodeN) for nodes 2, 3 & 4.


Simon

Simon Newton

unread,
Jul 3, 2012, 9:39:04 PM7/3/12
to open-l...@googlegroups.com
On Tue, Jul 3, 2012 at 1:25 AM, nay <re...@spinifexgroup.com> wrote:
> Thanks Simon,
>
> I have made sure that I have the port set as output in OLA, and that the
> output port on the device is subnet 0 universe 1 but still no luck.
> I also tried all the broadcast options and the ELC node8s as well but no
> love.
> How would you talk to OLA from a client app if not with libartnet then?

OLA provides a client library: http://www.opendmx.net/index.php/OLA_Client_API

nay

unread,
Jul 4, 2012, 3:16:55 AM7/4/12
to open-l...@googlegroups.com
@ Douglas,
thanks for that. being new to artnet it will take me a little while to digest it all ;)
thanks for the code too. Have downloaded it to take a look although I will first try things vanilla

for the moment I'm just concerned with sending data. Does that mean I can use artnet_raw_send_dmx() with a single IP, and as long as all my devices are on the same network subnet it should work?

the martin box I have does split each of the 4 ports into 2 nodes and give the option to configure each with a unique IP. Not sure about the ELC box yet.

@Simon
if using artnet_join() as you suggested do I assign port IDs as normal, keeping them unique across all nodes and then only call artnet_send_dmx() referencing the first node? or do I need mange this myself?

Douglas

unread,
Jul 4, 2012, 4:10:07 AM7/4/12
to open-l...@googlegroups.com
for the moment I'm just concerned with sending data. Does that mean I can use artnet_raw_send_dmx() with a single IP, and as long as all my devices are on the same network subnet it should work?
 
Yes, that should work, as far as I know. I would assume Art-Net nodes will receive the ArtDMX packets just fine.

I’d love to hear from others with much more experience than myself if this is indeed a reasonable thing to do.

If you use my code, you’ll want to do a diff against the last libartnet release to understand what I’ve changed.
Probably the only bit you will need is in artnet.c, make sure artnet_raw_send_dmx will permit you to send dmx (you might need to remove one of the if statements that prohibits this)
 
the martin box I have does split each of the 4 ports into 2 nodes and give the option to configure each with a unique IP. Not sure about the ELC box yet.

That’s interesting. I’d love to know how other common devices work, and if lighting consoles that send data (like you’re trying to do) ever present themselves with multiple IPs in that way.

Mr.Goose

unread,
Jul 4, 2012, 5:04:27 AM7/4/12
to open-l...@googlegroups.com
Luminex Ethernet-DMX8 is composed of two virtual nodes, each that can be set with a single IP address. Each outlet can be set with  a separate protocol. 
Mr.Goose

Simon Newton

unread,
Jul 4, 2012, 12:04:27 PM7/4/12
to open-l...@googlegroups.com
On Wed, Jul 4, 2012 at 12:16 AM, nay <re...@spinifexgroup.com> wrote:
> @ Douglas,
> thanks for that. being new to artnet it will take me a little while to
> digest it all ;)
> thanks for the code too. Have downloaded it to take a look although I will
> first try things vanilla
>
> for the moment I'm just concerned with sending data. Does that mean I can
> use artnet_raw_send_dmx() with a single IP, and as long as all my devices
> are on the same network subnet it should work?

Yes, the 4 port limitation is only really a problem on the receiver
side (since those are the devices you'll likely want to configured
remotely and they have to respond with valid ArtPollReply messages so
that ArtNet II & III works correctly in unicast mode.

Using a single artnet_node instance and calling artnet_raw_send_dmx()
will work, but you'll either need to i) always broadcast or ii) keep
track of the receiver nodes yourself and craft the appropriate unicast
messages.


Simon

>
> the martin box I have does split each of the 4 ports into 2 nodes and give
> the option to configure each with a unique IP. Not sure about the ELC box
> yet.
>
> @Simon
> if using artnet_join() as you suggested do I assign port IDs as normal,
> keeping them unique across all nodes and then only call artnet_send_dmx()
> referencing the first node? or do I need mange this myself?

No you need to manage this yourself. i.e. to use the 6 port you need
to call send on the node1, port 1 (assuming nodes and ports count from
0).

nay

unread,
Jul 4, 2012, 9:47:02 PM7/4/12
to open-l...@googlegroups.com
Thanks all,

I have my setup working sending raw dmx to 4 artnet nodes and have updated my openframeworks wrapper on github accordingly.

In the interest of time I will run with this for the current project, but will revisit afterwards to try and make the wrapper more full-featured.

Thanks again for the help,
nay.

mrpackethead

unread,
Jan 30, 2013, 1:47:32 PM1/30/13
to open-l...@googlegroups.com

All this is just one of the reasons sACN (e1.31) is better – no arbitrary limitations and confusing configuration.

Aint that the truth. 

Stephan Schulz

unread,
Sep 23, 2013, 3:40:54 PM9/23/13
to open-l...@googlegroups.com
Hi Nay.

I work with openframeworks a lot and am interested in using OLA to connect to the enttec mk2 pro via ftd2xx.
do you think you could share your openframeworks project so i can see how you connected OF and OLA ?

thanks os much. stephan.
Reply all
Reply to author
Forward
0 new messages