+pir = 4
+previous_state = 0
+current_state = 0
+
+try:
+ while True:
+ time.sleep(0.1)
+ current_state = GPIO.input(pir)
+ if current_state == 1 and previous_state == 0:
+ print("GPIO pin %s is %s, turning screen on" % (pir, current_state))
+ call("echo on 0 | cec-client -s -d 1", shell=True)
+ previous_state = 1
+ elif current_state == 0 and previous_state == 1:
+ print("GPIO pin %s is %s, turning screen off" % (pir, current_state))
+ call("echo standby 0 | cec-client -s -d 1", shell=True)
+ previous_state = 0
+ time.sleep(0.01)
+
+except KeyboardInterrupt:
+ pass
+finally:
+ GPIO.cleanup()
+</pre>
+
+
+== Ausrollen von Änderungen aus dem git ==
+
+* Login auf ingodisplay.s0: <code>ssh stratum0@ingodisplay.s0</code>
+* Auf Nutzer infodisplay wechseln: <code>sudo -iu infodisplay</code>
+* Ins Arbeitsverzeichnis wechseln: <code>cd /opt/infodisplay/python-infodisplay</code>
+* Aktualisierungen abrufen: <code>git pull</code>
+* Zurück zum Nutzer stratum0 wechseln: <code>exit</code>
+* Dienst neustarten: <code>sudo systemctl restart infodisplay.service</code>