Skip to content

Drivers

Richard Willars edited this page Sep 19, 2016 · 10 revisions

What is a driver?

A driver in Thinglator has several responsibilities:

  • discover and connect to particular devices on the network
  • tell Thinglator about the capabilities of each of those devices
  • provide Thinglator with the ability to control each of those capabilities
  • expose events to Thinglator (where necessary) based on things that happen to devices (a sensor may report a new value)

A driver in Thinglator is almost like a translator. It takes the language of a particular home automation device and translates that language into a language that Thinglator can understand. In reality this is done using a series of methods and events that Thinglator exposes.

Each driver has it's own git repository and is added to your Thinglator system using npm.

How to find drivers

Each driver is it's own git repository and registered in npm. You can find all the available Thinglator drivers at https://www.npmjs.com/search?q=thinglator-driver-

How to add a driver to Thinglator

Navigate to the root of the thinglator directory and run

npm install thinglator-driver-xxx

where xxx is the name of the driver you want to install. Then restart Thinglator by re-running 'node app.js'

Once you have added a driver you'll probably want to use to add some devices to Thinglator. Check out the devices page (especially the discover API)

How to create a driver

Documentation to follow, but for now a good place to start is to copy the example driver found at https://github.com/richardwillars/thinglator-driver-starter

Clone this wiki locally