Skip to content

Instantly share code, notes, and snippets.

@ryanjbaxter

ryanjbaxter/demo.js

Created Feb 22, 2016
Embed
What would you like to do?
Sample Node.js Code From IDA-6754 At InterConnect 2016
var Client = require('ibmiotf').IotfApplication;
var app = new Client({
"org" : "quickstart",
"id" : "interconnectdemo"
});
app.connect();
app.on('connect', function() {
console.log('connected');
app.subscribeToDeviceEvents('+','b0b448b87385','+');
});
app.on('deviceEvent', function(deviceType, deviceId, eventType, format, payload) {
console.log(payload.toString());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.