Homematic und Google Apps

Problemlösungen und Hinweise von allgemeinem Interesse zur Haussteuerung mit HomeMatic

Moderator: Co-Administratoren

wolf33
Beiträge: 15
Registriert: 23.12.2014, 15:03

Re: Homematic und Google Apps

Beitrag von wolf33 » 20.11.2016, 15:39

Ja, Urlaub ist als Systemvariable als Logikwert angelegt.
URL habe ich eben nochmal überprüft - funktioniert auch.

Dein Script hilft leider auch nicht weiter :-(

Benutzeravatar
HMside
Beiträge: 625
Registriert: 22.10.2012, 18:14
Danksagung erhalten: 7 Mal

Re: Homematic und Google Apps

Beitrag von HMside » 20.11.2016, 20:26

Prüfe mal ob deine CCU überhaupt mit der Außenwelt kommunizieren kann.

Code: Alles auswählen

string stderr;
string stdout;
integer Auslese;
system.Exec("ping -c 1 www.google.de",&stdout, &stderr);
Auslese = stdout.Find("ms");
if ( Auslese == -1 )
{
WriteLine("CCU ist NICHT mit der Welt verbunden");
}
if ( Auslese > 0)
{
WriteLine('CCU ist mit der Welt verbunden');
}
Schaue zudem mal nach der Ausführung deines Scripts im CUxD Log nach, dort sollte es eine Fehlermeldung geben.

Benutzeravatar
AndiN
Beiträge: 2621
Registriert: 10.06.2015, 08:54
Wohnort: Hennef
Hat sich bedankt: 10 Mal
Danksagung erhalten: 28 Mal

Re: Homematic und Google Apps

Beitrag von AndiN » 21.11.2016, 08:19

Hallo,

ich habe jetzt nicht Alles gelesen und auf Seite 10 gab es gleiches Problem und die ganzen Seiten zuvor.

Ich würde mal testen was oben geschrieben wurde (mit Außenwelt verbunden). Denke das wird aber der Fall sein. Sonst hättest Du noch andere Fehler.

Dann würde ich mal testen, was überhaupt zurück kommt über das Skript. Bau mal ein "WriteLine(v);" unten sein.

Code: Alles auswählen

var url="https://script.google.com/macros/s/xxxxxx/exec";
var cmd = "LD_LIBRARY_PATH=/usr/local/addons/cuxd /usr/local/addons/cuxd/curl --trace-ascii /var/log/curl.trace -s -k -L " # url # "?cmd=urlaub";
dom.GetObject("CUxD.CUX2801001:1.CMD_SETS").State(cmd);
dom.GetObject("CUxD.CUX2801001:1.CMD_QUERY_RET").State(1);
var v = dom.GetObject("CUxD.CUX2801001:1.CMD_RETS").State();
WriteLine(v);
Und Du bekommst die 1 im Browser zurück, ohne, dass Du dich bei Google einloggen musstest? Also Browser zu. Browser auf (vielleicht auch mal einen zweiten Browser testen) und dort direkt die URL eingegeben und die 1 kommt? Nicht, dass Du die Abfrage anonym nicht durchführen kannst. Dann kommt die CCU auch nicht dran.

Daher würde ich mit o.a. Skript starten um zu sehen: Was bekommt sie bei Abruf der CCU angezeigt? Denke mit dem Ergebnis kommst Du/wir hier weiter.

Andi
Zuletzt geändert von alchy am 21.11.2016, 08:32, insgesamt 1-mal geändert.
Grund: Code in Codetags posten :-(
Andi (Greenhorn)

Letzter Reboot: 17.03.24 => FW Update (Uptime:Rekord:153 Tage)
Systeminfos: Raspberry Pi3 Firmware: 3.75.6.20240316 142 Geräte
System angebunden: 3 Roomba 650 - Sprachausgabe via Home24 Media - Pocket Control
- Zentrale: Asus TF103 mit Home24 Tablet
Addons: Drucken 2.5 - HQ WebUI 2.5.9 - XML-API 1.22 - CUx-Daemon 2.9.3 - E-Mail 1.7.4 - hm_pdetect 1.11 - VPN cloudmatic
Diverse Links

wolf33
Beiträge: 15
Registriert: 23.12.2014, 15:03

Re: Homematic und Google Apps

Beitrag von wolf33 » 21.11.2016, 19:21

Hallo,
ich habe die beiden Scripte ausgetestet.
Das erste verlief positiv - die Zentrale ist mit der Welt verbunden.

Dieses hier hingegen war negativ:

Code: Alles auswählen

var url="https://script.google.com/macros/s/xxxxxx/exec";
var cmd = "LD_LIBRARY_PATH=/usr/local/addons/cuxd /usr/local/addons/cuxd/curl --trace-ascii /var/log/curl.trace -s -k -L " # url # "?cmd=urlaub";
dom.GetObject("CUxD.CUX2801001:1.CMD_SETS").State(cmd);
dom.GetObject("CUxD.CUX2801001:1.CMD_QUERY_RET").State(1);
var v = dom.GetObject("CUxD.CUX2801001:1.CMD_RETS").State();
WriteLine(v);
und hat folgendes ausgeworfen:

Code: Alles auswählen

 !DOCTYPE html 
 html lang="en" 
   head 
   meta charset="utf-8" 
   meta content="width=300, initial-scale=1" name="viewport" 
   meta name="description" content="Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free." 
   meta name="google-site-verification" content="LrdTUW9psUAMbh4Ia074-BPEVmcpBxF6Gwf0MSgQXZs" 
   title Meet Google Drive – One place for all your files /title 
   style 
  @font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300;
  src: local('Open Sans Light'), local('OpenSans-Light'), url(//fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTYnF5uFdDttMLvmWuJdhhgs.ttf) format('truetype');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf) format('truetype');
}
   /style 
   style 
  h1, h2 {
  -webkit-animation-duration: 0.1s;
  -webkit-animation-name: fontfix;
  -webkit-animation-iteration-count: 1;
  -webkit-animation-timing-function: linear;
  -webkit-animation-delay: 0;
  }
  @-webkit-keyframes fontfix {
  from {
  opacity: 1;
  }
  to {
  opacity: 1;
  }
  }
   /style 
 style 
  html, body {
  font-family: Arial, sans-serif;
  background: #fff;
  margin: 0;
  padding: 0;
  border: 0;
  position: absolute;
  height: 100%;
  min-width: 100%;
  font-size: 13px;
  color: #404040;
  direction: ltr;
  -webkit-text-size-adjust: none;
  }
  button,
  input[type=button],
  input[type=submit] {
  font-family: Arial, sans-serif;
  font-size: 13px;
  }
  a,
  a:hover,
  a:visited {
  color: #427fed;
  cursor: pointer;
  text-decoration: none;
  }
  a:hover {
  text-decoration: underline;
  }
  h1 {
  font-size: 20px;
  color: #262626;
  margin: 0 0 15px;
  font-weight: normal;
  }
  h2 {
  font-size: 14px;
  color: #262626;
  margin: 0 0 15px;
  font-weight: bold;
  }
  input[type=email],
  input[type=number],
  input[type=password],
  input[type=tel],
  input[type=text],
  input[type=url] {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  height: 36px;
  padding: 0 8px;
  margin: 0;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-top: 1px solid #c0c0c0;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -moz-border-radius: 1px;
  -webkit-border-radius: 1px;
  border-radius: 1px;
  font-size: 15px;
  color: #404040;
  }
  input[type=email]:hover,
  input[type=number]:hover,
  input[type=password]:hover,
  input[type=tel]:hover,
  input[type=text]:hover,
  input[type=url]:hover {
  border: 1px solid #b9b9b9;
  border-top: 1px solid #a0a0a0;
  -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  }
  input[type=email]:focus,
  input[type=number]:focus,
  input[type=password]:focus,
  input[type=tel]:focus,
  input[type=text]:focus,
  input[type=url]:focus {
  outline: none;
  border: 1px solid #4d90fe;
  -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  }
  input[type=checkbox],
  input[type=radio] {
  -webkit-appearance: none;
  display: inline-block;
  width: 13px;
  height: 13px;
  margin: 0;
  cursor: pointer;
  vertical-align: bottom;
  background: #fff;
  border: 1px solid #c6c6c6;
  -moz-border-radius: 1px;
  -webkit-border-radius: 1px;
  border-radius: 1px;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  position: relative;
  }
  input[type=checkbox]:active,
  input[type=radio]:active {
  background: #ebebeb;
  }
  input[type=checkbox]:hover {
  border-color: #c6c6c6;
  -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  }
  input[type=radio] {
  -moz-border-radius: 1em;
  -webkit-border-radius: 1em;
  border-radius: 1em;
  width: 15px;
  height: 15px;
  }
  input[type=checkbox]:checked,
  input[type=radio]:checked {
  background: #fff;
  }
  input[type=radio]:checked::after {
  content: '';
  display: block;
  position: relative;
  top: 3px;
  left: 3px;
  width: 7px;
  height: 7px;
  background: #666;
  -moz-border-radius: 1em;
  -webkit-border-radius: 1em;
  border-radius: 1em;
  }
  input[type=checkbox]:checked::after {
  content: url(https://ssl.gstatic.com/ui/v1/menu/checkmark.png);
  display: block;
  position: absolute;
  top: -6px;
  left: -5px;
  }
  input[type=checkbox]:focus {
  outline: none;
  border-color: #4d90fe;
  }
  .stacked-label {
  display: block;
  font-weight: bold;
  margin: .5em 0;
  }
  .hidden-label {
  position: absolute !important;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
  height: 0px;
  width: 0px;
  overflow: hidden;
  visibility: hidden;
  }
  input[type=checkbox].form-error,
  input[type=email].form-error,
  input[type=number].form-error,
  input[type=password].form-error,
  input[type=text].form-error,
  input[type=tel].form-error,
  input[type=url].form-error {
  border: 1px solid #dd4b39;
  }
  .error-msg {
  margin: .5em 0;
  display: block;
  color: #dd4b39;
  line-height: 17px;
  }
  .help-link {
  background: #dd4b39;
  padding: 0 5px;
  color: #fff;
  font-weight: bold;
  display: inline-block;
  -moz-border-radius: 1em;
  -webkit-border-radius: 1em;
  border-radius: 1em;
  text-decoration: none;
  position: relative;
  top: 0px;
  }
  .help-link:visited {
  color: #fff;
  }
  .help-link:hover {
  color: #fff;
  background: #c03523;
  text-decoration: none;
  }
  .help-link:active {
  opacity: 1;
  background: #ae2817;
  }
  .wrapper {
  position: relative;
  min-height: 100%;
  }
  .content {
  padding: 0 44px;
  }
  .main {
  padding-bottom: 100px;
  }
  /* For modern browsers */
  .clearfix:before,
  .clearfix:after {
  content: "";
  display: table;
  }
  .clearfix:after {
  clear: both;
  }
  /* For IE 6/7 (trigger hasLayout) */
  .clearfix {
  zoom:1;
  }
  .google-header-bar {
  height: 71px;
  border-bottom: 1px solid #e5e5e5;
  overflow: hidden;
  }
  .header .logo {
  background-image: url(https://ssl.gstatic.com/accounts/ui/logo_1x.png);
  background-size: 116px 38px;
  background-repeat: no-repeat;
  margin: 17px 0 0;
  float: left;
  height: 38px;
  width: 116px;
  }
  .header .logo-w {
  background-image: url(https://ssl.gstatic.com/images/branding/googlelogo/1x/googlelogo_color_112x36dp.png);
  background-size: 112px 36px;
  margin: 21px 0 0;
  }
  .header .secondary-link {
  margin: 28px 0 0;
  float: right;
  }
  .header .secondary-link a {
  font-weight: normal;
  }
  .google-header-bar.centered {
  border: 0;
  height: 108px;
  }
  .google-header-bar.centered .header .logo {
  float: none;
  margin: 40px auto 30px;
  display: block;
  }
  .google-header-bar.centered .header .secondary-link {
  display: none
  }
  .google-footer-bar {
  position: absolute;
  bottom: 0;
  height: 35px;
  width: 100%;
  border-top: 1px solid #e5e5e5;
  overflow: hidden;
  }
  .footer {
  padding-top: 7px;
  font-size: .85em;
  white-space: nowrap;
  line-height: 0;
  }
  .footer ul {
  float: left;
  max-width: 80%;
  min-height: 16px;
  padding: 0;
  }
  .footer ul li {
  color: #737373;
  display: inline;
  padding: 0;
  padding-right: 1.5em;
  }
  .footer a {
  color: #737373;
  }
  .lang-chooser-wrap {
  float: right;
  display: inline;
  }
  .lang-chooser-wrap img {
  vertical-align: top;
  }
  .lang-chooser {
  font-size: 13px;
  height: 24px;
  line-height: 24px;
  }
  .lang-chooser option {
  font-size: 13px;
  line-height: 24px;
  }
  .hidden {
  height: 0px;
  width: 0px;
  overflow: hidden;
  visibility: hidden;
  display: none !important;
  }
  .banner {
  text-align: center;
  }
  .card {
  background-color: #f7f7f7;
  padding: 20px 25px 30px;
  margin: 0 auto 25px;
  width: 304px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  -moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  }
  .card   *:first-child {
  margin-top: 0;
  }
  .rc-button,
  .rc-button:visited {
  display: inline-block;
  min-width: 46px;
  text-align: center;
  color: #444;
  font-size: 14px;
  font-weight: 700;
  height: 36px;
  padding: 0 8px;
  line-height: 36px;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -o-transition: all 0.218s;
  -moz-transition: all 0.218s;
  -webkit-transition: all 0.218s;
  transition: all 0.218s;
  border: 1px solid #dcdcdc;
  background-color: #f5f5f5;
  background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1);
  background-image: -moz-linear-gradient(top,#f5f5f5,#f1f1f1);
  background-image: -ms-linear-gradient(top,#f5f5f5,#f1f1f1);
  background-image: -o-linear-gradient(top,#f5f5f5,#f1f1f1);
  background-image: linear-gradient(top,#f5f5f5,#f1f1f1);
  -o-transition: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
  }
  .card .rc-button {
  width: 100%;
  padding: 0;
  }
  .rc-button.disabled,
  .rc-button[disabled] {
  opacity: .5;
  filter: alpha(opacity=50);
  cursor: default;
  pointer-events: none;
  }
  .rc-button:hover {
  border: 1px solid #c6c6c6;
  color: #333;
  text-decoration: none;
  -o-transition: all 0.0s;
  -moz-transition: all 0.0s;
  -webkit-transition: all 0.0s;
  transition: all 0.0s;
  background-color: #f8f8f8;
  background-image: -webkit-linear-gradient(top,#f8f8f8,#f1f1f1);
  background-image: -moz-linear-gradient(top,#f8f8f8,#f1f1f1);
  background-image: -ms-linear-gradient(top,#f8f8f8,#f1f1f1);
  background-image: -o-linear-gradient(top,#f8f8f8,#f1f1f1);
  background-image: linear-gradient(top,#f8f8f8,#f1f1f1);
  -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  }
  .rc-button:active {
  background-color: #f6f6f6;
  background-image: -webkit-linear-gradient(top,#f6f6f6,#f1f1f1);
  background-image: -moz-linear-gradient(top,#f6f6f6,#f1f1f1);
  background-image: -ms-linear-gradient(top,#f6f6f6,#f1f1f1);
  background-image: -o-linear-gradient(top,#f6f6f6,#f1f1f1);
  background-image: linear-gradient(top,#f6f6f6,#f1f1f1);
  -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  }
  .rc-button-submit,
  .rc-button-submit:visited {
  border: 1px solid #3079ed;
  color: #fff;
  text-shadow: 0 1px rgba(0,0,0,0.1);
  background-color: #4d90fe;
  background-image: -webkit-linear-gradient(top,#4d90fe,#4787ed);
  background-image: -moz-linear-gradient(top,#4d90fe,#4787ed);
  background-image: -ms-linear-gradient(top,#4d90fe,#4787ed);
  background-image: -o-linear-gradient(top,#4d90fe,#4787ed);
  background-image: linear-gradient(top,#4d90fe,#4787ed);
  }
  .rc-button-submit:hover {
  border: 1px solid #2f5bb7;
  color: #fff;
  text-shadow: 0 1px rgba(0,0,0,0.3);
  background-color: #357ae8;
  background-image: -webkit-linear-gradient(top,#4d90fe,#357ae8);
  background-image: -moz-linear-gradient(top,#4d90fe,#357ae8);
  background-image: -ms-linear-gradient(top,#4d90fe,#357ae8);
  background-image: -o-linear-gradient(top,#4d90fe,#357ae8);
  background-image: linear-gradient(top,#4d90fe,#357ae8);
  }
  .rc-button-submit:active {
  background-color: #357ae8;
  background-image: -webkit-linear-gradient(top,#4d90fe,#357ae8);
  background-image: -moz-linear-gradient(top,#4d90fe,#357ae8);
  background-image: -ms-linear-gradient(top,#4d90fe,#357ae8);
  background-image: -o-linear-gradient(top,#4d90fe,#357ae8);
  background-image: linear-gradient(top,#4d90fe,#357ae8);
  -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  }
  .rc-button-red,
  .rc-button-red:visited {
  border: 1px solid transparent;
  color: #fff;
  text-shadow: 0 1px rgba(0,0,0,0.1);
  background-color: #d14836;
  background-image: -webkit-linear-gradient(top,#dd4b39,#d14836);
  background-image: -moz-linear-gradient(top,#dd4b39,#d14836);
  background-image: -ms-linear-gradient(top,#dd4b39,#d14836);
  background-image: -o-linear-gradient(top,#dd4b39,#d14836);
  background-image: linear-gradient(top,#dd4b39,#d14836);
  }
  .rc-button-red:hover {
  border: 1px solid #b0281a;
  color: #fff;
  text-shadow: 0 1px rgba(0,0,0,0.3);
  background-color: #c53727;
  background-image: -webkit-linear-gradient(top,#dd4b39,#c53727);
  background-image: -moz-linear-gradient(top,#dd4b39,#c53727);
  background-image: -ms-linear-gradient(top,#dd4b39,#c53727);
  background-image: -o-linear-gradient(top,#dd4b39,#c53727);
  background-image: linear-gradient(top,#dd4b39,#c53727);
  }
  .rc-button-red:active {
  border: 1px solid #992a1b;
  background-color: #b0281a;
  background-image: -webkit-linear-gradient(top,#dd4b39,#b0281a);
  background-image: -moz-linear-gradient(top,#dd4b39,#b0281a);
  background-image: -ms-linear-gradient(top,#dd4b39,#b0281a);
  background-image: -o-linear-gradient(top,#dd4b39,#b0281a);
  background-image: linear-gradient(top,#dd4b39,#b0281a);
  -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  }
  .secondary-actions {
  text-align: center;
  }
 /style 
 style media="screen and (max-width: 800px), screen and (max-height: 800px)" 
  .google-header-bar.centered {
  height: 83px;
  }
  .google-header-bar.centered .header .logo {
  margin: 25px auto 20px;
  }
  .card {
  margin-bottom: 20px;
  }
 /style 
 style media="screen and (max-width: 580px)" 
  html, body {
  font-size: 14px;
  }
  .google-header-bar.centered {
  height: 73px;
  }
  .google-header-bar.centered .header .logo {
  margin: 20px auto 15px;
  }
  .content {
  padding-left: 10px;
  padding-right: 10px;
  }
  .hidden-small {
  display: none;
  }
  .card {
  padding: 20px 15px 30px;
  width: 270px;
  }
  .footer ul li {
  padding-right: 1em;
  }
  .lang-chooser-wrap {
  display: none;
  }
 /style 
 style media="screen and (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-device-pixel-ratio: 1.5)" 
  .header .logo {
  background-image: url(https://ssl.gstatic.com/accounts/ui/logo_2x.png);
  }
  .header .logo-w {
  background-image: url(https://ssl.gstatic.com/images/branding/googlelogo/2x/googlelogo_color_112x36dp.png);
  }
 /style 
 style 
  pre.debug {
  font-family: monospace;
  position: absolute;
  left: 0;
  margin: 0;
  padding: 1.5em;
  font-size: 13px;
  background: #f1f1f1;
  border-top: 1px solid #e5e5e5;
  direction: ltr;
  white-space: pre-wrap;
  width: 90%;
  overflow: hidden;
  }
 /style 
 style 
  .banner h1 {
  font-family: 'Open Sans', arial;
  -webkit-font-smoothing: antialiased;
  color: #555;
  font-size: 42px;
  font-weight: 300;
  margin-top: 0;
  margin-bottom: 20px;
  }
  .banner h2 {
  font-family: 'Open Sans', arial;
  -webkit-font-smoothing: antialiased;
  color: #555;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 20px;
  }
  .signin-card {
  width: 274px;
  padding: 40px 40px;
  }
  .signin-card .profile-img {
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  display: block;
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  }
  .signin-card .profile-name {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin: 10px 0 0;
  min-height: 1em;
  }
  .signin-card .profile-email {
  font-size: 16px;
  text-align: center;
  margin: 10px 0 20px 0;
  min-height: 1em;
  }
  .signin-card input[type=email],
  .signin-card input[type=password],
  .signin-card input[type=text],
  .signin-card input[type=submit] {
  width: 100%;
  display: block;
  margin-bottom: 10px;
  z-index: 1;
  position: relative;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  }
  .signin-card #Email,
  .signin-card #Passwd,
  .signin-card .captcha {
  direction: ltr;
  height: 44px;
  font-size: 16px;
  }
  .signin-card #Email + .stacked-label {
  margin-top: 15px;
  }
  .signin-card #reauthEmail {
  display: block;
  margin-bottom: 10px;
  line-height: 36px;
  padding: 0 8px;
  font-size: 15px;
  color: #404040;
  line-height: 2;
  margin-bottom: 10px;
  font-size: 14px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  }
  .one-google p {
  margin: 0 0 10px;
  color: #555;
  font-size: 14px;
  text-align: center;
  }
  .one-google p.create-account,
  .one-google p.switch-account {
  margin-bottom: 60px;
  }
  .one-google .logo-strip {
  background-repeat: no-repeat;
  display: block;
  margin: 10px auto;
  background-image: url(https://ssl.gstatic.com/accounts/ui/wlogostrip_230x17_1x.png);
  background-size: 230px 17px;
  width: 230px;
  height: 17px;
  }
 /style 
 style media="screen and (max-width: 800px), screen and (max-height: 800px)" 
  .banner h1 {
  font-size: 38px;
  margin-bottom: 15px;
  }
  .banner h2 {
  margin-bottom: 15px;
  }
  .one-google p.create-account,
  .one-google p.switch-account {
  margin-bottom: 30px;
  }
  .signin-card #Email {
  margin-bottom: 0;
  }
  .signin-card #Passwd {
  margin-top: -1px;
  }
  .signin-card #Email.form-error,
  .signin-card #Passwd.form-error {
  z-index: 2;
  }
  .signin-card #Email:hover,
  .signin-card #Email:focus,
  .signin-card #Passwd:hover,
  .signin-card #Passwd:focus {
  z-index: 3;
  }
 /style 
 style media="screen and (max-width: 580px)" 
  .banner h1 {
  font-size: 22px;
  margin-bottom: 15px;
  }
  .signin-card {
  width: 260px;
  padding: 20px 20px;
  margin: 0 auto 20px;
  }
  .signin-card .profile-img {
  width: 72px;
  height: 72px;
  -moz-border-radius: 72px;
  -webkit-border-radius: 72px;
  border-radius: 72px;
  }
 /style 
 style media="screen and (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-device-pixel-ratio: 1.5)" 
  .one-google .logo-strip {
  background-image: url(https://ssl.gstatic.com/accounts/ui/wlogostrip_230x17_2x.png);
  }
 /style 
 style 
  .remember .bubble-wrap {
  position: absolute;
  padding-top: 3px;
  -o-transition: opacity .218s ease-in .218s;
  -moz-transition: opacity .218s ease-in .218s;
  -webkit-transition: opacity .218s ease-in .218s;
  transition: opacity .218s ease-in .218s;
  left: -999em;
  opacity: 0;
  width: 314px;
  margin-left: -20px;
  }
  .remember:hover .bubble-wrap,
  .remember input:focus ~ .bubble-wrap,
  .remember .bubble-wrap:hover,
  .remember .bubble-wrap:focus {
  opacity: 1;
  left: inherit;
  }
  .bubble-pointer {
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #fff;
  width: 0;
  height: 0;
  margin-left: 17px;
  }
  .bubble {
  background-color: #fff;
  padding: 15px;
  margin-top: -1px;
  font-size: 11px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  -moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  }
  #stay-signed-in {
  float: left;
  }
  #stay-signed-in-tooltip {
  left: auto;
  margin-left: -20px;
  padding-top: 3px;
  position: absolute;
  top: 0;
  visibility: hidden;
  width: 314px;
  z-index: 1;
  }
  .dasher-tooltip {
  top: 380px;
  }
 /style 
 style media="screen and (max-width: 800px), screen and (max-height: 800px)" 
  .dasher-tooltip {
  top: 340px;
  }
 /style 
 style 
  .jfk-tooltip {
  background-color: #fff;
  border: 1px solid;
  color: #737373;
  font-size: 12px;
  position: absolute;
  z-index: 800 !important;
  border-color: #bbb #bbb #a8a8a8;
  padding: 16px;
  width: 250px;
  }
 .jfk-tooltip h3 {
  color: #555;
  font-size: 12px;
  margin: 0 0 .5em;
  }
 .jfk-tooltip-content p:last-child {
  margin-bottom: 0;
  }
  .jfk-tooltip-arrow {
  position: absolute;
  }
  .jfk-tooltip-arrow .jfk-tooltip-arrowimplbefore,
  .jfk-tooltip-arrow .jfk-tooltip-arrowimplafter {
  display: block;
  height: 0;
  position: absolute;
  width: 0;
  }
  .jfk-tooltip-arrow .jfk-tooltip-arrowimplbefore {
  border: 9px solid;
  }
  .jfk-tooltip-arrow .jfk-tooltip-arrowimplafter {
  border: 8px solid;
  }
  .jfk-tooltip-arrowdown {
  bottom: 0;
  }
  .jfk-tooltip-arrowup {
  top: -9px;
  }
  .jfk-tooltip-arrowleft {
  left: -9px;
  top: 30px;
  }
  .jfk-tooltip-arrowright {
  right: 0;
  top: 30px;
  }
  .jfk-tooltip-arrowdown .jfk-tooltip-arrowimplbefore,.jfk-tooltip-arrowup .jfk-tooltip-arrowimplbefore {
  border-color: #bbb transparent;
  left: -9px;
  }
  .jfk-tooltip-arrowdown .jfk-tooltip-arrowimplbefore {
  border-color: #a8a8a8 transparent;
  }
  .jfk-tooltip-arrowdown .jfk-tooltip-arrowimplafter,.jfk-tooltip-arrowup .jfk-tooltip-arrowimplafter {
  border-color: #fff transparent;
  left: -8px;
  }
  .jfk-tooltip-arrowdown .jfk-tooltip-arrowimplbefore {
  border-bottom-width: 0;
  }
  .jfk-tooltip-arrowdown .jfk-tooltip-arrowimplafter {
  border-bottom-width: 0;
  }
  .jfk-tooltip-arrowup .jfk-tooltip-arrowimplbefore {
  border-top-width: 0;
  }
  .jfk-tooltip-arrowup .jfk-tooltip-arrowimplafter {
  border-top-width: 0;
  top: 1px;
  }
  .jfk-tooltip-arrowleft .jfk-tooltip-arrowimplbefore,
  .jfk-tooltip-arrowright .jfk-tooltip-arrowimplbefore {
  border-color: transparent #bbb;
  top: -9px;
  }
  .jfk-tooltip-arrowleft .jfk-tooltip-arrowimplafter,
  .jfk-tooltip-arrowright .jfk-tooltip-arrowimplafter {
  border-color:transparent #fff;
  top:-8px;
  }
  .jfk-tooltip-arrowleft .jfk-tooltip-arrowimplbefore {
  border-left-width: 0;
  }
  .jfk-tooltip-arrowleft .jfk-tooltip-arrowimplafter {
  border-left-width: 0;
  left: 1px;
  }
  .jfk-tooltip-arrowright .jfk-tooltip-arrowimplbefore {
  border-right-width: 0;
  }
  .jfk-tooltip-arrowright .jfk-tooltip-arrowimplafter {
  border-right-width: 0;
  }
  .jfk-tooltip-closebtn {
  background: url("//ssl.gstatic.com/ui/v1/icons/common/x_8px.png") no-repeat;
  border: 1px solid transparent;
  height: 21px;
  opacity: .4;
  outline: 0;
  position: absolute;
  right: 2px;
  top: 2px;
  width: 21px;
  }
  .jfk-tooltip-closebtn:focus,
  .jfk-tooltip-closebtn:hover {
  opacity: .8;
  cursor: pointer;
  }
  .jfk-tooltip-closebtn:focus {
  border-color: #4d90fe;
  }
 /style 
 style media="screen and (max-width: 580px)" 
  .jfk-tooltip {
  display: none;
  }
 /style 
 style type="text/css" 
.captcha-box {
  background: #fff;
  margin: 0 0 10px;
  overflow: hidden;
  padding: 10px;
}
.captcha-box .captcha-img {
  text-align: center;
}
.captcha-box .captcha-label {
  font-weight: bold;
  display: block;
  margin: .5em 0;
}
.captcha-box .captcha-msg {
  color: #999;
  display: block;
  position: relative;
}
.captcha-box .captcha-msg .accessibility-logo {
  float: right;
  border: 0;
}
.captcha-box .audio-box {
  position: absolute;
  top: 0;
}
 /style 
 style 
.chromiumsync-custom-content {
  padding-top: 20px;
  margin-bottom: 0;
}
.form-panel {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  width: 100%;
}
.form-panel.first {
  z-index: 2;
}
.form-panel.second {
  z-index: 1;
}
.shift-form .form-panel.first {
  z-index: 1;
}
.shift-form .form-panel.second {
  z-index: 2;
}
.slide-in,
.slide-out {
  display: block;
  -webkit-transition-property: -webkit-transform, opacity;
  -moz-transition-property: -moz-transform, opacity;
  -ms-transition-property: -ms-transform, opacity;
  -o-transition-property: -o-transform, opacity;
  transition-property: transform, opacity;
  -webkit-transition-duration: 0.1s;
  -moz-transition-duration: 0.1s;
  -ms-transition-duration: 0.1s;
  -o-transition-duration: 0.1s;
  transition-duration: 0.1s;
  -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  -moz-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  -ms-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  -o-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-out {
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
.shift-form .slide-out {
  opacity: 0;
  -webkit-transform: translate3d(-120%, 0, 0);
  -moz-transform: translate3d(-120%, 0, 0);
  -ms-transform: translate3d(-120%, 0, 0);
  -o-transform: translate3d(-120%, 0, 0);
  transform: translate3d(-120%, 0, 0);
}
.slide-in {
  -webkit-transform: translate3d(120%, 0, 0);
  -moz-transform: translate3d(120%, 0, 0);
  -ms-transform: translate3d(120%, 0, 0);
  -o-transform: translate3d(120%, 0, 0);
  transform: translate3d(120%, 0, 0);
}
.shift-form .slide-in {
  opacity: 1;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
.error-msg {
  -webkit-transition: max-height 0.3s, opacity 0.3s 0s steps(10, end);
  -moz-transition: max-height 0.3s, opacity 0.3s 0s steps(10, end);
  -ms-transition: max-height 0.3s, opacity 0.3s 0s steps(10, end);
  -o-transition: max-height 0.3s, opacity 0.3s 0s steps(10, end);
  transition: max-height 0.3s, opacity 0.3s 0s steps(10, end);
  height: auto;
  max-height: 0;
  opacity: 0;
}
.has-error .error-msg {
  max-height: 3.5em;
  margin-top: 10px;
  margin-bottom: 10px;
  opacity: 1;
  visibility: visible;
}
.back-arrow {
  position: absolute;
  top: 37px;
  width: 24px;
  height: 24px;
  display: none;
  cursor: pointer;
}
.back-arrow {
  border-style: none;
}
.shift-form.back-arrow {
  display: block;
}
#link-signup {
  text-align: center;
  font-size: 14px;
}
.shift-form #link-signup{
  display: none;
}
#link-signin-different {
  display: none;
  text-align: center;
  font-size: 14px;
}
.shift-form #link-signin-different {
  display: block;
}
.signin-card #profile-name {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin: 0;
  min-height: 1em;
}
.signin-card.no-name #profile-name {
  display: none;
}
.signin-card.no-name #email-display {
  line-height: initial;
  margin-bottom: 16px;
}
.signin-card #email-display {
  display: block;
  padding: 0px 8px;
  color: rgb(64, 64, 64);
  line-height: 2;
  margin-bottom: 10px;
  font-size: 14px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.signin-card #Email {
  margin-top: 16px;
}
.need-help {
  float: right;
  text-align: right;
}
.form-panel {
  width: 274px;
}
#gaia_firstform {
  z-index: 2;
}
.signin-card {
  position: relative;
  overflow: hidden;
}
.signin-card #profile-name {
  color: #000;
}
.circle-mask {
  display: block;
  height: 96px;
  width: 96px;
  overflow: hidden;
  border-radius: 50%;
  margin-left: auto;
  margin-right: auto;
  z-index: 100;
  margin-bottom: 10px;
}
.circle {
  -webkit-transition-property: -webkit-transform;
  -moz-transition-property: -moz-transform;
  -ms-transition-property: -ms-transform;
  -o-transition-property: -o-transform;
  transition-property: transform;
  -webkit-transition-timing-function: cubic-bezier(.645,.045,.355,1);
  -moz-transition-timing-function: cubic-bezier(.645,.045,.355,1);
  -ms-transition-timing-function: cubic-bezier(.645,.045,.355,1);
  -o-transition-timing-function: cubic-bezier(.645,.045,.355,1);
  transition-timing-function: cubic-bezier(.645,.045,.355,1);
}
.circle {
  position: absolute;
  z-index: 101;
  height: 96px;
  width: 96px;
  border-radius: 50%;
  opacity: 0.99;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center center;
}
.main {
  overflow: hidden;
}
.card-mask-wrap {
  position: relative;
  width: 360px;
  margin: 0 auto;
  z-index: 1;
}
.dasher-tooltip {
  position: absolute;
  left: 50%;
  margin-left: 150px;
}
.dasher-tooltip .tooltip-pointer {
  margin-top: 15px;
}
.dasher-tooltip p {
  margin-top: 0;
}
.dasher-tooltip p span {
  display: block;
}
.card {
  margin-bottom: 0;
}
.one-google {
  padding-top: 27px;
}
#canvas {
  -webkit-transition: opacity 0.075s;
  -moz-transition: opacity 0.075s;
  -ms-transition: opacity 0.075s;
  -o-transition: opacity 0.075s;
  transition: opacity 0.075s;
  opacity: 0.01;
}
.shift-form #canvas {
  opacity: 0.99;
}
.label {
  color: #404040;
}
#account-chooser-link {
  -webkit-transition: opacity 0.3s;
  -moz-transition: opacity 0.3s;
  -ms-transition: opacity 0.3s;
  -o-transition: opacity 0.3s;
  transition: opacity 0.3s;
}
.input-wrapper {
  position: relative;
}
.google-footer-bar {
  z-index: 2;
}
 /style 
 style media="screen and (max-width: 580px)" 
.back-arrow {
  top: 17px;
}
.circle-mask {
  height: 72px;
  width: 72px;
  background-size: 72px;
}
.circle {
  height: 72px;
  width: 72px;
}
#canvas {
  height: 72px;
  width: 72px;
}
.form-panel {
  width: 256px;
}
.card-mask-wrap {
  width: 300px;
}
.signin-card {
  width: 256px;
}
.signin-card #EmailFirst {
  margin-top: 15px;
}
.one-google {
  padding-top: 22px;
}
 /style 
   /head 
   body 
   div class="wrapper" 
   div class="google-header-bar  centered" 
   div class="header content clearfix" 
   div class="logo logo-w" aria-label="Google"  /div 
   /div 
   /div 
   div class="main content clearfix" 
 div class="banner" 
 h1 
  One account. All of Google.
 /h1 
   h2 class="hidden-small" 
  Sign in to continue to Google Drive
   /h2 
 /div 
 div class="main-content 
  
  
    no-name
  
  
  
" 
 div class="card signin-card
  
    pre-shift
  
  
  
   no-name" 
   img class="circle-mask"
      
        
          src="https://ssl.gstatic.com/accounts/ui/avatar_2x.png"
        
       
   form novalidate method="post" action="https://accounts.google.com/AccountLoginInfo" id="gaia_loginform" 
   input name="Page" type="hidden" value="PasswordSeparationSignIn" 
   input type="hidden" name="GALX" value="PJLkKf14yog" 
   input type="hidden" name="gxf" value="AFoagUXGSNJW3OwIQXce3blIiYOA9I4E3A:1479752010343" 
   input type="hidden" name="continue" value="https://script.google.com/macros/s/xxx/exec?cmd=urlaub" 
   input type="hidden" name="followup" value="https://script.google.com/macros/s/xxx/exec?cmd=urlaub" 
   input type="hidden" name="service" value="wise" 
   input id="profile-information" name="ProfileInformation" type="hidden" value="" 
   input type="hidden" id="_utf8" name="_utf8" value="☃"/ 
   input type="hidden" name="bgresponse" id="bgresponse" value="js_disabled" 
   div class="form-panel first valid" id="gaia_firstform" 
   div class="slide-out " 
   div class="input-wrapper focused" 
   div id="identifier-shown" 
   div 
   label class="hidden-label" for="Email" 
  Enter your email /label 
   input id="Email" type="email" value="" spellcheck="false"
                   name="Email"
                   
                     placeholder="Enter your email"
                   
                   
                   
                    
   input id="Passwd-hidden" type="password" spellcheck="false" class="hidden" 
   /div 
   /div 
   span role="alert" class="error-msg" id="errormsg_0_Email"  /span 
   /div 
 input id="next" name="signIn" class="rc-button rc-button-submit" type="submit" value="Next" 
   a class="need-help"
        href="https://accounts.google.com/signin/usernamerecovery?continue=https%3A%2F%2Fscript.google.com%2Fmacros%2Fs%2xxxxx%2Fexec%3Fcmd%3Durlaub&service=wise&hl=en" 
  Find my account
   /a 
   /div 
   /div 
   /form 
 /div 
   div class="card-mask-wrap
    
        
     no-name" 
   div class="card-mask" 
   div class="one-google" 
   p class="create-account" 
   span id="link-signin-different" 
   a href="https://accounts.google.com/AccountChooser?continue=https%3A%2F%2Fscript.google.com%2Fmacros%2Fs%2xxxx%2Fexec%3Fcmd%3Durlaub&hl=en&service=wise" 
  Sign in with a different account
   /a 
   /span 
   span id="link-signup" 
   a href="https://accounts.google.com/SignUp?service=wise&continue=https%3A%2F%2Fscript.google.com%2Fmacros%2Fs%2xxx%2Fexec%3Fcmd%3Durlaub" 
  Create account
   /a 
   /span 
   /p 
 p class="tagline" 
  One Google Account for everything Google
 /p 
 div class="logo-strip"  /div 
   /div 
   /div 
   /div 
 /div 
   /div 
   div class="google-footer-bar" 
   div class="footer content clearfix" 
   ul id="footer-list" 
   li 
   a href="https://www.google.de/intl/en/about" target="_blank" 
  About Google
   /a 
   /li 
   li 
   a href="https://accounts.google.com/TOS?loc=DE&hl=en&privacy=true" target="_blank" 
  Privacy
   /a 
   /li 
   li 
   a href="https://accounts.google.com/TOS?loc=DE&hl=en" target="_blank" 
  Terms
   /a 
   /li 
   li 
   a href="http://www.google.com/support/accounts?hl=en" target="_blank" 
  Help
   /a 
   /li 
   /ul 
   /div 
 /div 
   /div 
 script type="text/javascript" 
  var gaia_attachEvent = function(element, event, callback) {
  if (element && element.addEventListener) {
  element.addEventListener(event, callback, false);
  } else if (element && element.attachEvent) {
  element.attachEvent('on' + event, callback);
  }
  };
  (function() {
  var gaia_hideNavBar = function() {
  setTimeout(function() {
  window.scrollTo(0, 1);
  }, 0);
  };
  gaia_attachEvent(window, 'load', gaia_hideNavBar);
  })();
 /script 
   script type="text/javascript" /* Anti-spam. Want to say hello? Contact (base64) Ym90Z3VhcmQtY29udGFjdEBnb29nbGUuY29t */(function(){eval('var E=this,H=function(d,g,z){if(g=typeof d,"object"==g)if(d){if(d instanceof Array)return"array";if(d instanceof Object)return g;if(z=Object.prototype.toString.call(d),"[object Window]"==z)return"object";if("[object Array]"==z||"number"==typeof d.length&&"undefined"!=typeof d.splice&&"undefined"!=typeof d.propertyIsEnumerable&&!d.propertyIsEnumerable("splice"))return"array";if("[object Function]"==z||"undefined"!=typeof d.call&&"undefined"!=typeof d.propertyIsEnumerable&&!d.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==g&&"undefined"==typeof d.call)return"object";return g},S=function(d,g){return d g?-1:d g?1:0},Y,I;a:{var d_=E.navigator;if(d_){var g_=d_.userAgent;if(g_){Y=g_;break a}}Y=""}var f="",zI=function(d){return(d=E.document)?d.documentMode:void 0},eE=function(d,g,z){return(z=CP,Object.prototype).hasOwnProperty.call(z,d)?z[d]:z[d]=g(d)},P=/\\b(?:MSIE|rv)[: ]([^\\);]+)(\\)|;)/.exec(Y),R=(P&&(f=P?P[1]:""),zI()),bi=null!=R&&R parseFloat(f)?String(R):f,W=function(d){return eE(d,function(g,z,C,e,b,u,F){for(C=(g=0,z=String(bi).replace(/^[\\s\\xa0]+|[\\s\\xa0]+$/g,"").split("."),String(d).replace(/^[\\s\\xa0]+|[\\s\\xa0]+$/g,"")).split("."),e=Math.max(z.length,C.length),b=0;0==g&&b e;b++){u=(F=C[b]||"",z)[b]||"";do{if(F=(u=/(\\d*)(\\D*)(.*)/.exec(u)||["","","",""],/(\\d*)(\\D*)(.*)/.exec(F))||["","","",""],0==u[0].length&&0==F[0].length)break;u=(F=(g=S(0==u[1].length?0:parseInt(u[1],10),0==F[1].length?0:parseInt(F[1],10))||S(0==u[2].length,0==F[2].length)||S(u[2],F[2]),F[3]),u)[3]}while(0==g)}return 0 =g})},Ea,CP={},H2=E.document,Dy=((Ea=H2?zI()||("CSS1Compat"==H2.compatMode?parseInt(bi,10):5):void 0,W)("9"),new function(){},function(d,g,z,C,e){for(C=(g=[],z=0);C d.length;C++)e=d.charCodeAt(C),128 e?g[z++]=e:(2048 e?g[z++]=e  6|192:(55296==(e&64512)&&C+1 d.length&&56320==(d.charCodeAt(C+1)&64512)?(e=65536+((e&1023)  10)+(d.charCodeAt(++C)&1023),g[z++]=e  18|240,g[z++]=e  12&63|128):g[z++]=e  12|224,g[z++]=e  6&63|128),g[z++]=e&63|128);return g}),B=9 =Number(Ea),ui=!W("9"),r=(W("8"),W("9"),function(d,g){this.defaultPrevented=!(this.currentTarget=(this.type=d,this.target=g),1)}),y=function(d,g,z,C){((r.call(this,d?d.type:""),this.relatedTarget=this.currentTarget=this.target=null,this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0,this).metaKey=this.shiftKey=this.altKey=this.ctrlKey=false,this.U=this.state=null,d)&&(z=this.type=d.type,this.target=d.target||d.srcElement,this.currentTarget=g,g=d.relatedTarget,C=d.changedTouches?d.changedTouches[0]:null,g||("mouseover"==z?g=d.fromElement:"mouseout"==z&&(g=d.toElement)),this.relatedTarget=g,null===C?(this.screenY=d.screenY||0,this.screenX=d.screenX||0,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.offsetY=void 0!==d.offsetY?d.offsetY:d.layerY,this.offsetX=void 0!==d.offsetX?d.offsetX:d.layerX):(this.clientY=void 0!==C.clientY?C.clientY:C.pageY,this.screenX=C.screenX||0,this.screenY=C.screenY||0,this.clientX=void 0!==C.clientX?C.clientX:C.pageX),this.U=d,this.state=d.state,this.metaKey=d.metaKey,this.altKey=d.altKey,this.shiftKey=d.shiftKey,this.ctrlKey=d.ctrlKey,this.keyCode=d.keyCode||0,this.charCode=d.charCode||("keypress"==z?d.keyCode:0),this.button=d.button,d.defaultPrevented&&this.preventDefault())},A="closure_listenable_"+((r.prototype.preventDefault=function(){this.defaultPrevented=true},function(){function d(){}y.Kj=((d.prototype=r.prototype,y).D6=r.prototype,y.prototype=new d,function(d,z,C){for(var e=Array(arguments.length-2),g=2;g arguments.length;g++)e[g-2]=arguments[g];return r.prototype[z].apply(d,e)})}(),y).prototype.preventDefault=function(d){if((y.D6.preventDefault.call(this),d=this.U,d).preventDefault)d.preventDefault();else if(d.returnValue=false,ui)try{if(d.ctrlKey||112 =d.keyCode&&123 =d.keyCode)d.keyCode=-1}catch(g){}},1E6*Math.random()|0),Ua=function(d){(d.c=null,d.A=(d.N=true,null),d.src=null,d).listener=null},FD=function(d,g,z,C,e){this.src=((this.H=(this.c=null,!!C),this).type=z,g),this.N=this.Z=false,this.key=++aQ,this.A=e,this.listener=d},T=function(d){this.src=(this.a=(this.G={},0),d)},SE=function(d,g,z,C,e,b){for(e=0;e d.length;++e)if(b=d[e],!b.N&&b.listener==g&&b.H==!!z&&b.A==C)return e;return-1},aQ=(T.prototype.add=function(d,g,z,C,e,b,u){return(u=SE((d=(b=d.toString(),this.G[b]),d||(d=this.G[b]=[],this.a++),d),g,C,e),-1) u?(g=d[u],z||(g.Z=false)):(g=new FD(g,this.src,b,!!C,e),g.Z=z,d.push(g)),g},0),h="closure_lm_"+(1E6*Math.random()|0),N=function(d,g,z,C,e,b,u){if("array"==H(g))for(b=0;b g.length;b++)N(d,g[b],z,C,e);else if(z=Yn(z),d&&d[A])d.Mv(g,z,C,e);else{if(!g)throw Error("Invalid event type");if(b=!!C,!b||B)if((u=k(d))||(d[h]=u=new T(d)),z=u.add(g,z,false,C,e),!z.c){if(z.c=((C=tm(),C.src=d,C).listener=z,C),d.addEventListener)d.addEventListener(g.toString(),C,b);else if(d.attachEvent)d.attachEvent(IQ(g.toString()),C);else throw Error("addEventListener and attachEvent are unavailable.");fP++}}},k=function(d){return(d=d[h],d instanceof T)?d:null},P2=function(d,g,z,C,e,b){if("array"==H(g))for(b=0;b g.length;b++)P2(d,g[b],z,C,e);else(z=Yn(z),d&&d[A])?d.YC(g,z,C,e):d&&(d=k(d))&&(g=d.G[g.toString()],d=-1,g&&(d=SE(g,z,!!C,e)),(z=-1 d?g[d]:null)&&RQ(z))},RQ=function(d,g,z,C,e,b,u){if("number"!=typeof d&&d&&!d.N)if((g=d.src)&&g[A])g.Cj(d);else if(C=d.c,z=d.type,g.removeEventListener?g.removeEventListener(z,C,d.H):g.detachEvent&&g.detachEvent(IQ(z),C),fP--,z=k(g)){if(e=(C=d.type,C)in z.G){e=z.G[C];b:if("string"==typeof e)b="string"==typeof d&&1==d.length?e.indexOf(d,0):-1;else{for(b=0;b e.length;b++)if(b in e&&e[b]===d)break b;b=-1}(u=0 =b)&&Array.prototype.splice.call(e,b,1),e=u}(e&&(Ua(d),0==z.G[C].length&&(delete z.G[C],z.a--)),0)==z.a&&(z.src=null,g[h]=null)}else Ua(d)},tm=function(d,g){return g=(d=W2,B)?function(z){return d.call(g.src,g.listener,z)}:function(z){if(z=d.call(g.src,g.listener,z),!z)return z}},W2=function(d,g,z,C){if(d.N)return true;if(!B){if(!g)a:{for(g=[(z=E,"window"),"event"];C=g.shift();)if(null!=z[C])z=z[C];else{g=null;break a}g=z}return(g=new y(g,this),B2)(d,g)}return B2(d,new y(g,this))},fP=0,IQ=function(d){return d in V?V[d]:V[d]="on"+d},B2=function(d,g,z,C){return(z=(C=d.A||d.src,d.listener),d.Z)&&RQ(d),z.call(C,g)},V={},n="__closure_events_fn_"+(1E9*Math.random()   0),X={},O=function(d,g){d.o=("E:"+g.message+":"+g.stack).slice(0,2048)},Ni=function(d,g,z,C){((((((((((((((((((((((((((((((((((d.J=d.F(),d.D=[],d).m=function(d,g,z,C,D,U,a,t,c){return((U=(c=(z=(C=function(d,e,b){for(b=(d=D[z.P],e=d===g,0),d=d&&d[z.P];d&&d!=U&&d!=a&&d!=t&&d!=c&&20 b;)b++,d=d[z.P];return C[z.$+e+!(!d+(b+3  3))]},D=function(){return C()},this),t=z.v,a=m,z).C,z).B,D)[z.K]=function(d){C[z.s]=d},D[z.K])(d),d=D},d).f=function(d,g,z){return(z=function(){return d},g=function(){return z()},g)[this.K]=function(g){d=g},g},J)(d,226,0),J(d,74,0),J(d,39,function(d,g,z,C,D,U){if(d=(C=(z=(D=(C=(z=(g=p(d),p)(d),p)(d),p)(d),g=d.w(g),d.w(z)),d.w(C)),d.w(D)),"object"==H(g)){for(U in D=[],g)D.push(U);g=D}for(U=(D=0,g.length);D U;D+=C)z(g.slice(D,D+C),d)}),J(d,78,[165,0,0]),J)(d,197,function(d,g){(g=p(d),d=d.w(g),P2)(d[0],d[1],d[2])}),J)(d,138,function(d,g,z){g=(g=p(d),z=p(d),d.w(g)),J(d,z,H(g))}),J)(d,11,0),J)(d,67,function(d,g,z,C,D){(z=(D=(C=(z=(g=p(d),p(d)),d.w(p(d))),d).w(p(d)),d.w(z)),J)(d,g,r_(d,z,C,D))}),J(d,233,{}),J)(d,239,[]),J)(d,66,function(d,g,z,C){(C=(g=p(d),z=p(d),p)(d),d.w(g))[d.w(z)]=d.w(C)}),J)(d,122,122),yb)(),J)(d,91,function(d,g,z,C){(C=(g=p(d),z=p(d),p)(d),J)(d,C,d.w(g)  z)}),J)(d,250,function(d){oQ(d,4)}),J(d,89,0),J)(d,240,function(d,g,z){(z=(g=p(d),p(d)),0!=d.w(g))&&J(d,226,d.w(z))}),J(d,55,function(d,g,z,C,D){for(D=(z=(g=p(d),G(d)),0),C=[];D z;D++)C.push(p(d));J(d,g,C)}),J)(d,14,function(d,g,z){z=(g=p(d),p(d)),J(d,z,""+d.w(g))}),J)(d,176,function(d,g){g=d.w(p(d)),Am(d,g)}),J)(d,4,function(d,g,z){z=(g=p(d),p)(d),J(d,z,d.w(z)+d.w(g))}),J(d,156,function(d,g,z,C){z=(g=p(d),p)(d),C=p(d),J(d,C,(d.w(g)in d.w(z))+0)}),J(d,51,function(d,g,z){z=(g=p(d),p(d)),J(d,z,function(d){return eval(d)}(d.w(g)))}),J)(d,96,function(d,g){d.Y&&(g=d.w(226),J(d,226,d.h.length),d.M.push([3,g]))}),d).zt=function(d,g){(g.push(d[0]  24|d[1]  16|d[2]  8|d[3]),g.push(d[4]  24|d[5]  16|d[6]  8|d[7]),g).push(d[8]  24|d[9]  16|d[10]  8|d[11])},J)(d,118,0),J(d,157,0),J(d,99,function(d,g){(g=M(d),J)(d,g.R,g.g.apply(g.L,g.I))}),J)(d,158,function(d){d.l(4)}),J(d,72,function(d,g,z,C){C=(g=p(d),z=p(d),p)(d),d.w(g)==d.w(z)&&J(d,C,d.w(C)+1)}),J(d,212,function(d,g,z,C,D,U,a){z=(D=(C=(g=M(d),g).L,g).g,g.I),a=z.length,0==a?U=new C[D]:1==a?U=new C[D](z[0]):2==a?U=new C[D](z[0],z[1]):3==a?U=new C[D](z[0],z[1],z[2]):4==a?U=new C[D](z[0],z[1],z[2],z[3]):d.v(22),J(d,g.R,U)}),J)(d,82,function(d){L(d,1)}),d).M=[],J)(d,9,function(){}),C=z.u||function(){},J(d,255,[]),d).Y=false,J)(d,113,function(d,g,z,C,D,U,a,t,c,c2){if(C=(g=p(d),z=G(d),""),void 0!=d.D[42])for(D=d.w(42),a=D.length,U=0;z--;)U=(U+G(d))%a,C+=D[U];else{for(C=(D=0,[]);D z;D++)C.push(p(d));for(U=D=(z=[],0);D C.length;)a=C[D++],128 a?z[U++]=String.fromCharCode(a):191 a&&224 a?(t=C[D++],z[U++]=String.fromCharCode((a&31)  6|t&63)):239 a&&365 a?(t=C[D++],c=C[D++],c2=C[D++],a=((a&7)  18|(t&63)  12|(c&63)  6|c2&63)-65536,z[U++]=String.fromCharCode(55296+(a  10)),z[U++]=String.fromCharCode(56320+(a&1023))):(t=C[D++],c=C[D++],z[U++]=String.fromCharCode((a&15)  12|(t&63)  6|c&63));C=z.join("")}J(d,g,C)}),J)(d,185,function(d){L(d,4)}),d.b=[],J(d,145,function(d,g,z){(g=p(d),z=p(d),g=d.D[g]&&d.w(g),J)(d,z,g)}),J)(d,8,function(d){oQ(d,1)}),J)(d,107,d),J)(d,169,E),J(d,180,2048),J(d,85,function(d,g,z,C){(C=(g=p(d),z=p(d),p)(d),J)(d,C,d.w(g)||d.w(z))}),J(d,0,function(d,g,z,C,D,U,a){((a=(z=(D=(g=M(d),C=g.L,g.g),g.I),z.length),0==a)?U=C[D]():1==a?U=C[D](z[0]):2==a?U=C[D](z[0],z[1]):3==a?U=C[D](z[0],z[1],z[2]):d.v(22),J)(d,g.R,U)}),J(d,79,function(d,g,z,C,D){(z=(D=(z=(g=p(d),p(d)),C=p(d),g=d.w(g),d).w(p(d)),d.w(z)),C=d.w(C),0!==g)&&(C=r_(d,C,D,1,g,z),N(g,z,C),J(d,118,[g,z,C]))}),J(d,163,function(d){L(d,2)}),J)(d,175,function(d,g,z,C){if(g=d.b.pop()){for(z=p(d);0 z;z--)C=p(d),g[C]=d.D[C];g[239]=d.D[239],d.D=g}else J(d,226,d.h.length)}),J)(d,49,function(d,g,z,C){(z=(C=(g=p(d),z=p(d),p)(d),d.w(z)),g=d.w(g),J)(d,C,g[z])}),J)(d,171,function(d,g,z,C,D){for(z=(g=[],p(d)),C=0;C z;C++)D=p(d),g.push(d.w(D));z=p(d),J(d,z,function(d,z){for(z=0;z g.length;z++)(0,g[z])(d)})}),J(d,105,TI(4)),g)&&"!"==g.charAt(0)?(d.o=g,C()):(d.h=hm(g),d.h&&d.h.length?(g=!!z.u,d.Y=g,q(d,[4,C]),d.B(),x(d,g)):(d.v(17),C()))},yb=function(d){for(d=0;64 d;++d)X[d]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(d),w["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(d)]=d;w[(X[64]="",w)["+"]=62,"/"]=63,w["="]=64},kn=function(d,g){return d[g]  24|d[g+1]  16|d[g+2]  8|d[g+3]},hm=function(d,g,z,C,e,b,u){for(z=0,g=[];z d.length;){if((u=(b=(e=(C=w[d.charAt(z++)],z d.length?w[d.charAt(z)]:0),++z,z d.length?w[d.charAt(z)]:64),++z,z d.length)?w[d.charAt(z)]:64,++z,null==C||null==e||null==b)||null==u)throw Error();(g.push(C  2|e  4),64)!=b&&(g.push(e  4&240|b  2),64!=u&&g.push(b  6&192|u))}return g},w={},G=function(d,g){return(g=p(d),g)&128&&(g=g&127|p(d)  7),g},r_=function(d,g,z,C,e,b){return function(){var u=C&1,F=[5,g,z,void 0,e,b,arguments];if(C&2&&x(d,false),u&&d.M.length)q(d,F);else return $n(d,F)}},m=function(d,g){try{Ni(this,d,g)}catch(z){O(this,z)}},Am=((I=m.prototype,I).K="toString",function(d,g){((d.b.push(d.D.slice()),d.D)[226]=void 0,J)(d,226,g)}),M=(m.prototype.w=(I.P="caller",function(d,g){if((g=this.D[d],void 0)===g)throw this.v(30,0,d),this.S;return g()}),function(d,g,z,C,e,b){for(b=(e=((g={},z=p(d),g.R=p(d),g).I=[],C=p(d)-1,p(d)),0);b C;b++)g.I.push(p(d));for((g.g=d.w(z),g).L=d.w(e);C--;)g.I[C]=d.w(g.I[C]);return g}),Z=function(d,g,z,C){for(z=(C=g-1,[]);0 =C;C--)z[g-1-C]=d  8*C&255;return z},TI=function(d,g){for(g=[];d--;)g.push(255*Math.random()|0);return g},J=((I.S={},m).prototype.he=function(d,g,z){if(3==d.length){for(z=0;3 z;z++)g[z]+=d[z];for(d=[13,8,13,12,16,5,3,(z=0,10),15];9 z;z++)g[3](g,z%3,d[z])}},function(d,g,z){if(226==g||74==g)if(d.D[g])d.D[g][d.K](z);else d.D[g]=d.f(z);else if(78!=g&&105!=g&&239!=g||!d.D[g])d.D[g]=d.m(z,d.w);157==g&&(d.i=void 0,J(d,226,d.w(226)+4))}),p=function(d,g,z){if(!((g=d.w(226),g)in d.h))throw d.v(31),d.S;return(void 0==d.i&&(d.i=kn(d.h,g-4),d.V=void 0),d.V!=g  3&&(d.V=g  3,z=[0,0,0,d.w(157)],d.O=Vb(d.i,d.V,z)),J(d,226,g+1),d.h)[g]^d.O[g%8]},Vb=function(d,g,z,C){try{for(C=0;79669387488!=C;)d+=(g  4^g   5)+g^C+z[C&3],C+=2489668359,g+=(d  4^d   5)+d^C+z[C   11&3];return[d   24,d  16&255,d  8&255,d&255,g   24,g  16&255,g  8&255,g&255]}catch(e){throw e;}},v=(I=((I.$=34,(I.s=36,m).prototype).vl=function(d,g,z,C){try{C=d[(g+2)%3],d[g]=d[g]-d[(g+1)%3]-C^(1==g?C  z:C   z)}catch(e){throw e;}},I.X=false,m.prototype),function(d,g,z,C,e,b){for((105==(e=d.w(g),g)?(g=function(d,g,z,C){if((z=(g=e.length,g)-4  3,e).T!=z){z=((C=[0,0,0,b],e).T=z,(z  3)-4);try{e.j=Vb(kn(e,z),kn(e,z+4),C)}catch(a){throw a;}}e.push(e.j[g&7]^d)},b=d.w(89)):g=function(d){e.push(d)},C)&&g(C&255),C=0,d=z.length;C d;C++)g(z[C])}),nP=function(d,g,z){return(z=d.w(226),d.h)&&z d.h.length?(J(d,226,d.h.length),Am(d,g)):J(d,226,g),d.B(z)},Yn=(m.prototype.v=function(d,g,z,C){(g=((d=(C=this.w(74),[d,C  8&255,C&255]),void 0!=z&&d.push(z),0)==this.w(239).length&&(this.D[239]=void 0,J(this,239,d)),z="",g&&(g.message&&(z+=g.message),g.stack&&(z+=":"+g.stack)),this).w(180),3) g&&(z=z.slice(0,g-3),g-=z.length+3,z=Dy(z.replace(/\\r\\n/g,"\\n")),v(this,105,Z(z.length,2).concat(z),12)),J(this,180,g)},function(d){if("function"==H(d))return d;return d[n]||(d[n]=function(g){return d.handleEvent(g)}),d[n]}),XD=(I.F=function(d){return(d=window.performance)&&d.now?function(){return d.now()|0}:function(){return+new Date}}(),function(d,g,z){if(z=d.M.pop())$n(d,z),x(d,g)}),q=((I.pj=function(d,g,z){return(g=(g^=g  13,g^=g  17,(g^g  5)&z))||(g=1),d^g},I.W=function(d,g,z,C,e,b){if(this.o)return this.o;try{e=[],b=[],C=!!d,q(this,[1,C,e,g]),q(this,[2,d,e,b]),x(this,C),z=b[0]}catch(u){O(this,u),z=this.o,d&&d(z)}return z},I).IO=function(d,g,z,C,e,b){for(b=(z=[],C=0);b d.length;b++)for(e=e  g|d[b],C+=g;7 C;)C-=8,z.push(e  C&255);return z},I.B=function(d,g,z,C,e,b,u){try{for(g=(z=5001,C=void 0,e=0,this).h.length;(--z||this.X)&&(e=this.w(226)) g;)try{J(this,74,e),b=p(this),(C=this.w(b))&&C.call?C(this):this.v(21,0,b)}catch(F){F!=this.S&&(u=this.w(122),122!=u?(J(this,u,F),J(this,122,122)):this.v(22,F))}z||this.v(33)}catch(F){try{this.v(22,F)}catch(D){O(this,D)}}return(g=this.w(233),d)&&J(this,226,d),g},function(d,g){d.M.splice(0,0,g)}),x=function(d,g){0!=d.M.length&&(g&&!Oa(d)?XD(d,g):g?d.wL(function(){XD(d,g)}):XD(d,g))},L=(m.prototype.l=function(d,g,z,C){((z=(C=(d&=(g=d&4,3),z=p(this),p)(this),this).w(z),g)&&(z=Dy((""+z).replace(/\\r\\n/g,"\\n"))),d&&v(this,C,Z(z.length,2)),v)(this,C,z)},function(d,g,z,C){for(C=(z=p(d),0);0 g;g--)C=C  8|p(d);J(d,z,C)}),Oa=((m.prototype.C=function(d,g,z,C,e,b,u,F,D,U){if((g=d[0],1)==g)g=d[2],z=d[1],g.push(this.w(78).length,this.w(105).length,this.w(255).length,this.w(180)),this.Y=z,J(this,233,d[3]),this.D[125]&&nP(this,this.w(125));else{if(2==g){for(z=((d=((0 ((0 (z=Z(this.w((g=d[2],78)).length+2,2),d=this.w(239),d).length&&v(this,78,Z(d.length,2).concat(d),15),d=this.w(11)&511,d-=this.w(78).length+5,C=this.w(105),4) C.length&&(d-=C.length+3),d)&&v(this,78,Z(d,2).concat(TI(d)),10),4) C.length&&v(this,78,Z(C.length,2).concat(C),153),TI(2)).concat(this.w(78)),d[1]=d[0]^3,d)[3]=d[1]^z[0],d[4]=d[1]^z[1],C=0,[]);C d.length;C+=3)e=d[C],u=(b=C+1 d.length)?d[C+1]:0,D=(F=C+2 d.length)?d[C+2]:0,U=e  2,e=(e&3)  4|u  4,u=(u&15)  2|D  6,D&=63,F||(D=64,b||(u=64)),z.push(X[U],X[e],X[u],X[D]);if(z=z.join(""))z="!"+z;else for(C=0,z="";C d.length;C++)b=d[C][this.K](16),1==b.length&&(b="0"+b),z+=b;return d=(this.w(78).length=g[0],this.

Benutzeravatar
HMside
Beiträge: 625
Registriert: 22.10.2012, 18:14
Danksagung erhalten: 7 Mal

Re: Homematic und Google Apps

Beitrag von HMside » 21.11.2016, 20:42

wolf33 hat geschrieben:und hat folgendes ausgeworfen:
Du wirst auf die Google Drive Startseite umgeleitet. Vermutlich hast Du die Web-App nicht korrekt eingerichtet (siehe Screenshot).
In der ersten Zeile des HomeMatic Scripts setzt Du das was im Screenshot unter 1. steht dann noch entsprechend ein.

Code: Alles auswählen

var url="Aktuelle Web-App-URL_hier_eintragen";
Das sollte es dann eigentlich gewesen sein.

Gruß
Andreas
Dateianhänge
gscript.png

wolf33
Beiträge: 15
Registriert: 23.12.2014, 15:03

Re: Homematic und Google Apps

Beitrag von wolf33 » 21.11.2016, 21:57

Oh Mann, mühsam ernährt sich das Eichhörnchen!!!
Ich hatte die Berechtigungen falsch gesetzt, damit bekomme ich hiermit nun korrekt eine "1" zurück

Code: Alles auswählen

var url="https://script.google.com/macros/s/xxxxxx/exec";
var cmd = "LD_LIBRARY_PATH=/usr/local/addons/cuxd /usr/local/addons/cuxd/curl --trace-ascii /var/log/curl.trace -s -k -L " # url # "?cmd=urlaub";
dom.GetObject("CUxD.CUX2801001:1.CMD_SETS").State(cmd);
dom.GetObject("CUxD.CUX2801001:1.CMD_QUERY_RET").State(1);
var v = dom.GetObject("CUxD.CUX2801001:1.CMD_RETS").State();
WriteLine(v);
Meine Urlaub-Variable blieb damit aber noch immer auf "0".

Nun habe ich es hiermit zum laufen bekommen :-)

Code: Alles auswählen

var url="https://script.google.com/macros/s/xxxxx/exec";
var cmd = "LD_LIBRARY_PATH=/usr/local/addons/cuxd /usr/local/addons/cuxd/curl --trace-ascii /var/log/curl.trace -s -k -L " # url # "?cmd=urlaub";
dom.GetObject("CUxD.CUX2801001:1.CMD_SETS").State(cmd);
dom.GetObject("CUxD.CUX2801001:1.CMD_QUERY_RET").State(1);
var v = dom.GetObject("CUxD.CUX2801001:1.CMD_RETS").State();
WriteLine(v);
var oUrlaub = (v);
WriteLine(oUrlaub);
if ( v == "1" )
{
dom.GetObject("Urlaub").State ( true );
}
else
{
dom.GetObject("Urlaub").State ( false );
Vielen Dank für eure Tatkräftige Unterstützung!

Stimpy
Beiträge: 153
Registriert: 29.12.2012, 01:14

Re: Homematic und Google Apps

Beitrag von Stimpy » 04.01.2017, 15:19

Hi,
ich würde mir auch gerne die Müllabfuhrtermine in Homematic, bzw. NEO anzeigen lassen.
soweit hat auch alles funkrioniert, das ich das korrekte datum des nächsten termins des gelben Sackes im Browser angezeigt bekomme.
und zwar hiermit:

https://script.google.com/macros/s/mein ... e=nextdate

jetzt bekomme ich sie diesen temin aber nicht in homematic in einer systemvariablen angezeigt.
Verscuhe jetzt schon seit Stunden den richtigen Aufruf über cuxd hinzubekommen, leider ohne Erfolg.
ich habe eine Variable als Zeichenkette angelegt mit dem Namen "gelber Sack" .

ich würde mich freuen, wenn mir einer weiterhelfen könnte.
kann es daran liegen, das ich curl nicht installiert habe?
habe nämlich gelesen, dass man curl auf der ccu2 mit cuxd nicht installieren müsste.
benutze übrigens das googlescript von DrTob
http://homematic-forum.de/forum/viewtop ... 6&start=10

Danke schonmal im vorraus.

Stimpy
Beiträge: 153
Registriert: 29.12.2012, 01:14

Re: Homematic und Google Apps

Beitrag von Stimpy » 07.01.2017, 17:40

Hi,
könntest du mir sagen, wie du dein Script in der ccu2 aussieht, mit dem du die Müllabfuhrdaten abrufst?
Ich hab schon tagelang probiert, bekomm es aber nicht hin.
Im browser bekomm ich die korrekten Daten angezeigt, aber ich bekomme keinen Systemvariablen in der ccu2 angezeigt.

mfg Stimpy



DrTob hat geschrieben:hab' das script nochmal überarbeitet, und eine zusätzlichen Modus "inNice" der "Müll-Funktionen" hinzugefügt. Dabei habe ich auch den Aufruf geändert:

cmd ist jetzt immer "muell". zusäzliche Parameter "color" und "mode"

gültige Werte für color: green, blue, brown, yellow, grey
gültige Werte für mode: nextdate + indays (alles andere, oder wenn mode nicht angegeben wird ergibt "InNice")

InNice gibt z.B. "In 8 Tagen" zurück.
Beispielaufruf für grüne Tonne:
cmd=muell&color=green


Beispielaufruf für nächstes Datum Grüne Tonne:
cmd=muell&color=green&mode=nextdate


Code: Alles auswählen

function doGet(request) {
  var answer = "1.4";
  var d = 1 * request.parameters.d;
  if (isNaN(d)){
    d = 0;
  };
  if ( request.parameters.pwd == "dasfasdfasgaetweh")
  {
    if ( request.parameters.cmd == "urlaub" )
    {
      answer = getVacation(d);
    }
    else if (request.parameters.cmd == "urlaub_ex" )
    {
      answer = getVacationEx(d);
    }
    else if (request.parameters.cmd == "events" )
    {
      answer = getEventsOfDay(d);
    }
    else if (request.parameters.cmd == "eventstomorrow" )
    {
      answer = getEventsOfDay(1);
    }
    else if ((request.parameters.cmd == "muell") && (request.parameters.color))
    {
      if (request.parameters.mode == "nextdate") 
      {
        answer = FormatedEventDate(findNextMuell(request.parameters.color));
      }
      else if (request.parameters.mode == "indays") 
      {
        answer = DaysUntilEvent(findNextMuell(request.parameters.color));
      }
      else 
      {
        answer = DaysUntilEventNice(findNextMuell(request.parameters.color));
      }
    }
  }    
  return ContentService.createTextOutput(answer);
}

function getEventsInRange(aStart, aEnd)
{
  var events = CalendarApp.getDefaultCalendar().getEvents(aStart, aEnd);
  var result = new Array;
  var eventStart = 0;
  var eventEnd = 0;
  var startTime = aStart.getTime();
  var endTime = aEnd.getTime();
  for (var i=0; i<events.length; i++)
  {
    //Zeiten testen (bug bei allDayEvents)
    //ich verzichte auf Anpassung von Start/Endzeit auf UTC, bei Abfage von ganzen Tagen sind die korrekten Events enthalten, 
    //die zusätlich von angrenzenden Tagen enthaltenen Events werden hier aussortiert.
    if ((events[i].getEndTime().getTime() > startTime) && (events[i].getStartTime().getTime() < endTime))
    {
      result.push(events[i]);  
    }
  }
  return result;
}

function daysEvents( aDate )
{
  var startOfDay = new Date(aDate);
  startOfDay.setHours(0);
  startOfDay.setMinutes(0);
  startOfDay.setSeconds(0);
  startOfDay.setMilliseconds(0);  
  var endOfDay = new Date(startOfDay.getTime() + 24 * 60 * 60 * 1000);
  return getEventsInRange(startOfDay, endOfDay);
}

function findNext( aPattern )
{
  var patt=new RegExp(aPattern,'i');
  var startDate = new Date();
  var endDate = new Date(startDate.getTime() + (24*60*60*1000*30));
  
  var events = getEventsInRange(startDate, endDate);
  for (var i=0; i<events.length; i++)
  {
    //check event title
    if (patt.test(events[i].getTitle()))
    {
      return events[i];
    }
  }
}

function findNextGreen()
{
  return findNext("grüne Tonne|Papiermüll|Papiermuell");
}

function findNextGrey()
{
  return findNext("graue Tonne|Restmüll|Restmuell");
}

function findNextYellow()
{
  return findNext("gelber Sack|gruener Punkt|gelbe Säcke|gelbe Saecke");
}

function findNextBrown()
{
  return findNext("braune Tonne|Biotonne|Biomüll|Biomuell");
}

function findNextBlue()
{
  return findNext("blaue Tonne");
}

//Events am Tag aDay ab heute (0 = heute, 1 = morgen...)
function eventsOfDay(aDay)
{
  var now = new Date();
  var day = new Date(now.getTime() + (1000*3600*24*aDay)); 
  var events = daysEvents( day );
  return events;
}

function findNextMuell( aColor )
{
  if (aColor == 'grey')
  {
    return findNextGrey();
  }
  else if (aColor == 'green')
  {
    return findNextGreen();
  }
  else if (aColor == 'blue')
  {
    return findNextBlue();
  }

  else if (aColor == 'yellow')
  {
    return findNextYellow();
  }

  else if (aColor == 'brown')
  {
    return findNextBrown();
  }
}

//Urlaub am Tag aDay (0 = heute, 1=morgen...)
function getVacation( aDay )
{
  var events = eventsOfDay( aDay );
  
  var result = "0";
  
  //add here your search definitions for vacation description and location 'home'
  var pattVacation=new RegExp('urlaub|vacation|frei','i');
  // var pattHome=new RegExp('hause|home','i');

  
  for (var i=0; i<events.length; i++)
  {
    var theTitle=events[i].getTitle();
    if ( pattVacation.test(events[i].getTitle()) && events[i].isAllDayEvent() )
    {
      result="1";
      break;
    }
  }
  
  return (result);
}

// added from http://homematic-forum.de/forum/viewtopic.php?f=31&t=11386#p84827

function getVacationEx( aDay )
//creates a bit mask including todays and tomorrows vacation information
{
  //init bit mask and flags
  var result = 0x0; //0000 - initial value
  var vacationToday = 0x1; // 0001 - today is an vacation day
  var atHomeToday = 0x2; // 0010 - vacation today is at home
  var vacationTomorrow = 0x4; // 0100 - tomorrow is an vacation day
  var atHomeTomorrow = 0x8; // 1000 - vacation tomorrow is at home
  
  //add here your search definitions for vacation description and location 'home'
  var pattVacation=new RegExp('urlaub|vacation|frei|homeoffice','i');
  var pattHome=new RegExp('hause|home','i');
  
  //get information about today's vacation
  var eventsToday = eventsOfDay(aDay);
  for (var i=0; i<eventsToday.length; i++)
  {
    //check event title
    if (pattVacation.test(eventsToday[i].getTitle()))
    {
      result = result | vacationToday;
      //
      if (pattHome.test(eventsToday[i].getTitle()) || pattHome.test(eventsToday[i].getLocation())|| pattHome.test(eventsToday[i].getDescription()))
      {
        result = result | atHomeToday;
      }
    }
  }
  
  //get information about tomorrow's vacation
  var eventsTomorrow = eventsOfDay(aDay + 1);
  for (var i=0; i<eventsTomorrow.length; i++)
  {
    if (pattVacation.test(eventsTomorrow[i].getTitle()))
    {
      result = result | vacationTomorrow;
      if (pattHome.test(eventsTomorrow[i].getTitle()) || pattHome.test(eventsTomorrow[i].getLocation())|| pattHome.test(eventsTomorrow[i].getDescription()))
      {
        result = result | atHomeTomorrow;
      }
    }
  }
  return (result.toString());
}

function getEventsOfDay( aDay )
{
  var events = eventsOfDay(aDay);
  
  var result = "";
   
  for (var i=0; i<events.length; i++)
  {
    if ( result.length > 0)  {
      result = result+";";
    }
    result = result + events[i].getTitle().toLowerCase();
  }
  
  return result;
}

function FormatedEventDate( aEvent )
{
  if (aEvent) 
  {
    var timezone = CalendarApp.getDefaultCalendar().getTimeZone();
    var res = Utilities.formatDate(aEvent.getStartTime(), timezone, "dd.MM.yyyy"); 
    return res;
  }
}

function DaysUntilEvent( aEvent )
{
  if (aEvent)
  {
    var startOfToday = new Date();
    startOfToday.setHours(0);
    startOfToday.setMinutes(0);
    startOfToday.setSeconds(0);
    startOfToday.setMilliseconds(0);   
    var differenceInMillis = aEvent.getStartTime() - startOfToday.getTime();
    return Math.floor( differenceInMillis /1000/60/60/24 );
  }
}

function DaysUntilEventNice( aEvent )
{
  result = '';
  var days = 1 * DaysUntilEvent(aEvent);
  if (!isNaN(days))
  {
    if (days == 0)
    {
      result = 'Heute';
    }
    else if (days == 1)
    {
      result = 'Morgen';
    }
    else if (days == 2)
    {
      result = 'Übermorgen';
    }
    else
    {
      result = 'In ' + days + ' Tagen';
    }
  }
  else
  {
    result = 'nicht gefunden';
  }
  return result;
}

DrTob
Beiträge: 3426
Registriert: 29.10.2010, 08:24
Danksagung erhalten: 5 Mal

Re: Homematic und Google Apps

Beitrag von DrTob » 07.01.2017, 19:44

Bin im Moment unterwegs schaue nach wenn ich zurück bin. Wenn ich bis Montag nicht geantwortet habe erinnere mich nochmal ;)

DrTob
Beiträge: 3426
Registriert: 29.10.2010, 08:24
Danksagung erhalten: 5 Mal

Re: Homematic und Google Apps

Beitrag von DrTob » 08.01.2017, 18:32

hab' noch dran gedacht :)

hier mein Script, wird täglich einmal um 0:10 Uhr ausgeführt:

(Verwendet ein Cuxd-Exec-Gerät (kanal 3) und füllt die Systemvariablen "UrlaubStatus", "Muell.Gruen", "Muell.Grau" und "Muell.Gelb" und "Muell.Nachricht")

Code: Alles auswählen

string cmd = "LD_LIBRARY_PATH=/usr/local/addons/cuxd /usr/local/addons/cuxd/curl -s -k -L 'https://script.google.com/macros/s/-/exec?pwd=XXXXXXXXXXXXXXXXXXXXX&cmd=";

dom.GetObject("CUxD.CUX2801001:3.CMD_SETS").State(cmd # "urlaub_ex'");
dom.GetObject("CUxD.CUX2801001:3.CMD_QUERY_RET").State(1);
dom.GetObject("UrlaubStatus").State(dom.GetObject("CUxD.CUX2801001:3.CMD_RETS").State());

dom.GetObject("CUxD.CUX2801001:3.CMD_SETS").State(cmd # "muell&color=green'");
dom.GetObject("CUxD.CUX2801001:3.CMD_QUERY_RET").State(1);
string gruen = dom.GetObject("CUxD.CUX2801001:3.CMD_RETS").State();
dom.GetObject("Muell.Gruen").State(gruen);

dom.GetObject("CUxD.CUX2801001:3.CMD_SETS").State(cmd # "muell&color=grey'");
dom.GetObject("CUxD.CUX2801001:3.CMD_QUERY_RET").State(1);
string grau = dom.GetObject("CUxD.CUX2801001:3.CMD_RETS").State();
dom.GetObject("Muell.Grau").State(grau);

dom.GetObject("CUxD.CUX2801001:3.CMD_SETS").State(cmd # "muell&color=yellow'");
dom.GetObject("CUxD.CUX2801001:3.CMD_QUERY_RET").State(1);
string gelb = dom.GetObject("CUxD.CUX2801001:3.CMD_RETS").State();
dom.GetObject("Muell.Gelb").State(gelb);

string msg = ' ';
if (gruen == 'Morgen'){
  if (msg == ' ')
  {
    msg = 'Morgen Papiermüll';
  }
  else
  {
    msg = msg # ' und Papiermüll';
  }
}
if (gelb == 'Morgen'){
  if (msg == ' ')
  {
    msg = 'Morgen gelbe Säcke';
  }
  else
  {
    msg = msg # ' und gelbe Säcke';
  }
}
if (grau == 'Morgen'){
  if (msg == ' ')
  {
    msg = 'Morgen Restmüll';
  }
  else
  {
    msg = msg # ' und Restmüll';
  }
}
dom.GetObject("Muell.Nachricht").State(msg);

Antworten

Zurück zu „HomeMatic Tipps & Tricks - keine Fragen!“