blynk-client
v0.0.2
Published
blynk-client ================
Downloads
5
Readme
blynk-client
Simple node module to get manage blynk.
$ npm install blynk-client
Then get json information of your account
var c = require('blynk-client');
var p = c.connect('@mail','password','server',port);
You can set pin value
p.then(function(){
return c.hardware('2','v','w',1, 25); //dashboardId, pinType, read/write, pinId, [value]
})
Or listen event
c.event.on('message', function(a) {
console.log('MESSAGE: ' + JSON.stringify(a) );
});
Events are
- message : for all type of message events
- dashboard : for dashboard events
- [pinType][pinId] (ie v1 or d1 for example) : for pin event
- sync : for sync event