diff --git a/alfalfa_bacnet_bridge/alfalfa_bacnet_bridge.py b/alfalfa_bacnet_bridge/alfalfa_bacnet_bridge.py index dd03742..1d095b0 100644 --- a/alfalfa_bacnet_bridge/alfalfa_bacnet_bridge.py +++ b/alfalfa_bacnet_bridge/alfalfa_bacnet_bridge.py @@ -105,10 +105,10 @@ def setup_points(self): for input in inputs: if input in outputs: self.points[input] = LocalAnalogValueObject(objectName=input, objectIdentifier=("analogValue", index), sim_value=outputs[input]) - logger.debug(f"Creating BIDIRECTIONAL point: '{input}'") + logger.info(f"Creating BIDIRECTIONAL point: '{input}'") else: self.points[input] = AnalogValueCmdObject(objectName=input, objectIdentifier=("analogValue", index)) - logger.debug(f"Creating INPUT point: '{input}'") + logger.info(f"Creating INPUT point: '{input}'") self.points[input]._had_value = False index += 1 @@ -116,7 +116,7 @@ def setup_points(self): if output in self.points: continue self.points[output] = AnalogInputObject(objectName=output, objectIdentifier=("analogInput", index), presentValue=outputs[output]) - logger.debug(f"Creating OUTPUT point: '{output}'") + logger.info(f"Creating OUTPUT point: '{output}'") index += 1 for point in self.points.values(): @@ -134,7 +134,7 @@ def main_loop(): sim_time = self.client.get_sim_time(self.site_id) except Exception as e: - logger.debug(e) + logger.error(e) return self.device._date_time = sim_time @@ -152,7 +152,7 @@ def main_loop(): set_inputs[point] = current_value object._had_value = True else: - logger.debug(f"Got non-finite value {current_value} for point {point}") + logger.warn(f"Got non-finite value {current_value} for point {point}") elif object._had_value: set_inputs[point] = None object._had_value = False @@ -160,7 +160,7 @@ def main_loop(): try: self.client.set_inputs(self.site_id, set_inputs) except Exception as e: - logger.debug(e) + logger.error(e) deferred(main_loop) diff --git a/alfalfa_bacnet_bridge/alfalfa_watchdog.py b/alfalfa_bacnet_bridge/alfalfa_watchdog.py index 65b6ca2..17943ac 100644 --- a/alfalfa_bacnet_bridge/alfalfa_watchdog.py +++ b/alfalfa_bacnet_bridge/alfalfa_watchdog.py @@ -79,7 +79,7 @@ async def main_loop(host: str, alfalfa_site: str, command: str): logger.info(f"No site found with identifier: '{alfalfa_site}'") except Exception as e: - print(e) + logger.error(e) await asyncio.sleep(5)