You can find the SDK documentation at https://github.com/NEEOInc/neeo-sdk.
To find out more about NEEO, the Brain and "The Thinking Remote" checkout https://neeo.com/.
- You must have Node.js v6 installed, see http://nodejs.org
- Run
npm install
to install needed dependencies.
One way to use the SDK is to trigger Recipes and fetch information about the Recipes.
For example:
- Find the nearest Brain
- Get a list of recipes
- Find out which recipes are currently powered on
You can run this example via npm run recipe
, the sample code is located in recipe/listAllRecipes.js.
Another way to use the SDK is to add support for custom devices. There's 2 main steps:
1. the adapter: the adapter defines what the custom device can do. We use a factory to simplify the creation of a device, set the handlers and register it with a running Brain.
2. the controller: we use a controller for event handling of the device after it's registered.
The "Simple sample" code is located in the device/simpleDevice directory.
This example device has:
- 2 buttons
- 1 switch (say on/off)
- 1 slider (say a dimmer)
- Start up the device via
npm run server:simple
- Connect to your NEEO Brain in the NEEO app
- Go to add device
- You should be able to find the example by searching for NEEO Simple Device
The "Complex sample" code is located in the device/discoverableLightDevice directory.
If the device requires a manual action before registering it (for example enable the discovery of the device), it's covered with a discovery step.
- Start up the device via
npm run server:complex
- Connect to your NEEO Brain in the NEEO app
- Go to add device
- You should be able to find and add the example by searching for NEEO Complex Device
When you add that device you can display instructions for that step before it is added on the Brain.