Artnet poll in Chromium

190 views
Skip to first unread message

Petr Vanek

unread,
Oct 11, 2013, 12:10:24 PM10/11/13
to open-l...@googlegroups.com
Simon, Peter,

good seeing you again in London :)

I have a question which have thought i might ask here...

I am looking at Chromium extensions programming and after seeing the Robe MiniMe fixture i realized that this could be a nice pet project to learn something new - making a browser extension for content preview/ftp content upload. The MiniMe provides ftp for content upload, Artnet for controlling, CITP will come in next few months too.

I can imagine ftp should be easily possible in browser, to discover the units on the net i thought of using either Artnet poll or CITP discover, but my question is - would browser extension environment or any of the node.js....nmn... be sufficient for this, as broadcast packets need to be sent...?

cheers

Petr

Peter Newman

unread,
Oct 11, 2013, 8:11:58 PM10/11/13
to open-l...@googlegroups.com
Hi Petr,

It was nice to meet you too.

The last time I did browser extension programming was about seven years ago, in Firefox, but from memory, it was all just Javascript and calls to a webserver. I guess it's moved on since, but I'd be surprised if you could do something as invasive as random packets. You could always allow manual entry by default and have an option to add an OLA server address for when we get ArtNet node discovery plumbed through to the website/JSON API (bug log is http://code.google.com/p/open-lighting/issues/detail?id=167 ). :)

PN

Sean Sill

unread,
Oct 11, 2013, 9:27:41 PM10/11/13
to open-l...@googlegroups.com
I'm interested to see what you can do with it. I would be Peter Newman is correct that I doubt they let you send arbitrary packets.

Petr Vanek

unread,
Oct 12, 2013, 6:02:32 AM10/12/13
to open-l...@googlegroups.com
Thanks Peter,

after a bit of digging around, i have realized that yes, any low level work is not possible, but also, even ftp is not in the scope of javascript. It seems that if i run node.js, i could achieve both - artnet (as per here https://github.com/BrianMMcClain/artnet-nodeand thus possibly discovery, together with ftp but then node.js is not as easily to be distributed/deployed as a browser plugin/app would be.

I will see what else i can find out, before moving forward,

thank you

Petr

Simon Newton

unread,
Oct 14, 2013, 8:36:48 PM10/14/13
to open-lighting
You've figured it out but for the archives the closest thing I know of
is the native client in chrome:

https://developers.google.com/native-client/

It only has websockets / http support though, see
https://developers.google.com/native-client/faq#PortingEase

We're still a way off from my dream of running OLA in a browser...

Simon
> --
> The Open Lighting Group: open-l...@googlegroups.com, #openlighting
> (irc.freenode.org)
> To unsubscribe from this group, send email to
> open-lightin...@googlegroups.com
> For more options, visit https://groups.google.com/groups/opt_out?hl=en

Petr Vanek

unread,
Oct 15, 2013, 3:34:59 PM10/15/13
to open-l...@googlegroups.com

On Tuesday, October 15, 2013 2:36:48 AM UTC+2, Simon Newton wrote:
You've figured it out but for the archives the closest thing I know of
is the native client in chrome:

https://developers.google.com/native-client/

It only has websockets / http support though, see
https://developers.google.com/native-client/faq#PortingEase

We're still a way off from my dream of running OLA in a browser...

 
Hi Simon,

well, not quite there yet even with figuring it out. The native client has some current limitations: no support for raw TCP/UDP sockets (analogous versions—websockets for TCP and peer connect for UDP—are in the works and will be available soon)

UDP is actually partially in and can be enabled via ://flags but no app in the store can utilize it yet. Well, with my speed the'll have it in stable by the time i have something functional :))

So atm I am trying to run node.js modules in the browser but even with browserify, i am hitting walls. Browserify support for dgram  (simudp module) should be there but doesn't run for me (actually broadcast wasn't even implemented, and although the nice developer for simudp provided some help, the code still does nothing in the browser).

I have two possibilities: run this as a service on "a" computer, or run it in the browser. I prefer the second, although i am not sure if mobile chromium could be used (i secretly hope yes, in the future). Running it on a server would allow me to utilize power of OLA, but there is probably very little i could use...

All typical non programmers disclaimers about code apply :) I am now listing machines on the network, will see tomorrow how this works with 16 units :)

Petr




Sean Sill

unread,
Oct 15, 2013, 3:46:04 PM10/15/13
to open-l...@googlegroups.com
  It's conceivable to connect to the OLA web-server and use the same RPC calls it uses wouldn't it, Simon? I don't know if that buys you anything though Petr. We still haven't plumbed the art poll replies though the website. I know there is greater work on going on the Art-net side as well.

  It is open source you could roll your own ola client into the framework :D

Petr Vanek

unread,
Oct 21, 2013, 1:31:36 PM10/21/13
to open-l...@googlegroups.com
Just a quick update for those interested.

1) in chrome apps, access to chrome.socket is granted on permission model bases so arbitrary packets are allowed. Unfortunately, UDP doesn't support broadcast yet, as per this bugreport: https://code.google.com/p/chromium/issues/detail?id=308461 , so Artnet broadcast based discovery is't possible yet. CITP supports multicast discovery, but no CITP support in MiniMe yet (coming up later), i have yet to test real CITP multicast discovery in a browser.

2) ftp client in browser is possible, i have modified this code https://github.com/ratsaas/quadrotor/blob/master/dev/chrome/Ftp.js to have user credentials support and it runs nicely in a browser.

On the technological side, this should be enough for a such a simple viewer/manager to be created.

cheers

Petr

Jason Kyle

unread,
Oct 21, 2013, 2:46:14 PM10/21/13
to open-l...@googlegroups.com

Can you receive broadcasts okay?

For a horrible hack around not having the ability to send broadcasts you could, on a small subnet /24, prod each of the 254 addresses with a unicast discovery message instead.

ArtPollReply responses are always broadcast however ArtPoll messages may be unicast or broadcast.

 

Best Regards,

 

Jason Kyle

DMXking.com

--

Petr Vanek

unread,
Oct 21, 2013, 6:24:57 PM10/21/13
to open-l...@googlegroups.com
It is a horrible workaround but it's working quite well :), with a bit of timeout all should be OK, thank you!

Petr

Jason Kyle

unread,
Oct 21, 2013, 6:32:05 PM10/21/13
to open-l...@googlegroups.com

Just don’t do it with the official Art-Net class A network addresses lol

Petr Vanek

unread,
Oct 25, 2013, 3:22:39 PM10/25/13
to open-l...@googlegroups.com
hehe :)

well, looking at the ticket i have opened, it was strange to me that it was labeled platform specific... Linux. So i have tried in Windows today and sure enough, no need to setBroadcast on Windows and broadcast discovery works. Anyone knows how is it on OSX?

Petr
Reply all
Reply to author
Forward
0 new messages