From eb3e24210b024a3393e629f133bef7c66eddceae Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 24 Oct 2013 19:41:16 +0200 Subject: [PATCH] Better logging --- statemachine.py | 3 ++- tuerd | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/statemachine.py b/statemachine.py index d8b7c53..c73bea0 100644 --- a/statemachine.py +++ b/statemachine.py @@ -136,10 +136,11 @@ class StateMachine(): def handle_pins_event(self): pins = self.pins() if not (pins.door_locked is None or pins.door_closed is None or pins.space_active is None or pins.bell_ringing is None): - logger.info("All sensors got a value, switching to a proper state") if pins.door_locked: + logger.info("All sensors got a value, switching to a proper state: Space is closed") return StateMachine.StateZu(self.state_machine) else: + logger.info("All sensors got a value, switching to a proper state: Space is (about to) open") return StateMachine.StateAboutToOpen(self.state_machine) return super().handle_pins_event() diff --git a/tuerd b/tuerd index 1bee788..ec51c94 100755 --- a/tuerd +++ b/tuerd @@ -14,6 +14,9 @@ if args.debug: import libtuer libtuer.mailAddress = [] +# Not let's go! +logger.info("Starting up...") + # initialize GPIO stuff GPIO.setmode(GPIO.BOARD) -- 2.30.2