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/.
npm installto install needed dependencies.
One way to use the SDK is to trigger Recipes and fetch information about the Recipes.
You can run this example via
npm run example:recipe, the sample code is located in scripts/recipe/listAllRecipes.js.
Another way is to enable action forwarding to track what is happening on the Brain (power on and power off of recipes and more). You can run that example via
npm run example:forwardaction, the sample code is located in scripts/forwardaction/.
Another way to use the SDK is to add support for custom devices.
The source implementation of the example drivers are located in lib/.
To start a server with the example SDK Drivers using the CLI, and register the devices to the first Brain found on the network, run the command:
To connect to a specific Brain you can configure options for the CLI in the
package.json file. For example to connect to a Brain with the ip of 10.0.0.42 change the line with brainHost to include the ip:
There's 2 main parts:
1. the adapter definition: 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. This also exports your driver (allowing other tools like the CLI to run your driver)
2. the controller implementation: the controller needs to implement all the capabilities defined by the adapter. It then handles the events and interacts with the NEEO Brain when a device is added to the Brain.
If you implement a driver and share it with others we currently recommend publishing it to NPM as a module. Using the "neeo-driver-" prefix for the name will make it easy for others to find it.
The neeo-driver-example directory shows what a minimal self contained driver might look like.