Using OSC with NodeJS - node.js

I need to create a test server in NodeJS that supports OSC over UDP. After a quick search there seems to be a lot of options. Can anyone recommend a module for OSC in NodeJS?

Colin Clark's osc.js is great. https://github.com/colinbdclark/osc.js/tree/master
There is a set of examples at https://github.com/colinbdclark/osc.js-examples
It is a full implementation of the OSC specification and provides node.js, browser, chrome app, and also compatibility with IP over serial if you are working with microcontrollers.

Related

Realtime Bi-direction Socket

I have an Arduino loaded with sensors connected to a Raspberry Pi. The Arduino passes all the data from the sensors to Raspberry.
Now I want to push all of these data in real-time over a socket to a server in the backend, and upload the data into a database.
I'm looking for the most optimal solution for this. Socket.io seems like a popular solution and relies on WebSockets and NodeJS.
Pusher seems like a decent API service that can easily integrate into iOS and Android devices.
What is the best solution out here? It seems like WebSocket is the way to go, but is there a better protocol to use for this purpose?
Check out the MQTT protocol as well. It's becoming widely used for this kind of purpose. You can find both open-source and commercial, as well as cloud-based and self-hosted, MQTT brokers.

node.js and Serial ports

I'm trying to build a simple web app that reads the clients' serial port that is connected to a barcode scanner. I have done this using ActiveX but it only works on IE browsers, i have heard that I can now do this using node.js and serial-node. Can someone tell me if this is even possible using these two technologies? Also if anyone can direct me to a working tutorial on how to do this. Thanks!
You can't read the serial port of the web app's client's computer using serial-node, no. Node.js and serial-node run server side, they do not have direct access to the web clients' hardware.

haxe/flash: Capture webcam to disc with node.js - possible?

I know I could resolve the problem easily with Red5 Media Server. I'm just curious, since I need a node server anyway and wondered if I can bypass Red5. Using the HTML5 camera api is not an option since I target up to four cameras at the same time.
I didn't see anything specific for Node.js to work with webcams. However, I saw this solution online which uses JavaScript, NodeJs, HTML5 (canvas) and WebSockets mainly to achieve frames out of video streaming then it uses the websockets to transfer the image into HTML5 canvas using NodeJs as an intermediary server.
hope it helps.
I'm the author of https://www.npmjs.com/package/camera-capture which supports portable easy to use API for node.js (server side) to capture camera video, audio and even desktop. Doesn't require any native libraries / dependencies and is easy to install - based on puppeteer. I'm already using it on desktop apps based on gtk, cairo, qt, and others and it's behaving acceptably fast although I keep looking for optimizations since the project it's pretty new. Feedback is most welcome.

Controlling an Arduino over the web with the lowest latency

I have an Arduino board in a location, and a webserver.
I also have a website that is supposed to control the Arduino. What technique would allow users to take control of the Arduino board with the least amount of latency?
I have Node.js, socketserver, Jabber in mind to experiment with, but is this the right direction?
You should have a look at Socket.IO for implementing WebSockets on server- and client-side.
There's a great project called duino for accessing Arduino with Node.js, you "only" have to pipe all communication through WebSockets.
Update: In the meantime I have published a framework for sending commands to an Arduino with Node.JS, JavaScript and WebSockets. Make sure to have a look at Noduino!
I had good luck using node-serialport to talk to the Arduino. Using the serial port results in very low latency, and I used it to build a photobooth. The code is on GitHub if you want to check it out, though it's very poorly organized as I was rushing to get this done for my wedding and well... corners were cut.

Realtime time message in iPhone SDK

I'm finding a way to realtime messaging in iPhone SDK. iPhone Safari doesn't support Web socket. Apple push notification is working only on application is close. I want to make like chat program with real time. There is other way except web socket ?
It's likely that the next version of iOS (4.2) will add WebSockets support. iOS 4.2 should be out this month.
You might looked at Socket.IO if you control the server side too. Socket.IO is a JavaScript library for the client and server that uses the best communication transport that both ends support starting with native WebSockets, then a Flash based WebSockets fallback, then various long-poll/COMET options. The API on client and server sides is very much like the normal WebSockets API regardless of which underlying transport is used. It would allow you to use the WebSockets protocol when available and fall back to something that still works when you don't have WebSockets (without requiring you to use a different API).
You can do some of the traditional "comet" tricks like long-polling or a forever iframe, however I'm not sure any of those are as concise as WebSockets.
If you're looking for a paired client / server side library, I would look at Socket.IO.

Resources