Add cron module for functions scheduling. Add checkboxes to Auto On mode. Use io.sockets.emit in updateSystemState function.