telldus-live-promise
v2.1.6
Published
A Node.js module to interface with Telldus Live API
Downloads
44
Readme
telldus-live-promise
A node.js module to interface with the Telldus Live API
Before Starting
You will need:
Telldus Live account login.telldus.com
OAuth tokens api.telldus.com
Install
npm install telldus-live-promise
API
Setup
var config = {
telldusPublicKey: "...",
telldusPrivateKey: "...",
telldusToken: "...",
telldusTokenSecret: "..."
},
telldus = require('telldus-live-promise'),
api = telldus.API(config),
sensors = telldus.Sensors(api);
devices = telldus.Devices(api);
Sensors
Read values from all sensors
sensors.list().then(<do something useful>).catch(<log error>);
Devices
Turn off every device
devices.list().then(function(sensors){
sensors.map(devices.turnOff);
});