xap

0.1.3 • Public • Published

To Install

npm install xap

To Use

var xap = require('xap'),
    broadcaster = new xap.XAPBroadcaster(
        {class: 'test', source: 'vendor.device.testing', uid: 'FF123400'}
    );

broadcaster.send('temp.current', {'temp': 25, 'units': 'C'});

xfx-viewer-shot

You probably want to hook it up to something that generates messages more realistically, for example, to bigkevmcd rfxcom library ...

var RfxCom = require('rfxcom').RfxCom,
    xap = require('xap'),
    rfxcom = new RfxCom("/dev/ttyUSB0", {debug: true}),
    broadcaster = new xap.XAPBroadcaster(
        {class: 'Thermostat.status', source: 'rfxcom.WMR800.external', uid: 'FF123400'}
    );

rfxcom.on("th3", function(evt) {
    broadcaster.send('temp.current', {'temp': evt.temperature, 'units': 'C'});
});

rfxcom.initialise();

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i xap

    Weekly Downloads

    8

    Version

    0.1.3

    License

    none

    Last publish

    Collaborators

    • antsman
    • bigkevmcd