<html><head/><body><html><head>
  
  <meta name="viewport" content="width=device-width" /><meta http-equiv="Content-Type" content="text/vnd.ui.secure+html;charset=utf-8" /></head><body class=""><div class="mail_android_message" style="line-height: 1; padding: 0.5em">Hi Andreas,<br>
<br>
super Hinweis! Das Script läuft schon mal ohne Störung!<br>
"Wer richtig lesen kann..."<br>
<br>
Beste Dank erstmal - Torsten <br>
-- <br>
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.</div><div class="mail_android_quote" style="line-height: 1; padding: 0.3em">Am 07.10.16, 20:42, Andreas Goetz <cpuidle@gmail.com> schrieb:<blockquote class="gmail_quote" style="margin: 0.8ex 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  
    In der execute Zeile fehlt ein ).
    <div class="">
      <br class="" />
    </div>
    <div class="">
      Ganz einfach zu finden wenn man mal auskommentiert bis man den Fehler eingegrenzt hat…
    </div>
    <div class="">
      <br class="" />
      <div>
        <blockquote class="">
          <div class="">
            On 7 Oct 2016, at 20:35, Torsten <<a class="" href="mailto:t.wisgalla@gmx.de" target="_blank">t.wisgalla@gmx.de</a>> wrote:
          </div>
          <br class="Apple-interchange-newline" />
          <div class="">
            <b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">#!/usr/bin/python</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">mysqlHost = '127.0.0.1'</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">mysqlPort = '3306'</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">mysqlLogin = 'root'</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">mysqlPass = 'raspberry'</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">mysqlDatabase = "volkszaehler"</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">import RPi.GPIO as GPIO</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">import sys</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">import time</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">import os</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">import re</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">import MySQLdb</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">GPIO.setmode(GPIO.BOARD)</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">GPIO.setup(29, GPIO.IN)</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">while True:</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">      input = GPIO.input(29)</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">      print("PUMP-STATUS:  " + str(input))</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">      db = MySQLdb.connect(host=mysqlHost, port=int(mysqlPort), user=mysqlLogin, passwd=mysqlPass)</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">      cursor = db.cursor()</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">      cursor.execute("INSERT INTO data(channel_id(34)) (timestamp, value) VALUES (%s,%s);", (Timestamp, str(input))</i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class=""><br class="" />
            </i></b><b class="" style="font-family: Helvetica;font-size: 14.0px;font-style: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><i class="">      time.sleep(30.0)</i></b>
          </div>
        </blockquote>
      </div>
      <br class="" />
    </div>
  
</blockquote></div></body></html></body></html>