From: Ralf Jung Date: Thu, 24 Oct 2013 17:41:16 +0000 (+0200) Subject: Better logging X-Git-Url: https://git.ralfj.de/saartuer.git/commitdiff_plain/eb3e24210b024a3393e629f133bef7c66eddceae?hp=f1430a05b39770f59427e33ba17e51a77bc59427 Better logging --- 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)