» Venode
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Venode

demo
Credits: sanch, joreg, tmp

about

Here is a demo showing interaction between nodejs and vvvv.
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

This demo show how you can interact with an html browser to get data and set data in realtime with multiple user/device using javascript.
Node act as a single lightweight server and communicate with vvvv with the udp protocol.

In order to have this demo working you first need to install node.js
download herehttp://nodejs.org/ once installed start the nodejs.v4p clic on start nodejs then open your browserhttp://localhost:8000/

Feedback are welcome for bug device suported...
tested on firefox win7 /chrome win7 /safari osx/safari ios6/
This is a demo and it is here as a starter for further devellopement, the message protocol should be replace with json in the future for better communication and cleaner code.

If you use this work for your project be nice and credit me.

Latest update to version 0.5

I have rewritten venode nearly from scratch and made several improvements:

  • new: communication completely via JSON
  • new: consistent session & data storing in vvvv
  • new: added message interval to avoid too many pushes (important for mobile devices)
  • new: responsive weblayout (with skeleton)
  • new: added more UI elements (colorpicker, 2dpad, bang & toggle button)
  • bugfix: call removeListener() only for disconnected client instead of removing all listeners

Next steps could be to implement OSC messages to have a more efficient client-server communication. Also new UI elements can be added: carousels, datepickers, modals, progressbars,..

Feedback welcome!
If you use this for your projects be nice and credit [www.intolight.de

download

venode0.5.zip
16.10.13 [11:38 UTC] by tmp | 2399 downloads
json communication, session & data storing, message interval, bugfixes, new ui elements
Show 5 older revisions

Older Revisions

venode05-helpers-no-messages.zip
04.04.16 [19:23 UTC] by mediadog | 522 downloads
Simple nodes to use venode0.5 without need for Messages
Venode0.3.zip
25.06.13 [17:11 UTC] by joreg | 1039 downloads
tested to work with nodejs 0.10.12 and vvvv b30.2 + addonpack
Venode0.2.1.zip
20.12.12 [15:35 UTC] by sanch | 1015 downloads
fix of a patch mistake on unzip message
Venode0.2.zip
20.12.12 [00:56 UTC] by sanch | 788 downloads
switched message to json + argument to node from v4
Venode.zip
18.12.12 [18:30 UTC] by sanch | 762 downloads

Urbankind 18/12/2012 - 10:01

Super cool!

eno 18/12/2012 - 10:35

Pfew, Sanch!

readme 18/12/2012 - 12:00

sweet, thanks!

gaz 18/12/2012 - 13:24

Very cool, will check out properly over Christmas

everyoneishappy 18/12/2012 - 14:31

wow! I was fiddling a bit with node & socket & vvvv (Hello world, how are you?), but this looks really great! Was there a specific project you made it for?

colorsound 18/12/2012 - 16:20

nice ¡¡

Desaxismundi 18/12/2012 - 17:42

Working nicely on chrome win7. Tx a lot!

Desaxismundi 18/12/2012 - 17:54

Remote host address on UDP client has to be changed to the client IP though to be able to update it ;)

sanch 18/12/2012 - 19:36

I did update a new version with a memory leak fix related to event listening on udp message
Also now slider/ui element value is not send back to vvvv via udp when updated to save bandwith for portable device.

sanch 18/12/2012 - 19:37

thx and happy christmas !

sebl 18/12/2012 - 23:53

merry sanchmas

thank you

mediadog 02/01/2013 - 00:31

Outstanding! Works perfect on XP32/b29/Firefox17. I was trying to figure out how someone could provide input from their mobile into projected visuals, and this should do the trick - I'll try putting up a QRCode that sends them to a page with controls based on this. Thanks a bunch!

sanch 02/01/2013 - 01:18

http://www.webdigi.co.uk/fun/space/
There is a techdemo about that idee , i did a basic joystick for phone , performance are still a bit to slow depending on what you want to do , i found it a bit slow even on local network from phone (iphone for my case)
If you want to do something reactive like stearing a car/ship i think it's still to slow . Problem seams to come from the phone not able to send/receive a lot of data as a laptop , the phone browser might even crash if you send to much data. But well there is still many other idee/interaction to do where you don't need huge amount of data.

mediadog 02/01/2013 - 05:51

Hey sanch! I just tried it out with an Archos 43 Android tablet on mobile Firefox, and while the Firefox slider update is VERY slow and clunky, the receipt of the data into the patch has no perceptual delay; even when I rapidly move the sliders back and forth there is a very high update rate. And if I had to pick one over the other, it's input responsiveness.

This test and the application I'm thinking about is on a LAN, which helps of course. I want to display a QR code over on the side of a large projection installation so people can create and control visual entities, and this looks like it will work great particularly because of the session ID. I had been looking at socket.io directly, this saves a MASSIVE amount of work!

I did get tripped up a bit when I tried the patch on my Win7x64 workstation, the first IP address was for the Bluetooth (0.0.0.0), and so it would send to client browsers but get no input from them. Might want to add to your instructions above to check that CAR output or change the patch to discard 0.0.0.0 slices from the IP node. Can't attach a file here or I would post the change but here's a pic. Thanks again!

sanch 02/01/2013 - 18:27

i think i depends on the device and browser... , but since many people are on iphone i thought it was not very good to use that kind of stuff for public if you need fast interaction .
for Ip i should update the patch and simply put 127.0.0.1, it was working fine before.. the car stuff was a bad idea , even using your select doesn't solve all issue...

velcrome 02/01/2013 - 18:51

this looks really great and tremendously useful.

i tested it on localhost (and chrome), and everything works just fine. but when using a smartphone or an ipod, it starts to get messy. the page loads slowly and user inputs are not transmitted at all.

the only interactions i see are NewClient and ClientDisconnect.

i disabled any firewall and even changed all ports in server.js to rule out any interference from other programs, but with no luck. do you have any idea what could cause this behaviour?

sanch 02/01/2013 - 19:26

There could be different problem , but that's difficult to say , you could check if you have a javascript debugger to enable it and see if there is any error. I tested it only on the last ios on iphone/ipad it was working , so can't really tell for other device. It migh come from javascript who sometime miss some feature on some browser. I think enabling javascript debugger is a good start to see what's going on.

velcrome 03/01/2013 - 17:45

mmh, must be something like that. the newer the hardware, the more complete the browser software.

i only have smartphones of colleagues to test, don't want to stretch their patience too much, so cannot do extensive testing. would love to know what breaks it though :/

one find: with mobile opera it works like a charm.

sansui 29/01/2013 - 23:56

Lovely collaboration! It works fine in local. But, I want to get hosting in Node.js hosting Service. so, If vvvv computer and Node.js server computer are different, how can I fix?

mediadog 24/02/2013 - 06:53

Any idea how to get a URL parameter like:

http://localhost:8000/?id=1234

passed as the "Interaction Data" on the NewClient message?

I tried looking at request.url in the httpServer in server.js, but all it gives is some ajax .gif file. This is all new stuff to me, but I hacked away anyway. Here's what I tried:

var requrl = "";
 
var httpServer = http.createServer(function(request, response) {
    requrl = request.url;
    request.addListener('end', function () {
        clientFiles.serve(request, response);
    });
});
 
...
 
    var NewId = "NewCLient|" + requrl +"|"+  socket.id;
        UdpSend(NewId,V4Ip,V4PortReceive)

Which gives "NewCLient|/css/images/ajax-loader.gif|JaVjO2hO-Var71mqcUDb"

How grossly am I off base here? Thanks!

mediadog 24/02/2013 - 17:53
sansui said
 It works fine in local. But, I want to get hosting in Node.js hosting Service. so, If vvvv computer and Node.js server computer are different, how can I fix?

I am totally guessing here (I haven't tried it), but take the right half of the demo patch, that starts the server, and instead of sending it the IP address of the local machine (from the IP node), give it the IP address of the other (client) vvvv machine (should be able to give the system name).

Run the left half of the demo code on the client machine, except give the IP address of the server to the UDB send node instead of localhost.

Also, at the top of the .\server\server.js file is the following:

var HttpPort = 8000;
var V4PortReceive = 5000;
var V4PortSend = 5001;
var V4Ip = process.argv[2];
var ServerFolder = './ServerRoot';

so you can change the port numbers and document root if you want. Good luck!

eps 24/04/2013 - 05:03

venode does not work anymore with newer node.js versions (0.10.xx)
(works with 0.8.23 though).
any plans to update?

Noir 21/06/2013 - 17:40

same problem here...
doesn't works with with node.js version 0.10

sansui 06/07/2013 - 13:13

joreg nice update!
I will try that venode 0.3.

sansui 21/07/2013 - 21:57

I tried venode 0.3 now.
I found something wrong in nodejs.v4p. some node lines was disconnected.
ShellExecute node was red, and nodejs server doesn't execute.
and I had run nodejs server manually in cmd.exe window.
In browser localhost:8000, it shows same webpage with old venode version.
then I found vvvv send to browser signal successfully, but vvvv doesn't receive signal from browser.

and I edited code in "server.js",

client.send(buff, 0, buff.length, port, Host, function(err, bytes) 
    {
        console.log("[ client send ] "+buff+" [port]"+port+ " [ host ] "+Host);
 
        if(err){
            console.log("err ? "+err + "byte ? "+bytes);
        }
 
        client.close();
    });

and in console, message was emitted like this.

slider:slider1:44|KzXTkvpZny86Fbzhv3W9 port 5003 [ host undefined

I found host variable is something wrong.
and edited like this,
//var V4Ip = process.argv[2];
var V4Ip = "192.168.0.9"; //my localhost IP

then, finally, it works, vvvv receives data well from browser.

joreg 23/07/2013 - 02:09

you sure you tried this combination with v0.3:

  • nodejs 0.10.12
  • vvvv b30.2 + addonpack

if ShellExecute (Windows Advanced) is red that sounds like you're missing the addonpack.

hardcoding your ip into the sourcecode should not be necessary. see the section in the patch where IP (Network) returns your local IP. there may be a missmatch there...

tmp 04/10/2013 - 11:09

hey!

i have some trouble sending data from vvvv to the client via broadcast or directly.

for that i open up several tabs and connect to the app. the vvvv data is received without problems and sliders are updated in all tabs.

but when i close one session the remaining tabs dont update the sliders anymore. this happens when i use broadcast or the session ids.
after opening a new tab everything works fine again.

do you know that bug?
i tried it with nodejs v0.10.18 and v0.8.25 in combination with vvvv_45beta30.2_x86

tmp 04/10/2013 - 11:43

ok i found it..

in the function socket.on('disconnect', function (){.. });
you remove all listeners: serverUdp.removeAllListeners("message");

after uncommenting this everything works fine. probably the listener for the disconnected client should be removed.. but i cannot find a solution to do that.

obernardoo 07/11/2014 - 18:50

Hi! very good job. How many people connected can interact at the same time? and that can be done to support as many people as possible?

tested and found ok:

  • node.js 0.10.12
  • vvvv_45beta33.3
  • vvvv-Message_x86 V1.33

Thank you!

tmp 07/11/2014 - 21:10

that depends on how many data is shared between all connected clients. so you have to test it for yourself in your particular application ;)

guest 28/01/2015 - 15:42

vvvv_45beta33.7 64bit seems to break the plugin. Can anyone confirm this?

Where have all the plugins gone, long time passing
joreg 30/01/2015 - 20:19

@guest: tmp forgot to mention that with his venode0.5 you also need message v1.33

otherwise just try venode 0.3

tmp 31/01/2015 - 11:05

Yes indeed. Sorry, I forgot to mention that. Since velcrome is rebuilding his message pack, I will release a new venode version as soon as he is ready with it.

artav 07/04/2015 - 15:32

Hi tmp,
have you any update regarding velcrome's message integration? We haven't managed to get V0.5 working at all (although V0.3 is very good)
thanks!

blausand 25/05/2015 - 20:49

+1 öooö excited for the update matching Marko's message v2.0 (x64) :)

robe 23/03/2016 - 14:48

Hello!
Any chance to make it work nowadays?
The Message part seems totally broken... NILs everywhere etc...

Could someone post the lastest working combo version?
(vvvv, node, message)
I'm doing it by trial and error, but..

Tnx in advance
robe

joreg 23/03/2016 - 19:16

@robe can you try and see if Venode0.3 (the last version i uploaded) maybe still works? it doesn't use "Message"..

velcrome 23/03/2016 - 23:55
robe said
Any chance to make it work nowadays?
The Message part seems totally broken... NILs everywhere etc
joreg said
maybe still works? it doesn't use "Message"

sometimes digging deep in the past can be rewarding, but forging something new is usually much more pleasant

vvvv-Message has undergone drastic change in the meantime, and interfacing to other apps was a priority. The whole session handling in the old upload is still cumbersome and long revamped. Json talk has been changed in a way that can be described as breaking: it is no longer quick and dirty, but readable.
When prototyping against venode, a lot of Message nodes were WIP and afterwards didn't make the cut and morphed into something more powerful.
Venode would have greatly benefited from a sync, but as it goes, it didn't happen yet.

That said, with vvvv-Message it is easier than ever to interface to any javascript object. Iirc @tmp used vanilla jquery. Accessing gui elements with a current vvvv-Message pack should be a blaze for someone with a little time on their hands and some familiarity with js.

robe 25/03/2016 - 00:17
velcrome said
...and some familiarity with js.

Ok, No familiarity at all, I'm sorry...
I would just take advantage of the new features:

  • new: communication completely via JSON
  • new: consistent session & data storing in vvvv
  • new: added message interval to avoid too many pushes (important for mobile devices)
  • new: responsive weblayout (with skeleton)
  • new: added more UI elements (colorpicker, 2dpad, bang & toggle button)

bugfix: call removeListener() only for disconnected client instead of removing all listeners

Anyway..
Is it actually possible to use the 0.5 version?
What version of Message should I use?

Cheers

velcrome 25/03/2016 - 15:43

i'll do a workshop with microdee next tuesday, can provide a new version and some insight at that day

robe 25/03/2016 - 18:58

Ok velcrome! I appreciate.
I'll wait, so... Thanks in advance

Noir 25/03/2016 - 20:45

@velcrome
good news

metrowave 29/03/2016 - 13:33

Thank you for any update on this. Looking forward to the workshop guys. is it today?

velcrome 29/03/2016 - 16:04

no, microdee asked to postpone it. there will be the lambdacube workshop at 6 CET though!

the message workshop will most likely commence on 9th of april, official announcements will follow.

mediadog 30/03/2016 - 04:16

I have just recently started using venode5 without Messages - since it is all JSON, I just use JSON Parser (here in contribs) and do everything directly in JSON. So yes it is possible to use it without Messages.

That being said, I rather prefer the look of the version of jquery.mobile that venode3 uses (1.2, easily upgraded to 1.2.1)

Here's the patch that decodes the JSON; unfortunately the rest of the nodes I did are somewhat tied into my other patches and config system, so I would have to clean them up to post them here in a sensible form. But I can make a pass if there's interest.

EDIT: Ooops, can't attach a patch here, so here's a pic to give you an idea:

mediadog 04/04/2016 - 19:35

Okie doke, I put up a zip of my simple nodes. They need the JSON Parse mentioned above, and you'll need to specify the path to the server.js file (lives in the venode0.5\server folder).

There is a help patch showing how to use them, but basically you just put in one setup node, then as many variable nodes as you need to interface with venode. One node takes care of sending and receiving changes.

I have only used these nodes in a simple single client setting, and I imagine that due to the UDP nodes used within, that more than one variable send at a time may get lost. But it's something to start with.

The setup node takes care of banging the server start on load, and more importantly the server kill when you quit the patch. If node.js does not start, it is likely because node.exe is still running and needs to be killed.

Note: Be sure the ports used in these nodes match the port (and port+1) set in the server.js file you are using.

anonymous user login

Shoutbox

~3d ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~9d ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~10d ago

fleg: hey there! What's the best tool for remote work? Teamviewer feels terrible. Thanks!

~23d ago

joreg: Last call: 6-session vvvv beginner course starting November 4: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~1mth ago

joreg: Missed the last meetup? You can rewatch it here: https://www.youtube.com/live/MdvTa58uxB0?si=Fwi-9hHoCmo794Ag

~1mth ago

theurbankind: When is the next big event, like node festival ?

~1mth ago

~1mth ago

joreg: Join us for the next vvvv meetup on Oktober 17th: https://visualprogramming.net/blog/2024/25.-vvvv-worldwide-meetup/

~2mth ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/