def set_monitor(self, monitor):
if type(monitor) != bool:<EOL><INDENT>raise InvalidInput("<STR_LIT>")<EOL><DEDENT>self._roast['<STR_LIT>'] = bool2int(monitor)<EOL>self._q.put(self._config)<EOL>if self._roast['<STR_LIT>']:<EOL><INDENT>self._roast_start = now_time(str=True)<EOL>self._roast['<STR_LIT>'] = self._roast_start<EOL><DEDENT>else:<EOL><INDENT>self._roast_end = now_time(str=True)<EOL>self._roast['<STR_LIT>'] = self._roast_end<EOL>self._roast['<STR_LIT:date>'] = now_date(str=True)<EOL>et = load_time(self._roast['<STR_LIT>'])<EOL>st = load_time(self._roast['<STR_LIT>'])<EOL>self._roast['<STR_LIT>'] = timedelta2period(et - st)<EOL><DEDENT>return self.get_roast_properties()<EOL>
Set the monitor config.

        This module assumes that users will connect to the roaster and get
        reading information _before_ they want to begin collecting roast
        details. This method is critical to enabling the collection of roast
        information and ensuring it gets saved in memory.

        :param monitor: Value to set the monitor
        :type monitor: bool
        :returns: None
        :raises: InvalidInput