twonet

3.0.0 • Public • Published

TwoNetAPI

An npm module that implements the Qualcomm Life 2net API. This implementation currently supports revision Y of the API.

Methods

    getHubs()
    getHub()
    activateHub()
    deactiveHub()
    activateHubStatus()
    activateDevice()
    deactivateDevice()
    getDevice()
    getDevices()
    createDevice()
    registerDevice()
    associateDevice()
    deviceCommand()
    deviceCommandStatus()
    updateDevicePassthrough()

Installation

    npm install twonet

Running utility scripts

The package provides several scripts for common tasks used with a fleet of hubs.

Before using the CLI, add your customer_id and auth_key to the lib/config.js file.

A list of available CLI commands:

    npm run help

Usage

    var api = new TwoNetAPI(YOUR_CUST_ID, YOUR_AUTH_KEY, REGION, ENV);
    api.getHubs(function(status, hubs) {
        if( status < 0 ) {
            console.log('Failed api.getHubs() : ' + status);
        }
        hubs.forEach(function(h) {
            console.dir(h);
        });
    });

Package Sidebar

Install

npm i twonet

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

39.5 kB

Total Files

12

Last publish

Collaborators

  • gtracy