to github
authorBernhard Tittelbach <xro@realraum.at>
Mon, 23 Feb 2015 23:18:12 +0000 (23:18 +0000)
committerBernhard Tittelbach <xro@realraum.at>
Mon, 23 Feb 2015 23:18:12 +0000 (23:18 +0000)
12 files changed:
raspberry-kiosk/config.txt [deleted file]
raspberry-kiosk/kiosk.css [deleted file]
raspberry-kiosk/kiosk.js [deleted file]
raspberry-kiosk/kiosk1.html [deleted file]
raspberry-kiosk/kiosk1024x768.html [deleted file]
raspberry-kiosk/kiosk1366x768.html [deleted file]
raspberry-kiosk/kiosk1440x900.html [deleted file]
raspberry-kiosk/kiosk768x1366.html [deleted file]
raspberry-kiosk/kiosk768x1366sensors.html [deleted file]
raspberry-kiosk/kiosk900x1440.html [deleted file]
raspberry-kiosk/restart-kiosk [deleted file]
raspberry-kiosk/start-kiosk.sh [deleted file]

diff --git a/raspberry-kiosk/config.txt b/raspberry-kiosk/config.txt
deleted file mode 100755 (executable)
index 3ccc37c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-# uncomment if you get no picture on HDMI for a default "safe" mode
-#hdmi_safe=1
-
-# uncomment this if your display has a black border of unused pixels visible
-# and your display can output without overscan
-disable_overscan=1
-
-# uncomment the following to adjust overscan. Use positive numbers if console
-# goes off screen, and negative if there is too much border
-#overscan_left=16
-#overscan_right=16
-#overscan_top=16
-#overscan_bottom=16
-
-hdmi_ignore_edid=0xa5000080
-
-# uncomment to force a console size. By default it will be display's size minus
-# overscan.
-#framebuffer_width=1280
-#framebuffer_height=720
-framebuffer_height=1366
-framebuffer_width=768
-#framebuffer_height=1440
-#framebuffer_width=800
-#framebuffer_height=1280
-#framebuffer_width=768
-
-#display_rotate=3
-display_rotate=1
-
-# uncomment if hdmi display is not detected and composite is being output
-#hdmi_force_hotplug=1
-
-# uncomment to force a specific HDMI mode (this will force VGA)
-#hdmi_group=1
-hdmi_mode=81
-#hdmi_mode=86
-
-# uncomment to force a HDMI mode rather than DVI. This can make audio work in
-# DMT (computer monitor) modes
-#hdmi_drive=2
-
-# uncomment to increase signal to HDMI, if you have interference, blanking, or
-# no display
-#config_hdmi_boost=4
-
-# uncomment for composite PAL
-#sdtv_mode=2
-
-#uncomment to overclock the arm. 700 MHz is the default.
-#arm_freq=800
-
-# for more options see http://elinux.org/RPi_config.txt
diff --git a/raspberry-kiosk/kiosk.css b/raspberry-kiosk/kiosk.css
deleted file mode 100644 (file)
index 50a0d81..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-
-body {
-  font-family: "Droid Sans", Helvetica, Arial, Sans;
-  color:black;
-  font-size:22px;
-  padding:0;
-  margin:0;
-  background-color: #D0D0AF;
-  overflow: hidden;
-}
-
-div {
-  width: 100%;
-}
-
-div#siteheader {
-  text-align: center;
-  color: white;
-  background-color: rgb(118, 20, 7);
-  font-size:180%;
-  font-weight: bold;
-  margin-top:10px;
-}
-
-span.r3red {
-  color: rgb(118, 20, 7);
-}
-
-img.headerphoto {
-  width:100%;
-  margin: -90px 0 0 0px;
-}
-
-div.headerphoto {
-  display:block;
-  width: 100%;
-  height: 200px;
-  overflow: hidden;
-  padding: 0.1em 0;
-  text-align: center;
-  margin-top:10px;
-}
-
-img.headerphoto2 {
-  width:100%;
-  margin: -70px 0 0 0px;
-}
-
-div.headerphoto2 {
-  display:block;
-  width: 100%;
-  height: 285px;
-  overflow: hidden;
-  padding: 0.1em 0;
-  text-align: center;
-  margin-top:10px;
-}
-
-div.contentborder,
-div.calendar,
-div.sensorgraphs,
-div.sensorgauges,
-div.gpluswall
-{
-  display:block;
-  background-color: white;
-  border-top-left-radius:10px;
-  border-top-right-radius:10px;
-  margin-top:10px;
-  margin-left:0px;
-  margin-right:0px;
-  overflow:hidden;
-}
-
-p.topic {
-  width: 100%;
-  margin-bottom:5px;
-  margin-top:0px;
-  margin-left:0px;
-  margin-right:0px;
-  font-weight: bold;
-  font-variant:small-caps;
-  font-size:100%;
-  color: white;
-  text-align:center;
-  background-color: #272727;
-}
-
-div.calendar {
-  width: 100%;
-  height: 13em;
-  font-size:112%;
-}
-
-ul {
-       margin-top:18px;
-       padding-left:28px;
-}
-
-li.level1 {
-       white-space:nowrap;
-}
-
-div.status {
-  display:block;
-  width: 98%;
-  margin-top:10px;
-  margin-left:auto;
-  margin-right:auto;
-}
-
-div.sensorgraphs {
-  text-align:center;
-  width:399px;
-  padding-bottom:1em;
-  margin-left:auto;
-  margin-right:auto;
-}
-
-div.sensorgauges {
-  text-align:center;
-  width:268px;
-  padding-bottom:1em;
-  margin-left:auto;
-  margin-right:auto;
-}
-
-table.status {
-  width:397px;
-  display:inline;
-  margin-left: 0;
-  margin-right: 0;
-  margin-top:0;
-  margin-bottom:1ex;
-}
-
-p.anwesenheit_status {
-}
-
-td.anwesenheitsstatus {
-  height:100px;
-  text-align:center;
-  margin-left:105px;
-  margin-right:auto;
-  vertical-align:middle;
-  display:table-cell;
-  font-weight:bold;
-  font-size:136%;
-}
-
-td.sensorstatus {
-  height:42px;
-  text-align:center;
-  vertical-align:middle;
-  display:table-cell;
-  background-color: white;
-  font-size:66%;
-}
-
-div.sensorelem {
-  display:block;
-  width:397px;
-  margin-top:0;
-  margin-bottom:6px;
-  margin-left:auto;
-  margin-right:auto;
-}
-
-img.sensorimg {
-  margin:0;
-  padding:0;
-  border:0px none black;
-  width:397px;
-}
-
-div.gpluswall {
-  width: 497px;
-  padding-bottom:1em;
-}
-
-div.gpluspost {
-  display:block;
-  width: 495px;
-  margin-left:0;
-  margin-right:0;
-  border:1px solid Gainsboro;
-  margin-top:0;
-  margin-bottom:6px;
-  background-color: rgb(253, 253, 253);
-}
-img.gplusactor {
-  margin-left:2px;
-  margin-bottom:0px;
-  margin-right:4px;
-  margin-top:4px;
-  display:inline;
-  float:left;
-}
-p.gplustimestamp {
-  display:inline;
-  float: right;
-  margin-top:0;
-  padding:4 14 4 14;
-  margin-left:4px;
-  margin-bottom:4px;
-  margin-right:0;
-  font-size:50%;
-  color:DimGray;
-  background-color: Gainsboro;
-  border-bottom-left-radius:9px;
-}
-table.gplusimg {
-  display:block;
-  margin-left:0;
-  margin-top:6px;
-  margin-bottom:0;
-  margin-right:0;
-  overflow:hidden;
-  max-height:275px;
-  max-width:495px;
-  border: 0px none black;
-  padding: 0;
-  border-spacing: 0;
-  border-collapse:collapse;
-}
-p.gplustxt {
-  display:block;
-  font-size:80%;
-  margin: 4px;
-}
-
-div#dateclock {
-  text-align: center;
-  font-weight: bold;
-  color: white;
-  background-color: #272727;
-  font-size:217%;
-}
-
-table {
-       font-size: 100%;
-}
\ No newline at end of file
diff --git a/raspberry-kiosk/kiosk.js b/raspberry-kiosk/kiosk.js
deleted file mode 100644 (file)
index 778ed47..0000000
+++ /dev/null
@@ -1,464 +0,0 @@
-function min(a,b)
-{
-       if (a > b)
-               return b;
-       else
-               return a;
-}
-
-function writeGooglePlusEvents(data, elem)
-{
-  var ghtml = "";
-  //var gplusimgwidth = parseInt($('<table class="gplusimg" />').css("width"));
-  var gplusimgwidth = 495;
-  var minimgwidth=78;
-  for (var i=0; i< data.items.length; i++)
-  {
-    var item = data.items[i];
-    var noteobj = item.object;
-    var attach = noteobj.attachments;
-    var notetxt = noteobj.content;
-    var noteimgs = new Array();
-    if (attach)
-    {
-      for (var a=0; a<attach.length; a++)
-      {
-        if ( attach[a].objectType == "album")
-        {
-          for (var t=0; t<attach[a].thumbnails.length; t++)
-          {
-            noteimgs.push(attach[a].thumbnails[t].image.url);
-          }
-        }
-        else if ( attach[a].objectType == "photo" || attach[a].objectType == "video")
-        {
-          noteimgs.push(attach[a].image.url);
-        }
-        else if (attach[a].objectType == "event")
-        {
-          notetxt = "<b>" + attach[a].displayName+"</b><br/>"+notetxt;
-        }
-      }
-    }
-    ghtml += '<div class="gpluspost">'
-    ghtml += '<img class="gplusactor" src="'+item.actor.image.url+'"/><p class="gplustimestamp">'+item.updated.substring(0,16).replace("T"," ")+'</p>';
-    ghtml += '<p class="gplustxt">'+notetxt+'</p>';
-    if (noteimgs.length>0)
-    {
-      var bigimglimit;
-      ghtml += '<table class="gplusimg" cellspacing="0"><tr>';
-      if (noteimgs.length > 3)
-      {
-              var gplusimgmaxwidth = gplusimgwidth - (minimgwidth * ((noteimgs.length -1) / 3));
-             bigimglimit = "max-height:"+(minimgwidth*3)+"px; max-width:"+gplusimgmaxwidth+"px;"
-             ghtml += '<td><img class="gplusimg" style="'+bigimglimit+'" src="'+noteimgs[0]+'"/></td>';
-             for (var ni=1; ni<noteimgs.length; ni+=3)
-             {
-                 ghtml += '<td>';
-                 var niimax = min(noteimgs.length, ni+3);
-                 for (var nii=ni; nii<niimax; nii++)
-                 {
-                       ghtml += '<img class="gplusimg" style="max-width:'+minimgwidth+'px; max-height:'+minimgwidth+'px;" src="'+noteimgs[nii]+'"/><br/>';
-                 }
-                 ghtml += '</td>';
-             }
-      }
-      else
-      {
-             var gplusimgmaxwidth = gplusimgwidth / noteimgs.length;
-            bigimglimit = "max-width:"+gplusimgmaxwidth+"px;"
-             for (var ni=0; ni<noteimgs.length; ni++)
-            {
-               ghtml += '<td><img class="gplusimg" style="'+bigimglimit+'" src="'+noteimgs[ni]+'"/></td>';
-            }
-      }
-      ghtml += '</tr></table>';
-    }
-    ghtml += '</div>';
-  }
-  elem.innerHTML=ghtml;
-}
-
-
-function loadGooglePlusEvents()
-{
-  var gpak = "AIzaSyD9xBFM-KWwSYBgZ8VzftJ5wYYvurOxEHg";
-  var gplusuri = "https://www.googleapis.com/plus/v1/people/113737596421797426873/activities/public?maxResults=4&key="+gpak;
-  var gpluscontainer=document.getElementById("gplusevents");
-  $.getJSON(gplusuri, function(data){
-    writeGooglePlusEvents(data, gpluscontainer);
-  });
-}
-
-function weekday2str(dow)
-{
-    var weekday=new Array(7);
-    weekday[0]="So";
-    weekday[1]="Mo";
-    weekday[2]="Di";
-    weekday[3]="Mi";
-    weekday[4]="Do";
-    weekday[5]="Fr";
-    weekday[6]="Sa";
-    weekday[7]="So";
-    if (dow >=0 && dow <=7)
-        return weekday[dow];
-    else
-        return "";
-}
-
-function calendarItemEnhancer(data)
-{
-    for (var s=0; s<data.length; s++)
-    {
-      var when = "";
-      var stime = data[s].starttime;
-      var dt;
-      if (stime) {
-        dt = Date.parse(data[s].start+'T'+data[s].starttime);
-      } else {
-        dt = Date.parse(data[s].start);
-      }
-      if (stime && Date.now() > dt)
-      {
-        when = "JETZT";
-      }
-      else
-      {
-        var weekday = weekday2str((new Date(dt)).getDay());
-        var month = data[s].start.substring(5,7);
-        if (month[0] == '0')
-          month = month[1];
-        var dayofmonth = data[s].start.substring(8,10);
-          if (dayofmonth[0] == '0')
-          dayofmonth = dayofmonth[1];
-        if (stime) {
-          while (stime.substring(stime.length-3,stime.length) == ":00")
-          {
-            stime=stime.substring(0,stime.length-3);
-          }
-          if (stime.length <= 2) { stime+="h"; }
-          when = weekday + " " + dayofmonth+"."+month +", "+stime;
-        } else {
-          when = weekday + " " + dayofmonth+"."+month;
-        }
-      }
-      data[s].when = when
-    }
-    return data
-}
-
-function loadCalendarKiosk()
-{
-  var calcontainer=document.getElementById("grical_upcoming_kiosk");
-  $.getJSON('/shmcache/grical_realraum.json', function(data){
-    var calhtml = "";
-    $.each(calendarItemEnhancer(data), function(index, itm) {
-      calhtml += '<li class="level1">'+itm.when+' - <span class="r3red">'+itm.title+'</span></li>'+"\n";
-    });
-    calcontainer.innerHTML='<ul>'+calhtml+'</ul>';
-  });
-}
-
-function loadCalendarMainPage()
-{
-  //old URI: //grical.realraum.at/s/?query=!realraum&limit=9&view=json
-  var calcontainer=document.getElementById("grical_upcoming");
-  $.getJSON('/shmcache/grical_realraum.json', function(data){
-    var calhtml = "";
-    $.each(calendarItemEnhancer(data), function(index, itm) {
-      calhtml += '<li class="level1"><div class="li">'+itm.when+' - <a href="'+itm.url+'" class="urlextern" title="'+itm.title+'"  rel="nofollow">'+itm.title+'</a></div></li>'+"\n";
-    });
-    calcontainer.innerHTML='<ul>'+calhtml+'</ul>';
-  });
-}
-
-var gauges = {}
-function drawGauge(targetelem, label, temp, options) {
-    // Create and draw the visualization.
-    if (targetelem)
-    {
-        var data = google.visualization.arrayToDataTable([["Label", "Value"],[label,temp]]);
-        if (!gauges.hasOwnProperty(targetelem.id)) {
-            gauges[targetelem.id] = new google.visualization.Gauge(targetelem);
-        }
-        gauges[targetelem.id].draw(data, options);
-    }
-}
-
-var linecharts = {}
-function drawLineGraph(targetelem, dataarray, options, x_is_epochdate) {
-  if (dataarray && targetelem) {
-    var data;
-    if (x_is_epochdate) {
-      data=new google.visualization.DataTable();
-      data.addColumn('datetime',dataarray[0][0]);
-      for (var c=1; c<dataarray[0].length; c++) {
-        data.addColumn('number',dataarray[0][c]);
-      }
-      for (var r=1; r<dataarray.length; r++) {
-        dataarray[r][0] = new Date(dataarray[r][0]*1000);
-        data.addRow(dataarray[r]);
-      }
-    } else {
-      data = google.visualization.arrayToDataTable(dataarray);
-    }
-    // Create and draw the visualization.
-    options["width"]= targetelem.getAttribute("width");
-    options["height"]=targetelem.getAttribute("height");
-    if (!linecharts.hasOwnProperty(targetelem.id)) {
-      linecharts[targetelem.id] = new google.visualization.LineChart(targetelem);
-    }
-    linecharts[targetelem.id].draw(data, options);
-  }
-}
-
-function loadAndDrawSensorData() {
-  $.getJSON("https://realraum.at/shmcache/r3sensors.json", function(data){
-    drawLineGraph(document.getElementById('tempgooglegraph'), data["TempSensorUpdate"],
-      {curveType: "function", title: 'Temperature Sensors', colors: ['#FF0000','#CC0033','#660000','#CC3333'], vAxis:{viewWindow:{min:15,max:26}, viewWindowMode:"explicit"}, chartArea:{left:32,top:20,width:"88%",height:"78%"}, legend: {position: "none"}} ,true);
-    drawLineGraph(document.getElementById('lightgooglegraph'), data["IlluminationSensorUpdate"],
-        {curveType: "none", title: 'Illumination Sensors', vAxis: {maxValue: 1024, minValue:5}, chartArea:{left:32,top:20,width:"88%",height:"78%"}, legend: {position: "none"}} ,true);
-    drawLineGraph(document.getElementById('movementgooglegraph'), data["MovementSensorUpdate"],
-        {curveType: "function", title: 'Movement Sensors', vAxis: {maxValue: 10, minValue:0,viewWindowMode:"maximized"}, chartArea:{left:32,top:20,width:"88%",height:"78%"}, legend: {position: "none"}} ,true);
-    });
-}
-
-function siNumberString(num,unit)
-{
-  var siid=""
-  var sisize=new Array([1e9,"G"],[1e6,"M"],[1e3,"K"]);
-  for (i=0; i<sisize.length; i++)
-  { 
-    if (num >= sisize[i][0]) { siid=sisize[i][1]; num=num/sisize[i][0]; break;}
-
-  }
-  return (Math.round(num*10)/10)+siid+unit;
-}
-
-function writeAnwesenheitStatus(data)
-{
-  var html="";
-  var sensorshtml="";
-  var sensorstd="";
-  if (data.open)
-  {
-   iconuri=data.icon.open;
-   statuscolor="lime";
-  }
-  else
-  {
-   iconuri=data.icon.closed;
-   statuscolor="red";
-  }
-  var anwesenheit_status_kiosk = document.getElementById('anwesenheit_status_kiosk');
-  var anwesenheit_status_frontpage = document.getElementById('anwesenheit_status');
-  var statusage = parseInt((new Date()).getTime()/1000) - data.lastchange;
-  var statusagestatus = "";
-  if (statusage > 600)
-  {
-    //var statusagestatus = '<tr style="height:5px; overflow:hidden; "><td colspan="2"></td><td style="text-align:right; font-size:5%; background:red;">Status older than ' + siNumberString(statusage,"s") + '</td></tr>';
-    var statusagestatus = '<br/><div style="text-align:right; float:right; margin:0; padding:1px; line-height:105%; font-size:65%; background:red;">Status older than ' + siNumberString(statusage,"s") + '</div>';
-  }
-  if (anwesenheit_status_kiosk)
-  {
-    anwesenheit_status_kiosk.innerHTML='<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100"><tr><td style="width:100px;"><img style="float:left;" src="'+iconuri+'" height="100" width="100"/></td><td style="width:4px;"></td><td class="anwesenheitsstatus" style="background-color:'+statuscolor+'; ">'+data.status+'</td></tr></table>';
-  }
-  if (anwesenheit_status_frontpage)
-  {
-    //anwesenheit_status_frontpage.innerHTML='<table border="0" cellpadding="0" cellspacing="0" width="100%" height="42"><tr><td style="width:42px;"><img style="float:left;" src="'+iconuri+'" height="42" width="42"/></td><td style="width:4px;"></td><td style="background-color:'+statuscolor+'; height:42px; text-align:center; margin-left:48px; margin-right:auto; font-size:larger; font-weight:bold; vertical-align:middle; display:table-cell;">'+data.status+'</td></tr>'+statusagestatus+'</table>';
-    anwesenheit_status_frontpage.innerHTML='<table border="0" cellpadding="0" cellspacing="0" width="100%" height="42"><tr><td style="width:42px;"><img style="float:left;" src="'+iconuri+'" height="42" width="42"/></td><td style="width:4px;"></td><td style="background-color:'+statuscolor+'; height:42px; text-align:center; margin-left:48px; margin-right:auto; font-size:larger; font-weight:bold; vertical-align:middle; display:table-cell;">'+data.status+statusagestatus+'</td></tr></table>';
-  }
-
-  if (data.sensors)
-  {
-    if (data.sensors.temperature)
-    {
-      sensorstd+='<td class="sensorstatus"><b>Temperatur</b>';
-      $.each( data.sensors.temperature, function(s, sensorobj) {
-        sensorstd+='<br/>'+sensorobj.location+': '+sensorobj.value.toFixed(2)+sensorobj.unit;
-               drawGauge(document.getElementById('tempgauge'), "Temp "+sensorobj.location, sensorobj.value, {redFrom: 33, redTo: 40, yellowFrom:29, yellowTo: 33,  minorTicks: 4, min:0, max:40});
-      });
-      sensorstd+='</td>';
-    }
-    if (data.sensors.ext_illumination)
-    {
-      sensorstd+='<td class="sensorstatus"><b>Licht</b>';
-      $.each( data.sensors.ext_illumination, function(s, sensorobj) {
-        sensorstd+='<br/>'+sensorobj.location+': '+sensorobj.value;
-        drawGauge(document.getElementById('lightgauge'), "Licht "+sensorobj.location, sensorobj.value, {redFrom: 950, redTo: 1024,yellowFrom:0, yellowTo: 200,minorTicks: 4, min:0, max:1024});
-      });
-      sensorstd+='</td>';
-    }
-    if (data.sensors.door_locked)
-    {
-      sensorstd+='<td class="sensorstatus"><b>Eingangstür</b>';
-      $.each( data.sensors.door_locked, function(s, sensorobj)  {
-        var lockstatus="Auf";
-        if (sensorobj.value) { lockstatus = "Zu"; }
-        sensorstd+='<br/>'+sensorobj.location+': '+lockstatus;
-      });
-      sensorstd+='</td>';
-    }
-    if (data.sensors.ext_door_ajar)
-    {
-      sensorstd+='<td class="sensorstatus"><b>Türkontakt</b>';
-      $.each( data.sensors.ext_door_ajar, function(s, sensorobj)  {
-        var lockstatus="Auf";
-        if (sensorobj.value) { lockstatus = "Zu"; }
-        sensorstd+='<br/>'+sensorobj.location+': '+lockstatus;
-      });
-      sensorstd+='</td>';
-    }
-    if (data.sensors.ext_dust)
-    {
-      sensorstd+='<td class="sensorstatus"><b>Staub</b>';
-      $.each( data.sensors.ext_dust, function(s, sensorobj) {
-        sensorstd+='<br/>'+sensorobj.location+': '+sensorobj.value+sensorobj.unit+'</td>';
-      });
-      sensorstd+='</td>';
-
-    }
-    if (sensorstd != "")
-    {
-      sensorshtml='<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>'+sensorstd+'</tr></table>';
-      document.getElementById('sensor_status').innerHTML=sensorshtml;
-    }
-  }
-}
-
-function updateAnwesenheitStatus()
-{
- //var req = new XMLHttpRequest();
- url = "/status.json";
- //req.open("GET", url ,false);
- //google chrome workaround
- //req.setRequestHeader("googlechromefix","");
- //req.send(null);
- var jqxhr = $.getJSON(url, writeAnwesenheitStatus);
-}
-
-function updateDateClock(now)
-{
-  var daynames = new Array('So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa');
-  var datetimestr = daynames[now.getDay()];
-  datetimestr += ' ' + now.getDate();
-  datetimestr += '.' + (now.getMonth() + 1);
-  datetimestr += '.' + now.getFullYear();
-  datetimestr += (now.getHours() > 9 ? ' ' : ' 0') + now.getHours();
-  datetimestr += (now.getMinutes() > 9 ? ':' : ':0') + now.getMinutes();
-  datetimestr += (now.getSeconds() > 9 ? ':' : ':0') + now.getSeconds();
-  $('#dateclock').html(datetimestr);
-}
-
-function highlightEntry(idx, color, value)
-{
-  if(value == 0) {
-    if(idx%2 == 0)
-      $('#upnext' + idx).css('background-color', 'white');
-    else
-      $('#upnext' + idx).css('background-color', '#E0E0E0');
-  } else {
-    $('#upnext' + idx).css('background-color', color);
-  }
-}
-
-var seconds = 0;
-function clock(now)
-{
-  var now = new Date(new Date().valueOf() + 300);
-  updateDateClock(now);
-  seconds++;
-  if(seconds >= 20) {
-    seconds = 0;
-  }
-}
-
-function showError(XMLHttpRequest, textStatus, errorThrown)
-{
-  alert("Error: " + textStatus);
-}
-
-function updateSensors()
-{
-  reloadImg(document.getElementById("tempsensor"));
-  reloadImg(document.getElementById("movementsensor"));
-  reloadImg(document.getElementById("lightsensor"));
-}
-
-function IsImageOk(img) {
-    if (!img.complete)
-    {
-        return false;
-    }
-    if (typeof img.naturalWidth == "undefined" || (typeof img.naturalWidth == "number" && img.naturalWidth == 0))
-    {
-        return false;
-    }
-    return true;
-}
-
-var img_orig_src = {};
-function reloadImgAlt(element)
-{
-    if(element.complete)
-    {
-      var new_image = new Image();
-      //set up the new image
-      new_image.id = element.id;
-      new_image.className = element.className;
-      if (! img_orig_src[element.id])
-      {
-        img_orig_src[element.id] = element.src;
-      }
-      new_image.src = img_orig_src[element.id] + "?dt="+Math.floor(new Date().getTime() / 1000).toString();
-      if (IsImageOk(new_image))
-      {
-        element.parentNode.insertBefore(new_image,element);
-        element.parentNode.removeChild(element);
-      }
-    }
-}
-function reloadImg(element)
-{
-    if (! img_orig_src[element.id])
-    {
-      img_orig_src[element.id] = element.src;
-    }
-    element.src = img_orig_src[element.id] + "?dt="+Math.floor(new Date().getTime() / 1000).toString();
-}
-
-$(document).ready(function()
-{
-  updateAnwesenheitStatus();
-  setInterval("updateAnwesenheitStatus()", 10*1000);
-  if (document.getElementById("dateclock"))
-  {
-    updateDateClock(new Date());
-    setInterval("clock()", 500);
-  }
-  if (document.getElementById("grical_upcoming_kiosk"))
-  {
-    loadCalendarKiosk();
-    setInterval("loadCalendarKiosk()", 123*1000);
-  }
-  if (document.getElementById("grical_upcoming"))
-  {
-    loadCalendarMainPage();
-    setInterval("loadCalendarMainPage()", 123*1000);
-  }
-//  if (document.getElementById("sensorgraphs"))
-//  {
-//    setInterval("updateSensors()",145*1000);
-//  }
-  if (document.getElementById("tempgooglegraph") || document.getElementById("lightgooglegraph") || document.getElementById("movementgooglegraph"))
-  {
-    loadAndDrawSensorData();
-    setInterval("loadAndDrawSensorData()",145*1000);
-  }
-  if (document.getElementById("gplusevents"))
-  {
-    loadGooglePlusEvents();
-    setInterval("loadGooglePlusEvents()", 1207*1000);
-  }
-});
diff --git a/raspberry-kiosk/kiosk1.html b/raspberry-kiosk/kiosk1.html
deleted file mode 100644 (file)
index 8c674d0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<html>
-  <head>
-  <meta charset="utf-8">
-  <title>Realraum Kiosk Seite</title>
-  <link rel="stylesheet" href="kiosk.css" type="text/css" />
-  <script type="text/javascript" src="/jquery.min.js"></script>
-  <!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
-  <!--script src="/purl.js"></script-->
-  <script type="text/javascript" src="kiosk.js"></script>
- </head>
- <body style="max-width:900px; max-height:1440px;">
-  <div id="dateclock"></div>
-  <div id="headerphoto" class="headerphoto">
-  <img class="headerphoto" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
-  </div>
- <table border="0" cellpadding="0" cellspacing="0"><tr>
- <!-- Sensor Data ------------------------ -->
- <td style="vertical-align:top; padding-right:2px;">
-  <div class="sensorgraphs">
-    <p class="topic">Sensordaten</p>
-    <div class="sensorelem">
-    <table class="status" style="">
-    <tr><td id="anwesenheit_status_kiosk" style="height:100px; border:0px none black;">Lädt ...</td></tr>
-    <tr><td id="sensor_status" style="border:0px none black; margin-top:5px;">Lädt ...</td></tr>
-    </table>
-    </div>
-    <div class="sensorelem">
-     <img id="tempsensor" class="sensorimg" src="http://realraum.at/shmcache/temp0.png"/>
-    </div>
-    <div class="sensorelem">
-      <img id="lightsensor" class="sensorimg" src="http://realraum.at/shmcache/light0.png"/>
-    </div>
-    <div class="sensorelem">
-      <img id="movementsensor" class="sensorimg" src="http://realraum.at/shmcache/movement.png"/>
-    </div>
-  </div>
-
-  </td><td style="vertical-align:top;">
-   <!-- Google Plus Wall ------------------------ -->
-   <div class="gpluswall">
-    <p class="topic">Google+</p>
-    <div id="gplusevents">Lädt ...</div>
-   </div>
-  </td></tr>
-  </table>
-</body>
-</html>
diff --git a/raspberry-kiosk/kiosk1024x768.html b/raspberry-kiosk/kiosk1024x768.html
deleted file mode 100644 (file)
index 51336a8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<html>
-  <head>
-  <meta charset="utf-8">
-  <title>Realraum Kiosk Seite</title>
-  <link rel="stylesheet" href="kiosk.css" type="text/css" />
-  <script type="text/javascript" src="/jquery.min.js"></script>
-  <!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
-  <!--script src="/purl.js"></script-->
-  <script type="text/javascript" src="kiosk.js"></script>
- </head>
- <body style="max-width:1024px; max-height:768px;">
-  <div id="dateclock"></div>
-  <div id="siteheader">Neuigkeiten auf <span style="font-size:110%;">http://realraum.at</span></div>
-  <div id="headerphoto2" class="headerphoto2">
-  <img class="headerphoto2" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
-  </div>
-  <!-- Calendar ------------------------ -->
-  <div class="calendar">
-    <p class="topic">Veranstaltungskalender</p>
-    <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
-  </div>
-</body>
-</html>
diff --git a/raspberry-kiosk/kiosk1366x768.html b/raspberry-kiosk/kiosk1366x768.html
deleted file mode 100644 (file)
index 6574643..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-  <head>
-  <meta charset="utf-8">
-  <title>Realraum Kiosk Seite</title>
-  <link rel="stylesheet" href="kiosk.css" type="text/css" />
-  <script type="text/javascript" src="/jquery.min.js"></script>
-  <!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
-   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
-   <script type="text/javascript">
-      google.load('visualization', '1', {packages: ['gauge']});
-  </script>
-  <script type="text/javascript" src="kiosk.js"></script>
- </head>
- <body style="max-height:768px; max-width:1366px; font-size:19px;">
- <table border="0" cellpadding="0" cellspacing="0"><tr>
- <td><div class="sensorgauges" style="margin-bottom:0px; padding-bottom:0px;">
-    <p class="topic">Sensorwerte</p>
-    <div id="anwesenheit_status_kiosk" style="height:100px; border:0px none black;">Lädt ...</div>
-    <div id="sensor_status" style="border:0px none black; margin-top:5px;">Lädt ...</div>
-    <div id="tempgauge" style="width: 240px; height: 240px; padding-left:5px; margin-bottom:-10px;"></div>
-    <div id="lightgauge" style="width: 240px; height: 240px; padding-left:5px; margin-bottom:-8px;"></div>
-   </div>
- </td><td style="vertical-align:top;">
-  <!-- Calendar ------------------------ -->
-  <div class="calendar" style="height:17em; width:650px;">
-    <p class="topic">Veranstaltungskalender</p>
-    <div id="dateclock"></div>
-    <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
-  </div>
-  <iframe src="/wiki/doku.php?id=brockmanngassetodo#todo" style="width:645px; height:420px;">
-  </iframe>
- </td>
- <td style="vertical-align:top;">
-   <!-- Google Plus Wall ------------------------ -->
-   <div class="gpluswall" style="margin-left:auto; margin-right:auto;">
-    <p class="topic">Google+</p>
-    <div id="gplusevents">Lädt ...</div>
-   </td></tr>
-   </table>
-  </table>
-</body>
-</html>
diff --git a/raspberry-kiosk/kiosk1440x900.html b/raspberry-kiosk/kiosk1440x900.html
deleted file mode 100644 (file)
index 135e44c..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<html>
-  <head>
-  <meta charset="utf-8">
-  <title>Realraum Kiosk Seite</title>
-  <link rel="stylesheet" href="kiosk.css" type="text/css" />
-  <script type="text/javascript" src="/jquery.min.js"></script>
-  <!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
-   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
-   <script type="text/javascript">
-      google.load('visualization', '1', {packages: ['corechart']});
-  </script>
-  <script type="text/javascript" src="kiosk.js"></script>
- </head>
- <body style="max-width:900px; max-height:1440px;">
-  <div id="dateclock"></div>
-  <div id="siteheader">Neuigkeiten auf <span style="font-size:110%;">http://realraum.at</span></div>
-  <div id="headerphoto" class="headerphoto">
-  <img class="headerphoto" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
-  </div>
-  <!-- Calendar ------------------------ -->
-  <div class="calendar">
-    <p class="topic">Veranstaltungskalender</p>
-    <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
-  </div>
- <table border="0" cellpadding="0" cellspacing="0"><tr>
- <!-- Sensor Data ------------------------ -->
- <td style="vertical-align:top; padding-right:2px;">
-  <div class="sensorgraphs">
-    <p class="topic">Sensordaten</p>
-    <div class="sensorelem">
-    <table class="status" style="">
-    <tr><td id="anwesenheit_status_kiosk" style="height:100px; border:0px none black;">Lädt ...</td></tr>
-    <tr><td id="sensor_status" style="border:0px none black; margin-top:5px;">Lädt ...</td></tr>
-    </table>
-    </div>
-    <div class="sensorelem" id="tempgooglegraph" style="height:300px;"></div>
-    <div class="sensorelem" id="lightgooglegraph" style="height:300px;"></div>
-  <div class="sensorelem" id="movementgooglegraph" style="height:300px;"></div>
-  </div>
-
-  </td><td style="vertical-align:top;">
-   <!-- Google Plus Wall ------------------------ -->
-   <div class="gpluswall">
-    <p class="topic">Google+</p>
-    <div id="gplusevents">Lädt ...</div>
-   </div>
-  </td></tr>
-  </table>
-</body>
-</html>
diff --git a/raspberry-kiosk/kiosk768x1366.html b/raspberry-kiosk/kiosk768x1366.html
deleted file mode 100644 (file)
index b88c5db..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<html>
-  <head>
-  <meta charset="utf-8">
-  <title>Realraum Kiosk Seite</title>
-  <link rel="stylesheet" href="kiosk.css" type="text/css" />
-  <script type="text/javascript" src="/jquery.min.js"></script>
-  <!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
-   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
-   <script type="text/javascript">
-      google.load('visualization', '1', {packages: ['gauge']});
-  </script>
-  <script type="text/javascript" src="kiosk.js"></script>
- </head>
- <body style="max-width:768px; max-height:1366px; font-size:19px;">
-  <div id="dateclock"></div>
-  <div id="siteheader">Neuigkeiten auf <span style="font-size:110%;">http://realraum.at</span></div>
-  <div id="headerphoto" class="headerphoto">
-  <img class="headerphoto" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
-  </div>
-  <!-- Calendar ------------------------ -->
-  <div class="calendar">
-    <p class="topic">Veranstaltungskalender</p>
-    <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
-  </div>
- <table border="0" cellpadding="0" cellspacing="0"><tr>
- <td style="vertical-align:top; padding-right:3px;">
- <div class="sensorgauges" style="margin-bottom:0px; padding-bottom:0px;">
- <p class="topic">Sensorwerte</p>
- <div id="anwesenheit_status_kiosk" style="height:100px; border:0px none black;">Lädt ...</div>
- <div id="sensor_status" style="border:0px none black; margin-top:5px;">Lädt ...</div>
- <div id="tempgauge" style="width: 260px; height: 260px; padding-left:5px; margin-bottom:-10px;"></div>
- <div id="lightgauge" style="width: 260px; height: 260px; padding-left:5px; margin-bottom:-8px;"></div>
- </div>
-   <table border="0" style="width:268px; margin:0px; padding:0px;" cellpadding="0" cellspacing="0">
-   <tr>
-   <td><img src="./qr_realraum.at.png" width="130" height="130" style="margin-top:7px; margin-left:0px; margin-right:5px;"/></td>
-   <td style="text-align:right;"><img src="./qr_r3_g+.png"  width="130" height="130" style="margin-top:7px; margin-left:0px; margin-right:0px;"/></td>
-   <td></td>
-   </tr>
-   </table>
- </td>
-  </td><td style="vertical-align:top;">
-   <!-- Google Plus Wall ------------------------ -->
-   <div class="gpluswall" style="margin-left:auto; margin-right:auto;">
-    <p class="topic">Google+</p>
-    <div id="gplusevents">Lädt ...</div>
-     </td></tr>
-  </table>
-</body>
-</html>
diff --git a/raspberry-kiosk/kiosk768x1366sensors.html b/raspberry-kiosk/kiosk768x1366sensors.html
deleted file mode 100644 (file)
index cfdc786..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-  <head>
-  <meta charset="utf-8">
-  <title>Realraum Kiosk Seite</title>
-  <link rel="stylesheet" href="kiosk.css" type="text/css" />
-  <script type="text/javascript" src="/jquery.min.js"></script>
-  <!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
-  <!--script src="/purl.js"></script-->
-  <script type="text/javascript" src="kiosk.js"></script>
- </head>
- <body style="max-width:768px; max-height:1366px; font-size:19px;">
-  <div id="dateclock"></div>
-  <div id="siteheader">Neuigkeiten auf <span style="font-size:110%;">http://realraum.at</span></div>  
-  <div id="headerphoto" class="headerphoto">
-  <img class="headerphoto" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
-  </div>
-  <!-- Calendar ------------------------ -->
-  <div class="calendar">
-    <p class="topic">Veranstaltungskalender</p>
-    <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
-  </div>
-   <!-- Sensor Data ------------------------ -->
-  <div class="sensorgraphs"  style="width:100%;">
-    <p class="topic">Sensordaten</p>
-    <div class="sensorelem">
-    <table class="status" style="">
-    <tr><td id="anwesenheit_status_kiosk" style="height:100px; border:0px none black;">Lädt ...</td></tr>
-    <tr><td id="sensor_status" style="border:0px none black; margin-top:5px;">Lädt ...</td></tr>
-    </table>
-    </div>
-    <div class="sensorelem">
-     <img id="tempsensor" class="sensorimg" src="http://realraum.at/shmcache/temp0.png"/>
-    </div>
-    <div class="sensorelem">
-      <img id="lightsensor" class="sensorimg" src="http://realraum.at/shmcache/light0.png"/>
-    </div>
-    <div class="sensorelem">
-      <img id="movementsensor" class="sensorimg" src="http://realraum.at/shmcache/movement.png"/>
-    </div>
-  </div>
-</body>
-</html>
diff --git a/raspberry-kiosk/kiosk900x1440.html b/raspberry-kiosk/kiosk900x1440.html
deleted file mode 100644 (file)
index 355e29f..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<html>
-  <head>
-  <meta charset="utf-8">
-  <title>Realraum Kiosk Seite</title>
-  <link rel="stylesheet" href="kiosk.css" type="text/css" />
-  <script type="text/javascript" src="/jquery.min.js"></script>
-  <!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
-   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
-   <script type="text/javascript">
-      google.load('visualization', '1', {packages: ['corechart']});
-  </script>
-  <script type="text/javascript" src="kiosk.js"></script>
- </head>
- <body style="max-width:900px; max-height:1440px;">
-  <div id="dateclock"></div>
-  <div id="siteheader">Neuigkeiten auf <span style="font-size:110%;">http://realraum.at</span></div>
-  <div id="headerphoto" class="headerphoto">
-  <img class="headerphoto" src="http://pix.realraum.at/d/3748-4/DSC07356.JPG"></img>
-  </div>
-  <!-- Calendar ------------------------ -->
-  <div class="calendar" style="font-size:99%;">
-    <p class="topic">Veranstaltungskalender</p>
-    <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
-  </div>
- <table border="0" cellpadding="0" cellspacing="0"><tr>
- <!-- Sensor Data ------------------------ -->
- <td style="vertical-align:top; padding-right:2px;">
-  <div class="sensorgraphs">
-    <p class="topic">Sensordaten</p>
-    <div class="sensorelem">
-    <table class="status" style="">
-    <tr><td id="anwesenheit_status_kiosk" style="height:100px; border:0px none black;">Lädt ...</td></tr>
-    <tr><td id="sensor_status" style="border:0px none black; margin-top:5px;">Lädt ...</td></tr>
-    </table>
-    <img src="./qr_realraum.at.png" width="250" height="250" style="margin-top:7px; margin-left:0px; margin-right:5px;"/><br/><br/>
-    <img src="./qr_r3_g+.png"  width="250" height="250" style="margin-top:7px; margin-left:0px; margin-right:0px;"/>
-    </div>
-    <!--div class="sensorelem" id="tempgooglegraph" style="height:300px;"></div>
-    <div class="sensorelem" id="lightgooglegraph" style="height:300px;"></div>
-  <div class="sensorelem" id="movementgooglegraph" style="height:300px;"></div-->
-  </div>
-
-  </td><td style="vertical-align:top;">
-   <!-- Google Plus Wall ------------------------ -->
-   <div class="gpluswall">
-    <p class="topic">Google+</p>
-    <div id="gplusevents">Lädt ...</div>
-   </div>
-  </td></tr>
-  </table>
-</body>
-</html>
diff --git a/raspberry-kiosk/restart-kiosk b/raspberry-kiosk/restart-kiosk
deleted file mode 100644 (file)
index cb6f3fb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# cron.d/restart-kiosk - restart midori and unclutter (memory gets filled up...)
-#
-42 4 * * 1 pi /usr/local/bin/start-kiosk.sh
-10 19 * * 5 pi /usr/local/bin/start-kiosk.sh
diff --git a/raspberry-kiosk/start-kiosk.sh b/raspberry-kiosk/start-kiosk.sh
deleted file mode 100644 (file)
index edb4366..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-KIOSKURI_DEFAULT="http://www.realraum.at/kiosk900x1440.html"
-KIOSKURI_900x1440="http://www.realraum.at/kiosk900x1440.html"
-KIOSKURI_768x1366="http://www.realraum.at/kiosk768x1366.html"
-KIOSKURI_1024x768="http://www.realraum.at/kiosk1024x768.html"
-#KIOSKURI="http://grical.realraum.at"
-#KIOSKURI="http://radi-o-matic.helsinki.at/nextshows/index.php?len=11"
-sleep 1
-
-killall midori 2> /dev/null
-killall unclutter 2> /dev/null
-killall chromium 2> /dev/null
-
-sleep 5
-export DISPLAY=:0.0
-
-xset dpms 0 0 0
-xset dpms force on
-xset s off
-xset s noblank
-RESOLUTION=$(xrandr -q | awk -F'current' -F',' 'NR==1 {gsub("( |current)","");print $2}')
-KIOSKURI=$(eval echo -n \${KIOSKURI_${RESOLUTION}:-$KIOSKURI_DEFAULT})
-unclutter &
-midori -e Fullscreen -a "$KIOSKURI"
-#chromium --kiosk --incognito "$KIOSKURI"
-
-exit 0