-
Notifications
You must be signed in to change notification settings - Fork 114
Module Search
If you're starting a Zetta IoT project, it's a good idea to discover if there are any existing device drivers that you can use. The Zetta team and the open source community have written dozens of Zetta device drivers for many kinds of devices and made them available through NPM and, in some cases, GitHub.
This topic explains how to locate existing Zetta device drivers that are available in the public domain.
The best way to see what's out there is to use the Zetta modules search page on the zettajs.org web site.
The search page loads all the NPM projects that have the keyword zetta
or Zetta
. Then, you can search for specific device names within the results page.
Note: The search page omits some NPM projects that happen to have
zetta
orZetta
keywords that are not relevant to thezettajs
open source project.
Tip: The module search discovers NPM projects that match the zetta
or Zetta
keywords, but not all matches will be device drivers. Note that by convention, Zetta device drivers follow this naming convention:
`zetta-[device name]-[platform name]-driver`
For example:
`zetta-pir-bonescript-driver`
Therefore, you might search in the modules results page for driver
to get a list of all the Zetta drivers. Or, search for a specific platform, such as bonescript
or edison
to find platform-related drivers.
You can use the repository search in GitHub to look for Zetta driver projects. The search can locate projects that are not available on NPM.
If a driver doesn't exist for your specific device needs, you can write your own Zetta device driver. For this, you'll need to determine first if there is an existing Node.js interface for the device, such as the BoneScript library for Beaglebone devices or the node-hue-api library for the Philips Hue lighting systems.
A good way to begin a new driver project is to stand up one of the sample projects, such as the Mock LED Device project, and follow the same pattern used to write and use the sample device driver. Assuming you have a Node.js module that you can use to interact with your device, then you can implement transition functions that call the device-specific Node.js interface.
If you're working with a device that does not have a Node.js library already, then you're faced with developing a Node.js module that can interface with your specific device. You can check out the node-gyp project allows you to compile native addon modules for Node.js.
Developing native addons for Node.js is beyond the scope of the Zetta documentation.
Need help? Visit the Zetta Discuss List !
Need help? Visit the Zetta Discuss List ! |
---|
About Zetta
Videos and webcasts
- NEW! Building with Zetta
Tutorials
- NEW! Zetta tutorial series
- Quick start
- Configure a simple device
- Build a mock LED device
- Use the browser client
- Deploy a Zetta server to Heroku
Understanding Zetta
Writing Zetta drivers
- Finding Zetta device drivers
- Create a device driver from starter code
- More coming soon...
Using streams
Reference