- FS20: |
+ | FS20: |
|
";
+
+ }
+?>
diff --git a/fhem/webfrontend/pgm3/index.php b/fhem/webfrontend/pgm3/index.php
index abc22edcd..bc2a8ff31 100644
--- a/fhem/webfrontend/pgm3/index.php
+++ b/fhem/webfrontend/pgm3/index.php
@@ -41,7 +41,7 @@ include "include/gnuplot.php";
include "include/functions.php";
-$pgm3version='091110';
+$pgm3version='091116';
$Action = $_POST['Action'];
$order = $_POST['order'];
@@ -50,6 +50,7 @@ $pgm3version='091110';
$kstyp = $_POST['kstyp'];
$showroom = $_POST['showroom'];
$showmenu = $_POST['showmenu'];
+ $showweath = $_POST['showweath'];
$showhmsgnu = $_POST['showhmsgnu'];
$showuserdefgnu = $_POST['showuserdefgnu'];
$temp = $_POST['temp'];
@@ -84,6 +85,10 @@ $pgm3version='091110';
if ($showfht=="") unset($showfht);
if ($showfht=="none") unset($showfht);
+ if (! isset($showweath)) $showweath=$_GET['showweath'];
+ if ($showweath=="") unset($showweath);
+ if ($showweath=="none") unset($showweath);
+
if (! isset($showmenu)) $showmenu=$_GET['showmenu'];
if ($showmenu=="") unset($showmenu);
if ($showmenu=="none") unset($showmenu);
@@ -146,12 +151,13 @@ $pgm3version='091110';
if ($showNOTI=='yes') $shownoti='yes';
if ($showHIST=='yes') $showhist='yes';
if ($showPICS=='yes') $showpics='yes';
+ if ($showWeath=='yes') $showweath='1';
}
if (isset ($showfht)) { $forwardurl=$forwardurl.'&showfht='.$showfht;};
if (isset ($fs20dev))
- { $forwardurl=$forwardurl.'&fs20dev='.$fs20dev.'&orderpulldown='.$orderpulldown.'&showmenu='.$showmenu.'&showroom='.$showroom;};
+ { $forwardurl=$forwardurl.'&fs20dev='.$fs20dev.'&orderpulldown='.$orderpulldown.'&showmenu='.$showmenu.'&showroom='.$showroom.'&showweath'.$showweath;};
if (isset ($showks)) { $forwardurl=$forwardurl.'&showks='.$showks.'&kstyp='.$kstyp;};
if (isset ($showhmsgnu)) { $forwardurl=$forwardurl.'&showhmsgnu='.$showhmsgnu;};
if (isset ($showuserdefgnu)) { $forwardurl=$forwardurl.'&showuserdefgnu='.$showuserdefgnu;};
@@ -162,6 +168,7 @@ $pgm3version='091110';
if (isset ($showpics)) { $forwardurl=$forwardurl.'&showpics';};
if (isset ($showhist)) { $forwardurl=$forwardurl.'&showhist';};
if (isset ($showfs20)) { $forwardurl=$forwardurl.'&showfs20='.$showfs20;};
+ if (isset ($showweath)) { $forwardurl=$forwardurl.'&showweath='.$showweath;};
if (isset ($showmenu))
{ $forwardurl=$forwardurl.'&fs20dev='.$fs20dev.'&orderpulldown='.$orderpulldown.'&valuetime='.$valuetime.'&showmenu='.$showmenu.'&showroom='.$showroom;}
unset($link);
@@ -170,6 +177,7 @@ $pgm3version='091110';
if (isset ($showhist)) $link=$link.'&showhist';
if (isset ($showat)) $link=$link.'&showat';
if (isset ($showmenu)) $link=$link.'&showmenu='.$showmenu;
+ if (isset ($showweath)) $link=$link.'&showweath='.$showweath;
if (isset ($showfht)) $link=$link.'&showfht='.$showfht;
if (isset ($showhmsgnu)) $link=$link.'&showhmsgnu='.$showhmsgnu;
if (isset ($showuserdefgnu)) $link=$link.'&showuserdefgnu='.$showuserdefgnu;
@@ -183,7 +191,7 @@ switch ($Action):
{
$order=str_replace("\\","",$order);
$order=str_replace("@","+",$order);
- execFHZ($order,$fhz1000,$fhz1000port);
+ execFHZ($order,$fhem,$fhemport);
}
header("Location: $forwardurl&errormessage=$errormessage");
break;
@@ -191,17 +199,17 @@ switch ($Action):
if ($atorder=='at')
{ $atorder='define '.randdefine().' '.$atorder; }
$order="$atorder $attime set $fs20dev $orderpulldown $valuetime";
- if ($kioskmode=='off') execFHZ($order,$fhz1000,$fhz1000port);
+ if ($kioskmode=='off') execFHZ($order,$fhem,$fhemport);
header("Location: $forwardurl");
Case exec3:
if ($atorder=='at')
{ $atorder='define '.randdefine().' '.$atorder; }
if (! isset($fhtdev)) {echo "FHT-Device not set - exit"; break;}
$order="$atorder $attime set $fhtdev $orderpulldown $valuetime";
- if ($kioskmode=='off') execFHZ($order,$fhz1000,$fhz1000port);
+ if ($kioskmode=='off') execFHZ($order,$fhem,$fhemport);
Case execfht:
$order="set $dofht desired-temp $temp";
- if ($kioskmode=='off') execFHZ($order,$fhz1000,$fhz1000port);
+ if ($kioskmode=='off') execFHZ($order,$fhem,$fhemport);
header("Location: $forwardurl");
break;
Case showfht|showroom|showks|showhmsgnu|hide|showuserdefgnu|showpics:
@@ -220,26 +228,39 @@ function execFHZ($order,$machine,$port)
{
global $errormessage;
-$version = explode('.', phpversion());
-if ( $version[0] == 4 )
-{
- include "config.php";
- $order="$fhz1000_pl $port '$order'"; #PHP4, only localhost
+#PHP4 is not supported any more 20091115
+#$version = explode('.', phpversion());
+
+#if ( $version[0] == 4 )
+#{
+# include "config.php";
+# $order="$fhem_pl $port '$order'"; #PHP4, only localhost
+# exec($order,$res);
+# $errormessage = $res[0];
+#}#
+#else
+#{
+if ($usenetcat=='1')
+ {
+ $order="$echo xmllist | netcat -w3 $machine $port";
exec($order,$res);
$errormessage = $res[0];
-}
-else
-{
-$fp = stream_socket_client("tcp://$machine:$port", $errno, $errstr, 30);
- if (!$fp) {
+ }
+ else
+ {
+ $fp = stream_socket_client("tcp://$machine:$port", $errno, $errstr, 30);
+ if (!$fp) {
echo "$errstr ($errno)