@caseywebb/growhaus-agent
Advanced tools
Comparing version 0.0.0-latest.20190729T210722Z.d2c59fa to 0.0.0-latest.20190729T211244Z.4763447
@@ -9,2 +9,3 @@ "use strict"; | ||
async function main() { | ||
console.log(`Starting agent with id "${config_1.AGENT_NAME}"`); | ||
const driver = new driver_1.LedDriver(config_1.DRIVER_PWM_PIN); | ||
@@ -20,2 +21,3 @@ const socket = new socket_1.Socket(`${config_1.SERVER_URL}/agent/${config_1.AGENT_NAME}`); | ||
offlineFallbackSchedule.subscribe(driver.setBrightness); | ||
console.log('Agent started'); | ||
} |
@@ -39,2 +39,3 @@ "use strict"; | ||
pause(duration) { | ||
console.log('Pausing offline schedule'); | ||
if (this.pauseTimeout) | ||
@@ -44,2 +45,3 @@ clearTimeout(this.pauseTimeout); | ||
this.pauseTimeout = setTimeout(() => { | ||
console.log('Resuming offline schedule'); | ||
this.paused = false; | ||
@@ -46,0 +48,0 @@ this.next(); |
{ | ||
"name": "@caseywebb/growhaus-agent", | ||
"version": "0.0.0-latest.20190729T210722Z.d2c59fa", | ||
"version": "0.0.0-latest.20190729T211244Z.4763447", | ||
"author": "Casey Webb (https://caseyWebb.xyz)", | ||
@@ -20,2 +20,3 @@ "bin": { | ||
"dependencies": { | ||
"@caseywebb/growhaus": "^0.0.0-47634472e81be92b9713b665bfa04d812481d483.20190729T211244Z.4763447", | ||
"autobind-decorator": "^2.4.0", | ||
@@ -22,0 +23,0 @@ "dotenv": "^8.0.0", |
Sorry, the diff of this file is not supported yet
10003
233
6
16