Changed so that the fanstate is reloaded when application starts

This commit is contained in:
2017-06-03 18:58:55 +02:00
parent 4ca6b8b238
commit 7558afc444

8
server.js Executable file → Normal file
View File

@@ -66,5 +66,11 @@ var server = app.listen(3000, function () {
var host = server.address().address
var port = server.address().port
console.log("Example app listening at http://%s:%s", host, port)
console.log("Example app listening at http://%s:%s", host, port);
console.log('Setting fan to previous state');
var options = {
pythonOptions: ['-u'],
args: 'reload'
};
PythonShell.run('scripts/fanController.py', options);
})