Created
May 12, 2015 01:14
-
-
Save deadprogram/69ccd0fb438f7612eb41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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