nodehelium
This is a Node.js library that wraps libhelium.
Example
var helium = ; // create a helium connectionobj = ; // open itobj; var token = "PbOkU4Jo+NObbPe27MJGNQ==";var mac = "000000fffff00002"; var i = 0;// set up the message callbackobj; // subscribe to a deviceobj; // send the device a messageobj;
Installing
OSX
Install libhelium from the OSX package
Then you should be able to npm install nodehelium
.
Debian/Ubuntu/Centos/Fedora
Install libuv and libhelium from the packagecloud packages
Then npm install nodehelium
should work.
Source
Build libuv and libhelium from source and install them. When building libu be sure to export CFLAGS="-fPIC" before running './configure' and 'make'. Then npm install nodehelium
.
The reason libuv is needed is because libhelium uses a newer libuv than nodejs 0.10.x uses, and we have to rewrite the symbol table in libhelium and libuv so it doesn't conflict with the libuv symbols in node.js. This hack should be unnecessary after nodejs 0.12 is released.