var assert = require('assert'), restify = require('restify'), osc = require('node-osc'); var hubAddress = '192.168.23.43', hubPort = 7110; var oscClient = new osc.Client(hubAddress, hubPort); var streams = [ 91755, 70632, 53146, 45582, 64590 ]; var client = restify.createJsonClient({ url: 'http://api.cosm.com', headers: {'X-ApiKey':'orKBBdLAKuKJU-RxqmZpZB6q0baSAKxBTVhKdjhUNkdyVT0g'},version:'*' }); var recentvalues = {}; var getstream = function(streamId) { client.get('/v2/feeds/' + streamId + ".json", function(err, req, res, obj) { if(err == null && obj.datastreams != null) { for(var i=0;i