From: Bernhard Tittelbach Date: Wed, 17 Dec 2014 01:22:52 +0000 (+0000) Subject: missingfiles X-Git-Url: https://git.realraum.at/?p=svn42.git;a=commitdiff_plain;h=daad6e004a0ec90276fbc34b86547e545f3fbe05 missingfiles --- diff --git "a/documents/t\303\274r.odt" "b/documents/t\303\274r.odt" new file mode 100644 index 0000000..415946b Binary files /dev/null and "b/documents/t\303\274r.odt" differ diff --git a/raspberry-kiosk/kiosk1440x900.html b/raspberry-kiosk/kiosk1440x900.html new file mode 100644 index 0000000..135e44c --- /dev/null +++ b/raspberry-kiosk/kiosk1440x900.html @@ -0,0 +1,50 @@ + + + + Realraum Kiosk Seite + + + + + + + + +
+ +
+ +
+ +
+

Veranstaltungskalender

+
Kalendar lädt ...
+
+ + + +
+
+

Sensordaten

+
+ + + +
Lädt ...
Lädt ...
+
+
+
+
+
+ +
+ +
+

Google+

+
Lädt ...
+
+
+ + diff --git a/raspberry-kiosk/kiosk768x1366sensors.html b/raspberry-kiosk/kiosk768x1366sensors.html new file mode 100644 index 0000000..cfdc786 --- /dev/null +++ b/raspberry-kiosk/kiosk768x1366sensors.html @@ -0,0 +1,42 @@ + + + + Realraum Kiosk Seite + + + + + + + +
+ +
+ +
+ +
+

Veranstaltungskalender

+
Kalendar lädt ...
+
+ +
+

Sensordaten

+
+ + + +
Lädt ...
Lädt ...
+
+
+ +
+
+ +
+
+ +
+
+ + diff --git a/sensor_graph/get_sensor_movement.pl b/sensor_graph/get_sensor_movement.pl new file mode 100755 index 0000000..f4c7ffb --- /dev/null +++ b/sensor_graph/get_sensor_movement.pl @@ -0,0 +1,71 @@ +#!/usr/bin/perl -w +# +# + +use strict; +use utf8; +require LWP::UserAgent; +my $ua = LWP::UserAgent->new(env_proxy => 1, + keep_alive => 1, + timeout => 30, + ); +use HTTP::Cookies; +use LWP; +$ua->cookie_jar({}); + +############### +$sensor::url_refresh = "http://slug.realraum.at/cgi-bin/sensor-movement.cgi"; +$sensor::url_image = "http://slug.realraum.at/movement.png"; +$sensor::localpath = "/tmp/movement.png"; +$sensor::mintime = 0.0015; +############### + +sub output_saved_image +{ + return 0 if ( not -e $sensor::localpath); + my $fh; + print STDOUT "Content-type: image/png\n\n"; + open($fh,"<$sensor::localpath") or exit; + while (<$fh>) {print $_}; + close($fh); + return 1; +} + +sub output_remote_image_and_save +{ + my $response; + $response = $ua->get($sensor::url_refresh); + return 0 unless (defined $response); + $response = $ua->get($sensor::url_image); + if (defined $response and $response->content =~ /^\x89PNG/) + { + my $fh; + open($fh,">$sensor::localpath"); + print $fh $response->content; + close($fh); + print STDOUT "Content-type: image/png\n\n"; + print $response->content; + $response->clear; + return 1; + } + return 0; +} + +sub output_error +{ + print STDOUT "Status: 404 Not Found\n"; + print STDOUT "Content-type: text/html\n\n"; + print STDOUT "

Sorry

The picture you requested could not be found

\n"; + return 1; +} + +if (-e $sensor::localpath and -M $sensor::localpath < $sensor::mintime) +{ + exit if (&output_saved_image); +} +else +{ + exit if (&output_remote_image_and_save); + exit if (&output_saved_image); +} +&output_error; diff --git a/sensor_graph/sensor-movement.cgi b/sensor_graph/sensor-movement.cgi new file mode 100755 index 0000000..976711c --- /dev/null +++ b/sensor_graph/sensor-movement.cgi @@ -0,0 +1,18 @@ +#!/usr/bin/rrdcgi + + + +' + --color="BACK#d0d0af" --color="CANVAS#ffffff" + --color="SHADEA#dfdfdf" --color="SHADEB#525252" + --color="AXIS#761407" --color="FONT#272727" --color="MGRID#b65447" + --color="ARROW#761407" --color="GRID#d0d0af" + --title="Movement Sensor" --lazy + --start=now-36h --end=now --width=490 + DEF:cel=/home/sensormovement.rrd:movement:LAST + LINE2:cel#1407e2:"Movements / Minute"> + + + +