{"id":230,"date":"2019-02-15T16:38:56","date_gmt":"2019-02-15T15:38:56","guid":{"rendered":"http:\/\/bmetallica.de\/?page_id=230"},"modified":"2020-08-01T11:01:11","modified_gmt":"2020-08-01T09:01:11","slug":"dba-logger-mit-dem-raspberry-pi","status":"publish","type":"page","link":"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/","title":{"rendered":"db(A) logger mit dem Raspberry PI"},"content":{"rendered":"<h1 style=\"text-align: center;\">db(A) logger mit dem Raspberry PI<\/h1>\n<p style=\"text-align: center;\"><span style=\"text-decoration: underline;\"><em>F\u00fcr unser allj\u00e4hrliches Festival ( <a href=\"http:\/\/www.rockfreunde.de\/\" target=\"_blank\" rel=\"noopener noreferrer\">ROCKFREUNDE.DE<\/a> ) <\/em><\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"text-decoration: underline;\"><em>wollte ich interessehalber mal eine Auswertung des Ger\u00e4uschpegels auf unserem Festivalgel\u00e4nde machen.<\/em><\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"text-decoration: underline;\"><em>Daraus entstand dann folgendes Projekt.<\/em><\/span><\/p>\n<h5 style=\"text-align: center;\">Ziel ist das speichern und auswerten von Lautst\u00e4rkewerten \u00fcber einen l\u00e4ngeren Zeitraum<\/h5>\n<p>&nbsp;<\/p>\n<h2><span style=\"text-decoration: underline;\">Was wir ben\u00f6tigen:<\/span><\/h2>\n<table border=\"3\">\n<tbody>\n<tr>\n<th><a href=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"199\" data-permalink=\"https:\/\/www.bmetallica.de\/index.php\/1-wire-temperatursensor-auslesen\/front_of_raspberry_pi\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi.jpg?fit=1874%2C1399&amp;ssl=1\" data-orig-size=\"1874,1399\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"front_of_raspberry_pi\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi.jpg?fit=300%2C224&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi.jpg?fit=676%2C504&amp;ssl=1\" class=\"aligncenter wp-image-199 size-thumbnail\" src=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi-150x150.jpg?resize=150%2C150\" alt=\"front_of_raspberry_pi\" width=\"150\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi.jpg?resize=640%2C640&amp;ssl=1 640w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi.jpg?zoom=2&amp;resize=150%2C150 300w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi.jpg?zoom=3&amp;resize=150%2C150 450w\" sizes=\"(max-width: 150px) 100vw, 150px\" data-recalc-dims=\"1\" \/><\/a><\/th>\n<th>Raspberry PI V3, Netzteil und SD-Karte (min 16GB)<\/p>\n<p>(Amazon: <a href=\"https:\/\/www.amazon.de\/gp\/product\/B01CD5VC92\/ref=oh_aui_detailpage_o01_s00?ie=UTF8&amp;psc=1\" target=\"_blank\" rel=\"noopener noreferrer\">LINK<\/a>)<\/th>\n<\/tr>\n<tr>\n<th><a href=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2017\/02\/51xAKfckmGL.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"231\" data-permalink=\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/51xakfckmgl\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/51xAKfckmGL.jpg?fit=500%2C392&amp;ssl=1\" data-orig-size=\"500,392\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"51xAKfckmGL\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/51xAKfckmGL.jpg?fit=300%2C235&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/51xAKfckmGL.jpg?fit=500%2C392&amp;ssl=1\" class=\"aligncenter size-thumbnail wp-image-231\" src=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2017\/02\/51xAKfckmGL-150x150.jpg?resize=150%2C150\" alt=\"51xAKfckmGL\" width=\"150\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/51xAKfckmGL.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/51xAKfckmGL.jpg?zoom=2&amp;resize=150%2C150 300w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/51xAKfckmGL.jpg?zoom=3&amp;resize=150%2C150 450w\" sizes=\"(max-width: 150px) 100vw, 150px\" data-recalc-dims=\"1\" \/><\/a><\/th>\n<th>Arduino Nano V3.0 ATmega328P-AU MCU<\/p>\n<p>(Amazon: <a href=\"https:\/\/www.amazon.de\/gp\/product\/B01MTQYJ3Y\/ref=oh_aui_detailpage_o02_s01?ie=UTF8&amp;psc=1\" target=\"_blank\" rel=\"noopener noreferrer\">LINK<\/a>)<\/th>\n<\/tr>\n<tr>\n<th><a href=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2017\/02\/31ZbrO5wm7L.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"232\" data-permalink=\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/31zbro5wm7l\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/31ZbrO5wm7L.jpg?fit=394%2C500&amp;ssl=1\" data-orig-size=\"394,500\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"31ZbrO5wm7L\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/31ZbrO5wm7L.jpg?fit=236%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/31ZbrO5wm7L.jpg?fit=394%2C500&amp;ssl=1\" class=\"aligncenter wp-image-232\" src=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2017\/02\/31ZbrO5wm7L-236x300.jpg?resize=118%2C150\" alt=\"31ZbrO5wm7L\" width=\"118\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/31ZbrO5wm7L.jpg?resize=236%2C300&amp;ssl=1 236w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/31ZbrO5wm7L.jpg?w=394&amp;ssl=1 394w\" sizes=\"(max-width: 118px) 100vw, 118px\" data-recalc-dims=\"1\" \/><\/a><\/th>\n<th>InLine Modular Kupplung, RJ12 Buchse \/ Buchse<\/p>\n<p>(Amazon: <a href=\"https:\/\/www.amazon.de\/gp\/product\/B00342M2H0\/ref=oh_aui_detailpage_o02_s00?ie=UTF8&amp;psc=1\" target=\"_blank\" rel=\"noopener noreferrer\">LINK<\/a>)<\/th>\n<\/tr>\n<tr>\n<th><a href=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2017\/02\/mml0.gif\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"233\" data-permalink=\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/mml0\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/mml0.gif?fit=200%2C131&amp;ssl=1\" data-orig-size=\"200,131\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"mml0\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/mml0.gif?fit=200%2C131&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/mml0.gif?fit=200%2C131&amp;ssl=1\" class=\"aligncenter wp-image-233 size-full\" src=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2017\/02\/mml0.gif?resize=200%2C131\" alt=\"mml0\" width=\"200\" height=\"131\" data-recalc-dims=\"1\" \/><\/a><\/th>\n<th>Messmodul L\u00e4rm<\/p>\n<p>(<a href=\"http:\/\/www.ak-modul-bus.de\/cgi-bin\/iboshop.cgi?showd200!0,0,MML\" target=\"_blank\" rel=\"noopener noreferrer\">LINK<\/a>)<\/th>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"text-decoration: underline;\">Lautst\u00e4rke berechnen:<\/span><\/h2>\n<p>Beim aufbau des Moduls zur Berechnung der Lautst\u00e4rke werte halten wir uns weitgehend an diese Anleitung (<a href=\"http:\/\/www.wikilaerm.de\/Preiswerter%20Ersatz%20fuer%20den%20Modulbus-Miniversion.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">LINK<\/a>).<\/p>\n<ol>\n<li>Als erstes brechen wir die RJ12 Kupplung in der Mitte durch (das geht relativ einfach)<\/li>\n<li>Die Kable schwarz, blau und wei\u00df schneiden wir kurz<\/li>\n<li>Nun werden die \u00fcbrigen kabel mit dem Arduino verl\u00f6tet:\n<ol>\n<li>rot -&gt; A0<\/li>\n<li>gelb -&gt; +5V<\/li>\n<li>gr\u00fcn -&gt; Gnd<\/li>\n<\/ol>\n<\/li>\n<li>Die Buchse und den Arduino mit Tape zusammenkleben (um das l\u00f6sen der verl\u00f6teten Kabel zu vermeiden)<\/li>\n<li>Die ben\u00f6tigte Software auf den Arduino spielen (wie das geht wird in der Anleitung oben beschrieben)\n<ul>\n<li>die in der Anleitung Beschriebene Software f\u00fcr den Arduino muss f\u00fcr unsere Zwecke leicht angepasst werden. Hier ein die angepasste Software (<a href=\"http:\/\/bmetallica.de\/dBArduino_Redesign_7Seg_V5.0_RPI.txt\" target=\"_blank\" rel=\"noopener noreferrer\">LINK<\/a>)<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Danach sollte der Arduino \u00fcber den seriellen Port (Baudrate 9600) die aktuelle Lautst\u00e4rke (dbA) ausgeben.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"text-decoration: underline;\">Raspberry vorbereiten:<\/span><\/h2>\n<p>In meinem Bespiel habe ich das Raspberry PI Raspian Jessie benutzt.<\/p>\n<ol>\n<li>Die ben\u00f6tigte Software installieren &#8222;apt-get install apache2 php5\u00a0mysql-server mysql-client php5-mysql&#8220;<\/li>\n<li>Arbeitsverzeichnis anlegen &#8222;mkdir \/home\/pi\/dba&#8220;<\/li>\n<li>Tmp Verzeichnis erstellen &#8222;mkdir \/home\/pi\/dba\/tmp&#8220;<\/li>\n<li>MYSQL:<\/li>\n<\/ol>\n<p>Nun erstellen wir eine MYSQL Datenbank in der unsere werte sp\u00e4ter gespeichert werden.<\/p>\n<p>Zuerst verbinden wir uns zu unserem DBMS (Datenbankmanagementsystem):<\/p>\n<p><strong>mysql -p<\/strong><\/p>\n<p>Dann erstellen wir eine Datenbank:<\/p>\n<p><strong>CREATE DATABASE test;<\/strong><\/p>\n<p>Nun w\u00e4hlen wir die Datenbank aus:<\/p>\n<p><strong>USE test;\u00a0<\/strong><\/p>\n<p>Jetzt wird die Tabelle erstellt:<\/p>\n<pre class=\"lang:default decode:true\" title=\"create\">CREATE TABLE `dba` (\r\n  `time` varchar(50) DEFAULT NULL,\r\n  `se` varchar(50) DEFAULT NULL,\r\n  `mi` varchar(50) DEFAULT NULL,\r\n  `h` varchar(50) DEFAULT NULL,\r\n  `j` varchar(50) DEFAULT NULL,\r\n  `m` varchar(50) DEFAULT NULL,\r\n  `t` varchar(50) DEFAULT NULL,\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `timespan` varchar(200) DEFAULT NULL,\r\n  `dba` int(11) DEFAULT NULL,\r\n  PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB AUTO_INCREMENT=2817225 DEFAULT CHARSET=latin1;<\/pre>\n<p>Zum Schluss verlassen wir die MYSQL Session:<\/p>\n<p><strong>\\q<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"text-decoration: underline;\">Scripte f\u00fcr das Logging:<\/span><\/h2>\n<p>Als erstes das Autostart Script &#8222;<strong>\/etc\/init.d\/auto.sh<\/strong>&#8220;<\/p>\n<p><em>Nachdem wir das Script erstell haben muss es Ausf\u00fchrbar gemacht werden und in den Autostart genommen werden,<\/em><\/p>\n<p><em>dies machen wir mit: &#8222;<strong>chmod 777 \/etc\/innit.d\/auto.sh<\/strong>&#8220; und &#8222;<strong>insserv \/etc\/innit.d\/auto.sh<\/strong>&#8222;<\/em><\/p>\n<pre class=\"lang:default decode:true \" title=\"auto.sh\">#! \/bin\/bash\r\n\r\ncase \"$1\" in\r\n        start)\r\n\/home\/pi\/dba\/start &amp;\r\n        # Anweisungen zum Starten hier eingeben\r\n                ;;\r\n        stop)\r\n                # Anweisungen zum Stoppen hier eingeben\r\n                ;;\r\n        restart)\r\n                $0 stop\r\n                $0 start\r\n                ;;\r\n        *)\r\n                echo \"Usage: $0 {start|stop|restart}\"\r\n                ;;\r\nesac\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Dann brauchen wir das Startscript &#8222;<strong>\/home\/pi\/dba\/start<\/strong>&#8220;<\/p>\n<p>-&gt; <strong>sudo chmod 777\u00a0\/home\/pi\/dba\/start<\/strong><\/p>\n<p><em>Das Startscript liest den Arduino in einer Schleife aus und startet die arb.php<\/em><\/p>\n<pre class=\"lang:default decode:true\" title=\"start\">stty -F \/dev\/ttyUSB0 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts\r\nsleep 2\r\ncat \/dev\/ttyUSB0 &gt;\/home\/pi\/dba\/tmp\/slog &amp;\r\nsleep 5\r\nCOUNTER=0\r\nwhile [ true ] ; do\r\nphp \/home\/pi\/dba\/arb.php\r\nlet COUNTER=COUNTER+1\r\nif [ $COUNTER -eq 5000 ]\r\nthen\r\n:&gt;\/home\/pi\/dba\/tmp\/slog\r\nCOUNTER=0\r\nfi\r\n\r\ndone\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Die arb.php &#8222;<strong>\/home\/pi\/dba\/arb.php<\/strong>&#8220;<\/p>\n<p>-&gt; <strong>sudo chmod 777\u00a0\/home\/pi\/dba\/arb.php<\/strong><\/p>\n<p><em>In der arb.php werden die ausgelesenen Daten in die MYSQL-Datenbank geschrieben.<\/em><\/p>\n<pre class=\"lang:default decode:true\" title=\"arb.php\">&lt;?php\r\n$x = \"0\" ;\r\n$x = shell_exec('tail -n1 \/home\/pi\/dba\/tmp\/slog');\r\n$x = preg_replace ( '\/[^0-9 ]\/i', '', $x );\r\n$x = str_replace(' ','',$x);\r\n$x = str_replace('\/r','',$x);\r\n\/\/echo $x;\r\nif (!$x) {\r\nexit;\r\n}\r\nif ($x == \"\") {\r\nexit;\r\n}\r\nif ($x == \" \") {\r\nexit;\r\n}\r\nif (isset($var)) {\r\nexit;\r\n}\r\nif (empty($var)) { $y = \"44\";\r\n\/\/$handle = fopen (\"\/home\/pi\/dba\/akt\", 'w');\r\n\/\/fwrite ($handle, $y);\r\n\/\/fclose ($handle);\r\n$timestamp = time();\r\n\/\/$w1=shell_exec('date +\"%m.%d.%Y %H:%M:%S\"');\r\n$t=$datum = date(\"d\", $timestamp);\r\n$m=$datum = date(\"m\", $timestamp);\r\n$j=$datum = date(\"Y\", $timestamp);\r\n$h=$datum = date(\"H\", $timestamp);\r\n$mi=$datum = date(\"i\", $timestamp);\r\n$se=$datum = date(\"s\", $timestamp);\r\n$w1=$t.\".\".$m.\".\".$j;\r\n$w2=$h.\":\".$mi.\":\".$se;\r\n\r\n\/\/echo $w1;\r\n\r\n\r\n$servername = \"localhost\";\r\n$username = \"root\";\r\n$password = \"EUER PASSWORT\";\r\n$dbname = \"test\";\r\n\r\n\/\/ Create connection\r\n$conn = new mysqli($servername, $username, $password, $dbname);\r\n\/\/ Check connection\r\nif ($conn-&gt;connect_error) {\r\n    die(\"Connection failed: \" . $conn-&gt;connect_error);\r\n}\r\n\r\n$sql = \"INSERT INTO dba (timespan, dba, t, m, j, h, mi, se, time )\r\nVALUES ('$w1', '$x', '$t', '$m', '$j', '$h', '$mi', '$se', '$w2')\";\r\n\r\nif ($conn-&gt;query($sql) === TRUE) {\r\n   \/\/ echo \"New record created successfully\";\r\n} else {\r\n   \/\/ echo \"Error: \" . $sql . \"&lt;br&gt;\" . $conn-&gt;error;\r\n}\r\n\r\n$conn-&gt;close();\r\n\r\n\r\n}\r\n?&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"text-decoration: underline;\">Webseite zum auswerten:<\/span><\/h2>\n<p>Die index.php &#8222;<strong>\/var\/www\/html\/index.php<\/strong>&#8220;<\/p>\n<p><em>hier wird die Auswahl des zu zeigenden tags getroffen\u00a0<\/em><\/p>\n<pre class=\"lang:default decode:true \" title=\"index\">&lt;table border=3&gt;&lt;tr&gt;&lt;th&gt;Jahr&lt;\/th&gt;&lt;th&gt;Monat&lt;\/th&gt;&lt;th&gt;Tag (minutengenau)&lt;\/th&gt;&lt;\/tr&gt;\r\n&lt;form method=\"post\" action=\"&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;\"&gt;\r\n&lt;th&gt;\r\n&lt;select name=\"ccdx1\"&gt;\r\n&lt;option value=\"2011\"&gt;2011&lt;\/option&gt;\r\n&lt;option &lt;?php if($y == \"2012\"){ echo \"selected='selected'\" ;} ?&gt;value=\"2012\"&gt;2012&lt;\/option&gt;\r\n&lt;option &lt;?php if($y == \"2013\"){ echo \"selected='selected'\" ;} ?&gt;value=\"2013\"&gt;2013&lt;\/option&gt;\r\n&lt;option &lt;?php if($y == \"2014\"){ echo \"selected='selected'\" ;} ?&gt;value=\"2014\"&gt;2014&lt;\/option&gt;\r\n&lt;option &lt;?php if($y == \"2015\"){ echo \"selected='selected'\" ;} ?&gt;value=\"2015\"&gt;2015&lt;\/option&gt;\r\n&lt;option &lt;?php if($y == \"2016\"){ echo \"selected='selected'\" ;} ?&gt;value=\"2016\"&gt;2016&lt;\/option&gt;\r\n&lt;option &lt;?php if($y == \"2017\"){ echo \"selected='selected'\" ;} ?&gt;value=\"2017\"&gt;2017&lt;\/option&gt;\r\n&lt;option &lt;?php if($y == \"2018\"){ echo \"selected='selected'\" ;} ?&gt;value=\"2018\"&gt;2018&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;\/th&gt;\r\n&lt;th&gt;\r\n&lt;select name=\"ccdx2\"&gt;\r\n&lt;option &lt;?php if($m == \"01\"){ echo \"selected='selected'\" ;} ?&gt;value=\"01\"&gt;Januar&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"02\"){ echo \"selected='selected'\" ;} ?&gt;value=\"02\"&gt;Februar&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"03\"){ echo \"selected='selected'\" ;} ?&gt;value=\"03\"&gt;M&amp;auml;rz&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"04\"){ echo \"selected='selected'\" ;} ?&gt;value=\"04\"&gt;April&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"05\"){ echo \"selected='selected'\" ;} ?&gt;value=\"05\"&gt;Mai&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"06\"){ echo \"selected='selected'\" ;} ?&gt;value=\"06\"&gt;Juni&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"07\"){ echo \"selected='selected'\" ;} ?&gt;value=\"07\"&gt;Juli&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"08\"){ echo \"selected='selected'\" ;} ?&gt;value=\"08\"&gt;August&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"09\"){ echo \"selected='selected'\" ;} ?&gt;value=\"09\"&gt;September&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"10\"){ echo \"selected='selected'\" ;} ?&gt;value=\"10\"&gt;Oktober&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"11\"){ echo \"selected='selected'\" ;} ?&gt;value=\"11\"&gt;November&lt;\/option&gt;\r\n&lt;option &lt;?php if($m == \"12\"){ echo \"selected='selected'\" ;} ?&gt;value=\"12\"&gt;Dezember&lt;\/option&gt;&lt;\/select&gt;:\r\n&lt;\/th&gt;\r\n&lt;th&gt;\r\n&lt;select name=\"ccdx3\"&gt;\r\n&lt;option &lt;?php if($d == \"01\"){ echo \"selected='selected'\" ;} ?&gt;value=\"01\"&gt;1&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"02\"){ echo \"selected='selected'\" ;} ?&gt;value=\"02\"&gt;2&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"03\"){ echo \"selected='selected'\" ;} ?&gt;value=\"03\"&gt;3&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"04\"){ echo \"selected='selected'\" ;} ?&gt;value=\"04\"&gt;4&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"05\"){ echo \"selected='selected'\" ;} ?&gt;value=\"05\"&gt;5&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"06\"){ echo \"selected='selected'\" ;} ?&gt;value=\"06\"&gt;6&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"07\"){ echo \"selected='selected'\" ;} ?&gt;value=\"07\"&gt;7&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"08\"){ echo \"selected='selected'\" ;} ?&gt;value=\"08\"&gt;8&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"09\"){ echo \"selected='selected'\" ;} ?&gt;value=\"09\"&gt;9&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"10\"){ echo \"selected='selected'\" ;} ?&gt;value=\"10\"&gt;10&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"11\"){ echo \"selected='selected'\" ;} ?&gt;value=\"11\"&gt;11&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"12\"){ echo \"selected='selected'\" ;} ?&gt;value=\"12\"&gt;12&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"13\"){ echo \"selected='selected'\" ;} ?&gt;value=\"13\"&gt;13&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"14\"){ echo \"selected='selected'\" ;} ?&gt;value=\"14\"&gt;14&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"15\"){ echo \"selected='selected'\" ;} ?&gt;value=\"15\"&gt;15&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"16\"){ echo \"selected='selected'\" ;} ?&gt;value=\"16\"&gt;16&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"17\"){ echo \"selected='selected'\" ;} ?&gt;value=\"17\"&gt;17&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"18\"){ echo \"selected='selected'\" ;} ?&gt;value=\"18\"&gt;18&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"19\"){ echo \"selected='selected'\" ;} ?&gt;value=\"19\"&gt;19&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"20\"){ echo \"selected='selected'\" ;} ?&gt;value=\"20\"&gt;20&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"21\"){ echo \"selected='selected'\" ;} ?&gt;value=\"21\"&gt;21&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"22\"){ echo \"selected='selected'\" ;} ?&gt;value=\"22\"&gt;22&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"23\"){ echo \"selected='selected'\" ;} ?&gt;value=\"23\"&gt;23&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"24\"){ echo \"selected='selected'\" ;} ?&gt;value=\"24\"&gt;24&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"25\"){ echo \"selected='selected'\" ;} ?&gt;value=\"25\"&gt;25&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"26\"){ echo \"selected='selected'\" ;} ?&gt;value=\"26\"&gt;26&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"27\"){ echo \"selected='selected'\" ;} ?&gt;value=\"27\"&gt;27&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"28\"){ echo \"selected='selected'\" ;} ?&gt;value=\"28\"&gt;28&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"29\"){ echo \"selected='selected'\" ;} ?&gt;value=\"29\"&gt;29&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"30\"){ echo \"selected='selected'\" ;} ?&gt;value=\"30\"&gt;30&lt;\/option&gt;\r\n&lt;option &lt;?php if($d == \"31\"){ echo \"selected='selected'\" ;} ?&gt;value=\"31\"&gt;31&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;\/th&gt;\r\n&lt;\/th&gt;\r\n &lt;\/table&gt;\r\n&lt;input type='submit' name='submitcc' value='Grafik erzeugen' align='right'&gt;\r\n&lt;\/form&gt;\r\n&lt;br&gt;&lt;br&gt;&lt;br&gt;\r\n\r\n\r\n\r\n&lt;?php\r\n if ($_POST['submitcc']) {\r\n\r\n     $cd1 = $_POST['ccdx1'];\r\n     $cd2 = $_POST['ccdx2'];\r\n     $cd3 = $_POST['ccdx3'];\r\n$dq=shell_exec('echo '.$cd1.' &gt; wdx\/j');\r\n$dw=shell_exec('echo '.$cd2.' &gt; wdx\/m');\r\n$de=shell_exec('echo '.$cd3.' &gt; wdx\/t');\r\necho \"&lt;a href=wdx\/index.php?j=$c1&amp;m=$c2&amp;d=$c3&amp;h=$c4 target=neu&gt;&lt;font size =5&gt;&lt;b&gt;Grafik anzeigen Tag&lt;\/b&gt;&lt;\/font&gt;&lt;\/a&gt;\";\r\n    }\r\n\r\n    ?&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>Um die Werte in einem Graph darzustellen erstellen wir zuerst einen Ordner und machen diesen beschreibbar:<\/p>\n<p><strong>sudo mkdir \/var\/www\/html\/wdx\u00a0<\/strong><\/p>\n<p><strong>sudo chmod -R 777 \/var\/www\/html\/wdx<\/strong><\/p>\n<p>Au\u00dferdem ben\u00f6tigen wir einige Javascripts, diese findet ihr hier (<a href=\"http:\/\/bmetallica.de\/dba\/js.tar\" target=\"_blank\" rel=\"noopener noreferrer\">LINK<\/a>)<\/p>\n<p><em>Einfach mit <strong>tar xvf js.tar<\/strong> entpacken und unter<strong> \/var\/www\/html\/wdx\/js<\/strong> speichern.<\/em><\/p>\n<p>Zudem brauchen wir noch das <a href=\"http:\/\/92.205.129.62\/bmetallica\/jquery.js\" target=\"_blank\" rel=\"noopener noreferrer\">jquerry-Script\u00a0<\/a>\u00a0welches nach\u00a0<strong>\/var\/www\/html\/wdx\/ <\/strong>muss.<\/p>\n<p>&nbsp;<\/p>\n<p>Zum auslesen und aufbereiten der Daten aus der MYSQL-Datenbank brauchen wir die data.php &#8222;<strong>\/var\/www\/html\/wdx\/data.php<\/strong>&#8220;<\/p>\n<pre class=\"lang:default decode:true \" title=\"data\">&lt;?php\r\n$j=shell_exec('cat j');\r\n$j=str_replace(' ','',$j);\r\n$j = preg_replace(\"#[\\r\\n]#\", '', $j);\r\n$m=shell_exec('cat m');\r\n$m=str_replace(' ','',$m);\r\n$m = preg_replace(\"#[\\r\\n]#\", '', $m);\r\n$t=shell_exec('cat t');\r\n$t=str_replace(' ','',$t);\r\n$t = preg_replace(\"#[\\r\\n]#\", '', $t);\r\n$h=shell_exec('cat h');\r\n$h=str_replace(' ','',$h);\r\n$h = preg_replace(\"#[\\r\\n]#\", '', $h);\r\n\r\n\r\n$con = mysql_connect(\"localhost\",\"root\",\"EUER PASSWORT\");\r\n\r\nif (!$con) {\r\n  die('Could not connect: ' . mysql_error());\r\n}\r\n\r\nmysql_select_db(\"test\", $con);\r\n\r\n$result = mysql_query(\"SELECT j, m, t, h, mi, se, MAX(dba),MIN(dba), ROUND(AVG(dba))  FROM dba WHERE j = '$j' AND m = '$m' AND t = '$t' group by j, m, t, h, mi;\");\r\n\r\nwhile($row = mysql_fetch_array($result)) {\r\n  $nw=$row['j'].\",\".$row['m'].\",\".$row['t'].\",\".$row['h'].\",\".$row['mi'].\",\".$row['se'].\",\". $row['MAX(dba)'].\",\". $row['MIN(dba)'].\",\".$row['ROUND(AVG(dba))'];\r\n$nw = preg_replace(\"#[\\r\\n]#\", '', $nw);  \r\n$nw = preg_replace(\"%(\\r\\n)|(\\r)%\", \"\", $nw).\"\\n\";\r\n$nw = preg_replace('#,#', ', ', $nw);\r\necho $nw;\r\n}\r\n\r\nmysql_close($con);\r\n?&gt; \r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Und zu guter letzt noch die anzeige des Graph index.php <strong>&#8222;\/var\/www\/html\/wdx\/index.php&#8220;<\/strong><\/p>\n<pre class=\"lang:default decode:true\" title=\"index graph\">&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"\r\n\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"&gt;\r\n&lt;html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"&gt;\r\n&lt;head&gt; \r\n&lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\"\/&gt; \r\n \r\n\r\n&lt;title&gt;Using Highcharts with PHP and MySQL&lt;\/title&gt;\r\n\r\n&lt;script type=\"text\/javascript\" src=\"js\/jquery-1.7.1.min.js\" &gt;&lt;\/script&gt;\r\n&lt;script type=\"text\/javascript\" src=\"js\/highcharts.js\" &gt;&lt;\/script&gt;\r\n&lt;script type=\"text\/javascript\" src=\"js\/themes\/gray.js\"&gt;&lt;\/script&gt;\r\n\r\n&lt;script type=\"text\/javascript\"&gt;\r\n\tvar chart;\r\n\t\t\t$(document).ready(function() {\r\n\t\t\t\tvar options = {\r\n\t\t\t\t\tchart: {\r\n\t\t\t\t\t\trenderTo: 'container',\r\n\t\t\t\t\t\tdefaultSeriesType: 'line',\r\n\t\t\t\t\t\tmarginRight: 130,\r\n\t\t\t\t\t\tmarginBottom: 25\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttitle: {\r\n\t\t\t\t\t\ttext: 'dbA',\r\n\t\t\t\t\t\tx: -20 \/\/center\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsubtitle: {\r\n\t\t\t\t\t\ttext: '',\r\n\t\t\t\t\t\tx: -20\r\n\t\t\t\t\t},\r\n\t\t\t\t\txAxis: {\r\n\t\t\t\t\t\ttype: 'datetime',\r\n\t\t\t\t\t\ttickInterval: 3600 * 1000, \/\/ one hour\r\n\t\t\t\t\t\ttickWidth: 0,\r\n\t\t\t\t\t\tgridLineWidth: 1,\r\n\t\t\t\t\t\tlabels: {\r\n\t\t\t\t\t\t\talign: 'center',\r\n\t\t\t\t\t\t\tx: -3,\r\n\t\t\t\t\t\t\ty: 20,\r\n\t\t\t\t\t\t\tformatter: function() {\r\n\t\t\t\t\t\t\t\treturn Highcharts.dateFormat('%H:%M', this.value);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tyAxis: {\r\n\t\t\t\t\t\ttitle: {\r\n\t\t\t\t\t\t\ttext: 'dbA'\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tplotLines: [{\r\n\t\t\t\t\t\t\tvalue: 0,\r\n\t\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\t\tcolor: '#808080'\r\n\t\t\t\t\t\t}]\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttooltip: {\r\n\t\t\t\t\t\tformatter: function() {\r\n\t\t\t\t                return Highcharts.dateFormat('', this.x-(1000*3600)) +''+ Highcharts.dateFormat('%H:%M', this.x) +' - &lt;b&gt;'+ this.y + 'dbA&lt;\/b&gt;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tlegend: {\r\n\t\t\t\t\t\tlayout: 'vertical',\r\n\t\t\t\t\t\talign: 'right',\r\n\t\t\t\t\t\tverticalAlign: 'top',\r\n\t\t\t\t\t\tx: -10,\r\n\t\t\t\t\t\ty: 100,\r\n\t\t\t\t\t\tborderWidth: 0\r\n\t\t\t\t\t},\r\n\t\t\t\t        series: [{\r\n                                                name: 'L01 (Maximalwert)'\r\n                                        },\r\n{\r\nname: 'L95 (Minimalwer)'\r\n},\r\n{\r\nname: 'Leq (Mittelwert)'\r\n}]\r\n\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t\t\/\/ Load data asynchronously using jQuery. On success, add the data\r\n\t\t\t\t\/\/ to the options and initiate the chart.\r\n\t\t\t\t\/\/ This data is obtained by exporting a GA custom report to TSV.\r\n\t\t\t\t\/\/ http:\/\/api.jquery.com\/jQuery.get\/\r\n\t\t\t\tjQuery.get('data.php', null, function(tsv) {\r\n\t\t\t\t\tvar lines = [];\r\n\t\t\t\t\ttraffic = [];\r\n                                        trafficc = [];\r\n                                        trafficcc = [];\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\/\/ split the data return into lines and parse them\r\n\t\t\t\t\t\ttsv = tsv.split(\/\\n\/g);\r\n\t\t\t\t\t\tjQuery.each(tsv, function(i, line) {\r\n\t\t\t\t\t\t\tline = line.split(\/,\/);\r\n\t\t\t\t\t\t\tdate = Date.UTC(line[0],line[1],line[2],line[3],line[4],line[5]);\r\n\t\t\t\t\t\t\ttraffic.push([\r\n\t\t\t\t\t\t\t\tdate,\r\n\t\t\t\t\t\t\t\tparseInt(line[6].replace(',', ''), 10)\r\n\t\t\t\t\t\t\t]);\r\n                                                        trafficc.push([\r\n                                                                date,\r\n                                                                parseInt(line[7].replace(',', ''), 10)\r\n                                                        ]);\r\n                                                        trafficcc.push([\r\n                                                                date,\r\n                                                                parseInt(line[8].replace(',', ''), 10)\r\n                                                        ]);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} catch (e) {  }\r\n\t\t\t\t\toptions.series[0].data = traffic;\r\n                                        options.series[1].data = trafficc;\r\n                                        options.series[2].data = trafficcc;\r\n\t\t\t\t\tchart = new Highcharts.Chart(options);\r\n\t\t\t\t});\r\n\t\t\t});\r\n&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;?php\r\n$j=shell_exec('cat j');\r\n$j=str_replace(' ','',$j);\r\n$j = preg_replace(\"#[\\r\\n]#\", '', $j);\r\n$m=shell_exec('cat m');\r\n$m=str_replace(' ','',$m);\r\n$m = preg_replace(\"#[\\r\\n]#\", '', $m);\r\n$t=shell_exec('cat t');\r\n$t=str_replace(' ','',$t);\r\n$t = preg_replace(\"#[\\r\\n]#\", '', $t);\r\n$h=shell_exec('cat h');\r\n$h=str_replace(' ','',$h);\r\n$h = preg_replace(\"#[\\r\\n]#\", '', $h);\r\necho \"&lt;center&gt;&lt;b&gt;&lt;font size=6&gt;Messung vom: \".$j.\".\".$m.\".\".$t;\r\n?&gt;\r\n&lt;div id=\"container\" style=\"width: 100%; height: 400px; margin: 0 auto\"&gt;&lt;\/div&gt;\r\n\t\t\t\t\t\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong>Nach einem Neustart des Raspberry PI sollte dann die Aufzeichnung automatisch starten<\/strong><\/h4>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Das Ergebnis k\u00f6nnte etwa so aussehen:<\/span><\/h2>\n<p><a href=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"247\" data-permalink=\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/dba\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?fit=1270%2C405&amp;ssl=1\" data-orig-size=\"1270,405\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"dba\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?fit=300%2C96&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?fit=676%2C216&amp;ssl=1\" class=\"aligncenter wp-image-247 size-large\" src=\"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2017\/02\/dba-1024x327.jpg?resize=676%2C216\" alt=\"dba\" width=\"676\" height=\"216\" srcset=\"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?resize=1024%2C327&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?resize=300%2C96&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?resize=768%2C245&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?resize=945%2C301&amp;ssl=1 945w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?resize=600%2C191&amp;ssl=1 600w, https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2017\/02\/dba.jpg?w=1270&amp;ssl=1 1270w\" sizes=\"(max-width: 676px) 100vw, 676px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>db(A) logger mit dem Raspberry PI F\u00fcr unser allj\u00e4hrliches Festival ( ROCKFREUNDE.DE ) wollte ich interessehalber mal eine Auswertung des Ger\u00e4uschpegels auf unserem Festivalgel\u00e4nde machen. Daraus entstand dann folgendes Projekt. Ziel ist das speichern und auswerten von Lautst\u00e4rkewerten \u00fcber einen&#8230; <a class=\"more-link\" href=\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>db(A) logger mit dem Raspberry PI - bmetallica.de<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"db(A) logger mit dem Raspberry PI - bmetallica.de\" \/>\n<meta property=\"og:description\" content=\"db(A) logger mit dem Raspberry PI F\u00fcr unser allj\u00e4hrliches Festival ( ROCKFREUNDE.DE ) wollte ich interessehalber mal eine Auswertung des Ger\u00e4uschpegels auf unserem Festivalgel\u00e4nde machen. Daraus entstand dann folgendes Projekt. Ziel ist das speichern und auswerten von Lautst\u00e4rkewerten \u00fcber einen... Continue Reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/\" \/>\n<meta property=\"og:site_name\" content=\"bmetallica.de\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-01T09:01:11+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi-150x150.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data1\" content=\"13 Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/\",\"url\":\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/\",\"name\":\"db(A) logger mit dem Raspberry PI - bmetallica.de\",\"isPartOf\":{\"@id\":\"https:\/\/www.bmetallica.de\/#website\"},\"datePublished\":\"2019-02-15T15:38:56+00:00\",\"dateModified\":\"2020-08-01T09:01:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.bmetallica.de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"db(A) logger mit dem Raspberry PI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.bmetallica.de\/#website\",\"url\":\"https:\/\/www.bmetallica.de\/\",\"name\":\"bmetallica.de\",\"description\":\"das Wissen der Welt geh\u00f6rt den Menschen\",\"publisher\":{\"@id\":\"https:\/\/www.bmetallica.de\/#\/schema\/person\/95f9265fa19015a54cb0537aad39bf97\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.bmetallica.de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de-DE\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.bmetallica.de\/#\/schema\/person\/95f9265fa19015a54cb0537aad39bf97\",\"name\":\"bmetallica\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de-DE\",\"@id\":\"https:\/\/www.bmetallica.de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f65d4d63669df7a43505e3fc4e0e353b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f65d4d63669df7a43505e3fc4e0e353b?s=96&d=mm&r=g\",\"caption\":\"bmetallica\"},\"logo\":{\"@id\":\"https:\/\/www.bmetallica.de\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"db(A) logger mit dem Raspberry PI - bmetallica.de","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/","og_locale":"de_DE","og_type":"article","og_title":"db(A) logger mit dem Raspberry PI - bmetallica.de","og_description":"db(A) logger mit dem Raspberry PI F\u00fcr unser allj\u00e4hrliches Festival ( ROCKFREUNDE.DE ) wollte ich interessehalber mal eine Auswertung des Ger\u00e4uschpegels auf unserem Festivalgel\u00e4nde machen. Daraus entstand dann folgendes Projekt. Ziel ist das speichern und auswerten von Lautst\u00e4rkewerten \u00fcber einen... Continue Reading &rarr;","og_url":"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/","og_site_name":"bmetallica.de","article_modified_time":"2020-08-01T09:01:11+00:00","og_image":[{"url":"http:\/\/bmetallica.de\/wp-content\/uploads\/2016\/10\/Front_of_Raspberry_Pi-150x150.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Gesch\u00e4tzte Lesezeit":"13 Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/","url":"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/","name":"db(A) logger mit dem Raspberry PI - bmetallica.de","isPartOf":{"@id":"https:\/\/www.bmetallica.de\/#website"},"datePublished":"2019-02-15T15:38:56+00:00","dateModified":"2020-08-01T09:01:11+00:00","breadcrumb":{"@id":"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bmetallica.de\/index.php\/dba-logger-mit-dem-raspberry-pi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bmetallica.de\/"},{"@type":"ListItem","position":2,"name":"db(A) logger mit dem Raspberry PI"}]},{"@type":"WebSite","@id":"https:\/\/www.bmetallica.de\/#website","url":"https:\/\/www.bmetallica.de\/","name":"bmetallica.de","description":"das Wissen der Welt geh\u00f6rt den Menschen","publisher":{"@id":"https:\/\/www.bmetallica.de\/#\/schema\/person\/95f9265fa19015a54cb0537aad39bf97"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bmetallica.de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de-DE"},{"@type":["Person","Organization"],"@id":"https:\/\/www.bmetallica.de\/#\/schema\/person\/95f9265fa19015a54cb0537aad39bf97","name":"bmetallica","image":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https:\/\/www.bmetallica.de\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f65d4d63669df7a43505e3fc4e0e353b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f65d4d63669df7a43505e3fc4e0e353b?s=96&d=mm&r=g","caption":"bmetallica"},"logo":{"@id":"https:\/\/www.bmetallica.de\/#\/schema\/person\/image\/"}}]}},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P8uhVF-3I","jetpack-related-posts":[{"id":166,"url":"https:\/\/www.bmetallica.de\/index.php\/mediacenter-pi-v2\/","url_meta":{"origin":230,"position":0},"title":"Mediacenter PI V2","author":"bmetallica","date":"8. Dezember 2015","format":false,"excerpt":"Ein Mediacenter mit dem Raspberry PI V2 \u00a0 Was wir brauchen: OSMC Installation (f\u00fcr Windows) Raspberry PI V2 MicroUSB Netzteil (z.B.) MicroSD (z.B.) WlanStick\u00a0(z.B.) HDMI-Kabel\u00a0(z.B.) TV mit HDMI-Eingang \u00a0 Installation unter Windows:\u00a0 Die MicroSD-Karte mit dem PC verbinden (z.B. mit einem USB zu MicroSD Adapter) Die Heruntergeladene \"osmc-installer.exe\" starten Einbau:\u2026","rel":"","context":"\u00c4hnlicher Beitrag","block_context":{"text":"\u00c4hnlicher Beitrag","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/92.205.129.62\/bmetallica\/wp-content\/uploads\/2015\/12\/2-300x237.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":114,"url":"https:\/\/www.bmetallica.de\/index.php\/433mhz-temperatur-auslesen\/","url_meta":{"origin":230,"position":1},"title":"433MHz Temperatur auslesen","author":"bmetallica","date":"5. November 2015","format":false,"excerpt":"Auswerten eines 433MHz Temperatursensors mit pilight \u00a0 Was wir ben\u00f6tigen: Aukru 433 MHz Funk- Sende und Empf\u00e4nger Modul Superregeneration Wireless Transmitter-Modul Einbrecher Alarm 433M receiver module Burglar Alarm f\u00fcr Arduino Raspberry pi (Amazon: LINK) PEARL Funk-Au\u00dfensensor f\u00fcr Wetterstation (Amazon: LINK) Verkabelung des Senders\/Empf\u00e4ngers: Verkabelung Sender Modul (nicht f\u00fcr das Auslesen\u2026","rel":"","context":"Mit 6 Kommentaren","block_context":{"text":"Mit 6 Kommentaren","link":"https:\/\/www.bmetallica.de\/index.php\/433mhz-temperatur-auslesen\/#comments"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/92.205.129.62\/bmetallica\/wp-content\/uploads\/2015\/11\/71Wz-aGbLzL._SL1500_-300x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":271,"url":"https:\/\/www.bmetallica.de\/index.php\/alexa-433-mhz-und-domoticz\/","url_meta":{"origin":230,"position":2},"title":"Alexa, 433 MHz und Domoticz","author":"bmetallica","date":"3. November 2017","format":false,"excerpt":"Alexa, 433 MHz und Domoticz \u00a0 Ziel des Projekts: Ziel des Projekts war es eine kosteng\u00fcnstige M\u00f6glichkeit zu finden, eine sprachgesteuerte Lichtsteuerung innerhalb einer Wohnung zu realisieren. Es sollten dabei keine Cloud-Dienste (ausgenommen der Amazon Cloud zur Spracherkennung) verwendet werden um einen h\u00f6heren Sicherheitsfaktor und eine unabh\u00e4ngigere Umgebung zu schaffen.\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.bmetallica.de\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/92.205.129.62\/bmetallica\/wp-content\/uploads\/2015\/11\/71Wz-aGbLzL._SL1500_-300x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":21,"url":"https:\/\/www.bmetallica.de\/index.php\/raspberry-pi\/","url_meta":{"origin":230,"position":3},"title":"Raspberry Pi","author":"bmetallica","date":"31. Oktober 2015","format":false,"excerpt":"Raspberry PI","rel":"","context":"\u00c4hnlicher Beitrag","block_context":{"text":"\u00c4hnlicher Beitrag","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":86,"url":"https:\/\/www.bmetallica.de\/index.php\/rpi-smarthome\/","url_meta":{"origin":230,"position":4},"title":"RPI SmartHome","author":"bmetallica","date":"2. November 2015","format":false,"excerpt":"Raspberry zur Haussteuerung (Smarthome) \u00a0 Interface: Als Display dient ein ,,3.2\" TFT LCD Touch Screen Display Monitor + Case + Heatsinks For Raspberry Pi B+\" (z.B. Ebay: LINK\u00a0ca. 19\u20ac) an einem ,,Raspberry PI V1 Model B\". Um die 3 Buttons am oberen Bildschirmrand ab zu fragen, verwende ich ein Python-Script,\u2026","rel":"","context":"\u00c4hnlicher Beitrag","block_context":{"text":"\u00c4hnlicher Beitrag","link":""},"img":{"alt_text":"IMG_20150117_175959","src":"https:\/\/i0.wp.com\/bmetallica.de\/wp-content\/uploads\/2015\/11\/IMG_20150117_1759591-645x1024.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":359,"url":"https:\/\/www.bmetallica.de\/index.php\/hochzeitsbilder-upload\/","url_meta":{"origin":230,"position":5},"title":"Hochzeitsbilder-Upload","author":"bmetallica","date":"18. M\u00e4rz 2019","format":false,"excerpt":"Hochzeitsbilder-Upload Zweck des Projektes: Ein Freund hat mich gebeten eine M\u00f6glichkeit zu schaffen, damit seine Hochzeitsg\u00e4ste ihre Bilder mittels Smartphone mit ihm teilen k\u00f6nnen. \u00a0 Implementierte Funktionen: Bilderupload via Wlan Bilderupload via Bluetooth Live-Slideshow der Bilder \u00fcber HDMI Automount f\u00fcr USB-Speichermedien (FAT, FAT32, vFAT und NTFS) Update 29.03.2019: Admin-Webinterface (um\u2026","rel":"","context":"Mit 5 Kommentaren","block_context":{"text":"Mit 5 Kommentaren","link":"https:\/\/www.bmetallica.de\/index.php\/hochzeitsbilder-upload\/#comments"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.bmetallica.de\/wp-content\/uploads\/2019\/03\/hochzeitsbilder.jpg?fit=535%2C765&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.bmetallica.de\/index.php\/wp-json\/wp\/v2\/pages\/230"}],"collection":[{"href":"https:\/\/www.bmetallica.de\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bmetallica.de\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bmetallica.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bmetallica.de\/index.php\/wp-json\/wp\/v2\/comments?post=230"}],"version-history":[{"count":22,"href":"https:\/\/www.bmetallica.de\/index.php\/wp-json\/wp\/v2\/pages\/230\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/www.bmetallica.de\/index.php\/wp-json\/wp\/v2\/pages\/230\/revisions\/396"}],"wp:attachment":[{"href":"https:\/\/www.bmetallica.de\/index.php\/wp-json\/wp\/v2\/media?parent=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}