Skip to content

Instantly share code, notes, and snippets.

@deadprogram
Created May 12, 2015 01:14
Show Gist options
  • Select an option

  • Save deadprogram/69ccd0fb438f7612eb41 to your computer and use it in GitHub Desktop.

Select an option

Save deadprogram/69ccd0fb438f7612eb41 to your computer and use it in GitHub Desktop.
var DBus = require('dbus');
var dbus = new DBus();
var bus = dbus.getBus('system');
bus.getInterface('com.devicehive.cloud',
'/com/devicehive/cloud',
'com.devicehive.cloud',
function(err, iface) {
console.log("hi");
iface.on('CommandReceived', function(data) {
console.log("yo");
});
iface.on('SendNotification', function(data) {
console.log("dude");
});
iface.SendNotification("hola", "{'a':'1','b':'2'}");
console.log("sent");
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment