diff --git a/cbpi/__init__.py b/cbpi/__init__.py index 942c934..0f430d9 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1 +1 @@ -__version__ = "4.0.2.0.a3" +__version__ = "4.0.2.0.a4" diff --git a/cbpi/controller/fermentation_controller.py b/cbpi/controller/fermentation_controller.py index d1ec5a2..3744ea7 100644 --- a/cbpi/controller/fermentation_controller.py +++ b/cbpi/controller/fermentation_controller.py @@ -156,6 +156,8 @@ class FermentationController: name = item.get("name") props = Props(item.get("props")) status = StepState(item.get("status", "I")) + if status == StepState.ACTIVE: + status = StepState("S") type = item.get("type") try: diff --git a/cbpi/controller/step_controller.py b/cbpi/controller/step_controller.py index 434e799..c4c2fe8 100644 --- a/cbpi/controller/step_controller.py +++ b/cbpi/controller/step_controller.py @@ -198,8 +198,8 @@ class StepController: def get_types(self): result = {} for key, value in self.types.items(): - if "ferment" not in str(value.get("class")).lower(): - result[key] = dict(name=value.get("name"), properties=value.get("properties"), actions=value.get("actions")) + #if "ferment" not in str(value.get("class")).lower(): + result[key] = dict(name=value.get("name"), properties=value.get("properties"), actions=value.get("actions")) return result def get_state(self): diff --git a/cbpi/extension/FermenterHysteresis/__init__.py b/cbpi/extension/FermenterHysteresis/__init__.py index 4ed1561..5be707c 100644 --- a/cbpi/extension/FermenterHysteresis/__init__.py +++ b/cbpi/extension/FermenterHysteresis/__init__.py @@ -32,7 +32,7 @@ class FermenterAutostart(CBPiExtension): self.fermenter=self.cbpi.fermenter._find_by_id(fermenter_id) try: if (self.fermenter.instance is None or self.fermenter.instance.state == False): - await self.cbpi.fermenter.toggle(self.fermenter.id) + await self.cbpi.fermenter.start(self.fermenter.id) logging.info("Successfully switched on Ferenterlogic for Fermenter {}".format(self.fermenter.id)) except Exception as e: logging.error("Failed to switch on FermenterLogic {} {}".format(self.fermenter.id, e)) diff --git a/cbpi/extension/gpioactor/__init__.py b/cbpi/extension/gpioactor/__init__.py index 1687482..ebed2ff 100644 --- a/cbpi/extension/gpioactor/__init__.py +++ b/cbpi/extension/gpioactor/__init__.py @@ -10,7 +10,7 @@ logger = logging.getLogger(__name__) try: import RPi.GPIO as GPIO except Exception: - logger.error("Failed to load RPi.GPIO. Using Mock") + logger.warning("Failed to load RPi.GPIO. Using Mock") MockRPi = MagicMock() modules = { "RPi": MockRPi,