mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-27 17:28:02 +01:00
integrate max power for fermenter hysteresis from test plugin into cbpi4
This commit is contained in:
parent
60afd70dfe
commit
10d76bc398
3 changed files with 12 additions and 8 deletions
|
@ -1,3 +1,3 @@
|
|||
__version__ = "4.3.2.a3"
|
||||
__version__ = "4.3.2.a4"
|
||||
__codename__ = "Winter Storm"
|
||||
|
||||
|
|
|
@ -156,14 +156,14 @@ class StepController:
|
|||
logging.info("BREWING COMPLETE")
|
||||
|
||||
async def previous(self):
|
||||
logging.info("Trigger Next")
|
||||
logging.info("Trigger Previous")
|
||||
|
||||
|
||||
async def next(self):
|
||||
logging.info("Trigger Next")
|
||||
print("\n\n\n\n")
|
||||
print(self.profile)
|
||||
print("\n\n\n\n")
|
||||
#print("\n\n\n\n")
|
||||
#print(self.profile)
|
||||
#print("\n\n\n\n")
|
||||
step = self.find_by_status(StepState.ACTIVE)
|
||||
if step is not None:
|
||||
if step.instance is not None:
|
||||
|
|
|
@ -46,6 +46,8 @@ class FermenterAutostart(CBPiExtension):
|
|||
Property.Number(label="HeaterOffsetOff", configurable=True, description="Offset as decimal number when the heater is switched off. Should be smaller then 'HeaterOffsetOn'. For example a value of 1 switches off the heater if the current temperature is 1 degree below the target temperature"),
|
||||
Property.Number(label="CoolerOffsetOn", configurable=True, description="Offset as decimal number when the cooler is switched on. Should be greater then 'CoolerOffsetOff'. For example a value of 2 switches on the cooler if the current temperature is 2 degrees above the target temperature"),
|
||||
Property.Number(label="CoolerOffsetOff", configurable=True, description="Offset as decimal number when the cooler is switched off. Should be smaller then 'CoolerOffsetOn'. For example a value of 1 switches off the cooler if the current temperature is 1 degree above the target temperature"),
|
||||
Property.Number(label="HeaterMaxPower", configurable=True,description="Max Power [%] for Heater (default: 100)"),
|
||||
Property.Number(label="CoolerMaxPower", configurable=True ,description="Max Power [%] for Cooler (default: 100)"),
|
||||
Property.Select(label="AutoStart", options=["Yes","No"],description="Autostart Fermenter on cbpi start"),
|
||||
Property.Sensor(label="sensor2",description="Optional Sensor for LCDisplay(e.g. iSpindle)")])
|
||||
|
||||
|
@ -57,6 +59,8 @@ class FermenterHysteresis(CBPiFermenterLogic):
|
|||
self.heater_offset_max = float(self.props.get("HeaterOffsetOff", 0))
|
||||
self.cooler_offset_min = float(self.props.get("CoolerOffsetOn", 0))
|
||||
self.cooler_offset_max = float(self.props.get("CoolerOffsetOff", 0))
|
||||
self.heater_max_power = int(self.props.get("HeaterMaxPower", 100))
|
||||
self.cooler_max_power = int(self.props.get("CoolerMaxPower", 100))
|
||||
|
||||
self.fermenter = self.get_fermenter(self.id)
|
||||
self.heater = self.fermenter.heater
|
||||
|
@ -81,7 +85,7 @@ class FermenterHysteresis(CBPiFermenterLogic):
|
|||
|
||||
if sensor_value + self.heater_offset_min <= target_temp:
|
||||
if self.heater and (heater_state == False):
|
||||
await self.actor_on(self.heater)
|
||||
await self.actor_on(self.heater, self.heater_max_power)
|
||||
|
||||
if sensor_value + self.heater_offset_max >= target_temp:
|
||||
if self.heater and (heater_state == True):
|
||||
|
@ -89,7 +93,7 @@ class FermenterHysteresis(CBPiFermenterLogic):
|
|||
|
||||
if sensor_value >= self.cooler_offset_min + target_temp:
|
||||
if self.cooler and (cooler_state == False):
|
||||
await self.actor_on(self.cooler)
|
||||
await self.actor_on(self.cooler, self.cooler_max_power)
|
||||
|
||||
if sensor_value <= self.cooler_offset_max + target_temp:
|
||||
if self.cooler and (cooler_state == True):
|
||||
|
|
Loading…
Reference in a new issue