Skip to content
An Open Source platform for the Internet of Things
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
sample
.gitignore
README.md
cli.js
package.json

README.md

Zetta.js

Zetta is an open source platform for the Internet of Things.

  • Model physical devices as state machines.
  • Orchestrate interactions.
  • Get an API... for free.

Example

app.js

var HelloApp = module.exports = function() {
  this.name = 'hello';
};

HelloApp.prototype.init = function(zetta) {
  zetta.get('joes-office-photosensor', function(err, photosensor) {
    zetta.get('joes-office-led', function(err, led) {
      photosensor.on('change', function(value) {
        if (value < 100) {
          led.call('turn-on');
        } else {
          led.call('turn-off');
        }
      });

      zetta.expose(led);
      zetta.expose(photosensor);
    });
  });
};

Install

$ npm install -g zetta
Something went wrong with that request. Please try again.