Nest Protect
The Nest Protect comes with an industrial-grade smoke sensor, has its own testing system, and lasts up to a decade. On top of that, it also has the ability to be hushed from your phone.
For more information click here.
How To Connect
Cylon.robot({ connections: { nest: { adaptor: "nest", accessToken: "ACCESS_TOKEN" } }, devices: { protect: { driver: "nest-protect", deviceId: "DEVICE_ID" } }, });
How To Use
"use strict"; var Cylon = require("cylon"); Cylon.robot({ connections: { nest: { adaptor: "nest", accessToken: "ACCESS_TOKEN" } }, devices: { protect: { driver: "nest-protect", deviceId: "DEVICE_ID" } }, work: function(my) { my.protect.on("status", function() { console.log("=========================Protect========================="); console.log("id:", my.protect.deviceId); console.log("locale:", my.protect.locale()); console.log("software version:", my.protect.softwareVersion()); console.log("structure id:", my.protect.structureId()); console.log("name:", my.protect.deviceName()); console.log("name long:", my.protect.nameLong()); console.log("last connection:", my.protect.lastConnection()); console.log("is online?:", my.protect.isOnline()); console.log("battery health:", my.protect.batteryHealth()); console.log("co alarm state:", my.protect.coAlarmState()); console.log("smoke alarm state:", my.protect.smokeAlarmState()); console.log("is manual test active:",my.protect.isManualTestActive()); console.log("last manual test time:", my.protect.lastManualTestTime()); console.log("ui color state:", my.protect.uiColorState()); }); } }).start();
Commands
locale
Returns the protect's locale
Returns
- (
String
) locale
softwareVersion
Returns the protect's software version
Returns
- (
String
) software version
structureId
Returns the protect's structure id value
Returns
- (
String
) structure id
deviceName
Returns the protect's name value
Returns
- (
String
) name
nameLong
Returns the protect's name long value
Returns
- (
String
) name long
lastConnection
Returns the protect's last connection value
Returns
- (
String
) last connection
isOnline
Returns the protect's is online value
Returns
- (
Boolean
) is online
batteryHealth
Returns the protect's battery health value
Returns
- (
String
) battery health
coAlarmState
Returns the protect's co alarm state value
Returns
- (
String
) co alarm state
smokeAlarmState
Returns the protect's smoke alarm state value
Returns
- (
String
) smoke alarm state
isManualTestActive
Returns the protect's is manual test active value
Returns
- (
Boolean
) is manual test active
lastManualTestTime
Returns the protect's last manual test time value
Returns
- (
String
) last manual test time
uiColorState
Returns the protect's ui color state value
Returns
- (
String
) ui color state
Events
no events