3

Retrieving thermostat ambient Temperature using cylon.js throwing errors I replaced ACCESS_TOKEN with my Access_token and also device id

Code:

var Cylon = require('cylon');

Cylon.robot({
  connections: {
    nest: { adaptor: 'nest', accessToken: 'YOUR_ACCESS_TOKEN' }
  },

  devices: {
    thermostat: { driver: 'nest-thermostat', deviceId: 'YOUR_DEVICE_ID' }
  },

  work: function() {
    every((10).seconds(), function(){
      var temp = my.thermostat.ambientTemperatureC();
      console.log('Ambient Temperature', temp);
    });
  }
}).start();
Naresh Reddy
  • 179
  • 1
  • 7

1 Answers1

3

You need to make the cylon module available in your project.

npm install --save cylon
Trott
  • 66,479
  • 23
  • 173
  • 212