Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adamgoose/enocean-handler

An easy way to listen for button presses from Enocean Energy Harvesting Rocker Switches.
https://github.com/adamgoose/enocean-handler

Last synced: about 24 hours ago
JSON representation

An easy way to listen for button presses from Enocean Energy Harvesting Rocker Switches.

Awesome Lists containing this project

README

        

# Enocean Rocker Switch Handler

This package is designed for easy dispatching of custom Enocean Rocker Switch press handlers.

## Usage

> See example.js!

First, require the package.

```js
var enoceanHandler = require('enocean-handler');
```

Next, instantiate your object and provide it the configuration.

```js
var handler = new enoceanHandler('/dev/ttyUBS0', {
'mySenderId': {
'A0': function() {
console.log('Button A0 was pushed!');
}
}
});
```

Yes, it's that easy! :)