JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q24617F
  • License MIT

A simple library to report data via node to sensable.io

Package Exports

  • sensable-reporter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sensable-reporter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

sensable-reporter

A simple library to report data via node to sensable.io

See the examples for a quickstart.

usage

var sensableReporter = require("sensable-reporter");
// the second general settings object have to contain your accessToken
var tmpReporter = sensableReporter({
        sensorid: "FooSensor",
        unit: "°c",
        sensortype: "temperature",
        latitude: "10.0",
        longitude: "5.0",
        name: "readble name for foo-sensor"
    }, {
        accessToken: "xyz-lshfosn",  //this token needs to be retrieved from sensable.io
        private: false
    });
var celsius = 32;
tempReporter.upload(
    parseFloat(celsius.toFixed(1)),
    (+new Date()),
    function(err) {
        if(err) {
            console.log(err);
        } else {
            console.log("posted the data");
        }
    }
);