26 lines
706 B
JavaScript
Raw Normal View History

2020-09-14 18:42:09 +01:00
const http = require('http')
const globalVars = require('../libs/globalVars')
const led = require('../libs/led')
const common = require('../libs/common')
const modules = require('../modules/hotwater')
const screen = require('../libs/lcd')
module.exports = {
home: () => {
clearInterval(globalVars.waterPolling);
screen.clearScreen()
screen.heading('Main Menu')
},
hotWater: () => {
globalVars.waterPolling = 30000
screen.clearScreen()
screen.heading('Hot Water')
setInterval(screen.time, 55000)
modules.getStatus()
globalVars.waterPolling = setInterval(() => {
modules.getStatus()
}, 30000);
}
}