Skip to content

A node.js module to interface with the Parrot Flower Power cloud service

License

Notifications You must be signed in to change notification settings

TheThingSystem/node-flower-power-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-flower-power-cloud

A node.js module to interface with the cloud service for the Parrot Flower Power.

Before Starting

You will need OAuth tokens and a Flower Power account:

  • To get the OAuth tokens, use this form

  • To get a Flower power account, launch the iOS, and follow the directions to create an account. (Apparently there isn't an Android app yet).

Install

npm install flower-power-cloud

API

Load

var CloudAPI = require('flower-power-cloud');

Login to cloud

var clientID     = '...'
  , clientSecret = '...'
  , userName     = '...'
  , passPhrase   = '...'
  , api
  ;

api = new CloudAPI.CloudAPI({ clientID     : clientID
                            , clientSecret : clientSecret }).login(userName, passPhrase, function(err) {
  if (!!err) return console.log('login error: ' + err.message);

  // otherwise, good to go!
}).on('error', function(err) {
  console.log('background error: ' + err.message);
});

Get garden information

flower-power-cloud.getGarden(function(err, plants, sensors) {
  if (!!err) return console.log('getGarden: ' + err.message);

  // inspect plants{} and sensors{}
}

Finally

Enjoy!

About

A node.js module to interface with the Parrot Flower Power cloud service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published