Skip to content

ashpool/telldus-live-promise

Repository files navigation

telldus-live-promise

NPM version Downloads Actions Status Actions Status

A node.js module to interface with the Telldus Live API

Before Starting

You will need:

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);
});