Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
/ zetta-auto-scout Public archive

A basic Scout for auto-wiring devices in Zetta.

License

Notifications You must be signed in to change notification settings

zettajs/zetta-auto-scout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zetta Auto Scout

Zetta Auto Scout is a way to initiate a zetta device driver without having to build a generic scout that looks for only a device type.

Install

npm install zetta-auto-scout

Usage

var zetta = require('zetta');
var AutoScout = require('zetta-auto-scout');
var LED = require('zetta-led-mock-driver');

zetta()
  .use(AutoScout, 'led', LED)
  .use(AutoScout, 'led', LED, arg1, arg2) // arg1, arg2 are passed to led driver
  .listen(1337)

Limitation

zetta()
  .use(AutoScout, 'led', LED)
  .use(AutoScout, 'led', LED)
  .listen(1337)

Will only initialize one led driver, zetta thinks that it already exists. You can get around this with adding separate args for each device.

zetta()
  .use(AutoScout, 'led', LED, 1)
  .use(AutoScout, 'led', LED, 2)
  .listen(1337)

Licence

MIT

About

A basic Scout for auto-wiring devices in Zetta.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •