neu

neurio

Neurio API node client

Showing:

Popularity

Downloads/wk

6

GitHub Stars

11

Maintenance

Last Commit

1yr ago

Contributors

4

Package

Dependencies

2

Size (min+gzip)

214.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Neurio Home Intelligence node API client

Build Status

Unofficial Neurio node API client

Features

Usage

Install

npm install neurio

Simple auth sample


var auth = require('neurio').Auth

var clientId = 'YOUR_CLIENT_ID'
var clientSecret = 'YOUR_CLIENT_SECRET'

auth.simple(clientId, clientSecret).then(function (client) {
  client.defaultSensorId().then(function (sensorId) {
    client.liveSample(sensorId).then(function (samples) {
      console.log(samples)
    })
  })
})

Last day stats


var start = moment().subtract(1, 'days').format()
var end = moment().format()
var granularity = 'hours'
var frequency = 1

client.stats(sensorId, start, end, granularity, frequency).then(function (stats) {
  var max = maxConsumption(stats)
  var average = averageConsumption(stats);
  console.log('Last day max consumption was ' + max.consumptionEnergy + " watts at " + moment(max.start).format())
  console.log('Average consumption was ' + average)
})

Checkout the rest of the samples

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100