Exemplo n.º 1
0
    async def start(self):
        
        if self.find_by_status(StepState.ACTIVE) is not None:
            logging.error("Steps already running")
            return
        
        step = self.find_by_status(StepState.STOP)
        if step is not None:
            logging.info("Resume step")
            self.cbpi.push_update(topic="cbpi/notification", data=dict(type="info", title="Resume", message="Calling resume step"))
            await self.start_step(step)
            await self.save()
            return 

        step = self.find_by_status(StepState.INITIAL)
        if step is not None:
            logging.info("Start Step")
            self.cbpi.push_update(topic="cbpi/notification", data=dict(type="info", title="Start", message="Calling start step"))
            self.push_udpate(complete=True)
            await self.start_step(step)
            await self.save()
            return 
        self.cbpi.notify("Brewing Complete", "Now the yeast will take over",action=[NotificationAction("OK")])
        self.cbpi.push_update(topic="cbpi/notification", data=dict(type="info", title="Brewing completed", message="Now the yeast will take over"))
        logging.info("BREWING COMPLETE")
Exemplo n.º 2
0
 async def on_timer_done(self, timer):
     self.summary = "MashIn Temp reached. Please add Malt Pipe."
     await self.push_update()
     if self.AutoMode == True:
         await self.setAutoMode(False)
     self.cbpi.notify(
         self.name,
         self.props.get(
             "Notification",
             "Target Temp reached. Please klick next to move on."),
         action=[NotificationAction("Next Step", self.NextStep)])
Exemplo n.º 3
0
    async def on_timer_done(self, timer):
        self.summary = self.props.get("Notification", "")

        if self.AutoNext == True:
            self.cbpi.notify(self.name, self.props.get("Notification", ""),
                             NotificationType.INFO)
            await self.next()
        else:
            self.cbpi.notify(
                self.name,
                self.props.get("Notification", ""),
                NotificationType.INFO,
                action=[NotificationAction("Next Step", self.NextStep)])
            await self.push_update()
Exemplo n.º 4
0
    async def on_timer_done(self, timer):
        self.summary = self.props.get("Notification", "")

        if self.AutoNext == True:
            self.cbpi.notify(self.name, self.props.get("Notification", ""),
                             NotificationType.INFO)
            if self.shutdown != True:
                await self.next(self.fermenter.id)
                return StepResult.DONE
        else:
            self.cbpi.notify(
                self.name,
                self.props.get("Notification", ""),
                NotificationType.INFO,
                action=[NotificationAction("Next Step", self.NextStep)])
            await self.push_update()
Exemplo n.º 5
0
    async def start(self):

        if self.find_by_status(StepState.ACTIVE) is not None:
            logging.error("Steps already running")
            return

        step = self.find_by_status(StepState.STOP)
        if step is not None:
            logging.info("Resume step")
            await self.start_step(step)
            await self.save()
            return

        step = self.find_by_status(StepState.INITIAL)
        if step is not None:
            logging.info("Start Step")
            await self.start_step(step)
            await self.save()
            return
        self.cbpi.notify("Brewing Complete",
                         "Now the yeast will take over",
                         action=[NotificationAction("OK")])
        logging.info("BREWING COMPLETE")
Exemplo n.º 6
0
 async def on_timer_done(self,timer):
     self.summary = "MashIn Temp reached. Please add Malt Pipe."
     await self.push_update()
     if self.AutoMode == True:
         await self.setAutoMode(False)
     self.cbpi.notify(self.name, 'MashIn Temp reached. Please add malt pipe and malt. Move to next step', action=[NotificationAction("Next Step", self.NextStep)])