2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 16:46:35 +00:00

MartinH: pgm3: automatic support for CUL_WS (S300TH) added

git-svn-id: https://svn.fhem.de/fhem/trunk@515 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinhaas 2009-12-19 06:20:16 +00:00
parent 85c8217c44
commit 3f1631d331
7 changed files with 22 additions and 8 deletions

View File

@ -558,4 +558,5 @@
- bugfix: 21_OWTEMP.pm Defining a device now fail when no OWFS device was defined (M.Fischer)
- bugfix: 21_OWTEMP.pm missing trigger fo notify/filelog (M.Fischer)
- feature: 99_getstate.pm get state from S555TH now (M.Fischer)
- feature: pgm3: automatic support for CUL_WS (S300TH) added (MartinH)

View File

@ -451,3 +451,6 @@
are shown in the graphics. php4 disabled. Now only php5 is supported. A
lot of examples of the UserDefs are added. The pgm3-section of fhem.html was
changed.
- Sat Dec 19 2009 (MartinH)
- pgm3: Automatic support for CUL_WS (S300TH) added

View File

@ -191,3 +191,7 @@ It is not necessary to tell fhem that there are other logs.
2009-11-16
-- New version with Battery-check, Log-Pull-Down, Google-Weather-Api
-- Changed Files: index.php, config.php, fhtpulldown.php, weather.php
2009-12-19
-- Feature: CUL_WS added. Automatic support for S300TH (eg. S555TH).
Changed: index.php, hms100.php, gnuplot.php

View File

@ -93,3 +93,6 @@
-- Feature: The status of the batteries of FHT and HMS are shown in the graphics
-- php4 disabled. Only php5 is supported.
-- A lot of examples of the UserDefs are added.
- Martin 2009-12-19
-- Feature: CUL_WS added. Automatic support for S300TH (eg. S555TH)

View File

@ -165,6 +165,7 @@ EOD;
break;
Case HMS100TF: ############################################
Case CUL_WS: ############################################
$gplotmain="
set ylabel 'Temperature (Celsius)'
set y2label 'Humidity (%)'

View File

@ -15,7 +15,7 @@ $drawhms=$_GET['drawhms'];
$room=$_GET['room'];
$type=$_GET['type'];
$battery=$_GET['battery'];
$supported_HMS= array('HMS100T','HMS100TF','HMS100WD','HMS100MG','HMS100TFK','HMS100W','RM100-2','HMS100CO');
$supported_HMS= array('HMS100T','HMS100TF','HMS100WD','HMS100MG','HMS100TFK','HMS100W','RM100-2','HMS100CO','CUL_WS');
@ -85,7 +85,7 @@ $supported_HMS= array('HMS100T','HMS100TF','HMS100WD','HMS100MG','HMS100TFK','HM
#print_r($array[1][12]); exit;
###########################################################################
if ( $type == "HMS100T" or $type == "HMS100TF" ) ## hms100t-Device.
if ( $type == "HMS100T" or $type == "HMS100TF" or $type == "CUL_WS") ## hms100t-Device.
{
for ($x = 0; $x < $counter; $x++)
@ -145,7 +145,7 @@ if ( $type == "HMS100T" or $type == "HMS100TF" ) ## hms100t-Device.
}; #HMS100T
if ( $type == "HMS100TF") ## hms100tf-Device.
if (( $type == "HMS100TF") or ( $type == "CUL_WS")) ## hms100tf-Device.
{
#Humidity...
@ -200,7 +200,7 @@ if ( $type == "HMS100TF") ## hms100tf-Device.
#############################################################################
if ( $type == "HMS100T" or $type == "HMS100TF" )
if ( $type == "HMS100T" or $type == "HMS100TF" or $type == "CUL_WS")
{
$text="Temperature";
@ -242,6 +242,7 @@ if ( $type == "HMS100TF" and $showdewpoint=='yes' )
ImageTTFText ($im, 8, 0,90-$XcorrectMainTextHMS, 22, $txtcolor, $fontttfb, $text);
$fontsize=7;
$text='Bat: '.$battery;
if ($type=="CUL_WS") $text="";
if ($battery != 'ok') {$txtcolor=$red; $text='Bat: low';};
ImageTTFText ($im, $fontsize, 0, 105, 10, $txtcolor, $fontttf, $text);
$fontsize=7;

View File

@ -41,7 +41,7 @@ include "include/gnuplot.php";
include "include/functions.php";
$pgm3version='091116a';
$pgm3version='091219';
$Action = $_POST['Action'];
$order = $_POST['order'];
@ -843,7 +843,7 @@ xml_parser_free($xml_parser);
}
}
############################
elseif (substr($stack[0][children][$i][name],0,4)=='HMS_')
elseif ((substr($stack[0][children][$i][name],0,4)=='HMS_') or (substr($stack[0][children][$i][name],0,6)=='CUL_WS'))
{
$type=$stack[0][children][$i][name];
echo "<tr><td $bg1 colspan=4><font $fontcolor1>";
@ -859,13 +859,14 @@ xml_parser_free($xml_parser);
if ( $stack[0][children][$i][children][$j][children][$k][attrs][key]=="room")
{$room=$stack[0][children][$i][children][$j][children][$k][attrs][value];
}
if ( $stack[0][children][$i][children][$j][children][$k][attrs][key]=="type")
if (( $stack[0][children][$i][children][$j][children][$k][attrs][key]=="type") or
( $stack[0][children][$i][children][$j][children][$k][attrs][key]=="TYPE") )
{$type=$stack[0][children][$i][children][$j][children][$k][attrs][value];};
}
if (($room != 'hidden') and ($showroom=='ALL' or $showroom==$room))
{
$HMSdev=$stack[0][children][$i][children][$j][attrs][name];
if ($type=="HMS100T" or $type=="HMS100TF")
if ($type=="HMS100T" or $type=="HMS100TF" or $type=="CUL_WS")
{
if ($showhmsgnu== $HMSdev) {$formvalue="hide";$gnuvalue="";}
else {$formvalue="show";$gnuvalue=$HMSdev;};