Servus
Hysterese geht über "SetFloorHeatDelta
Ergebnis ist dann im „HeatDelta“ und am Bedienpanel zu sehen
Hier das Highchart Script für die Anzeige.
Es muß das HighchartsPHP Paket installiert sein → Forumsuche für Details. Das ist schon recht alt, aber läuft noch immer.
- Kommentare muß ich noch mal reinmachen und den Plot noch mehr aufhübschen, so ganz gefällt er mir noch nicht.
<?php
$Offset = getValue(35539);
$OutHigh = getValue(11086) ;
$OutLow = getValue(45139) ;
$TargetHigh = getValue(44420) + $Offset ;
$TargetLow = getValue(43465) + $Offset ;
if ($Offset > 5) {
$OutHigh = $Offset ;
$OutLow = $Offset ;
$TargetHigh = $Offset;
$TargetLow = $Offset;
}
$OutActual = GetValue(10960);
$TargetActual = GetValue(15061);
if (!isset($_IPS['getHTML'])){
$idOfContentVariable = IPS_GetParent($_IPS['SELF']); // eine String Variable mit Profil ~HTML
$scriptId = $_IPS['SELF'];
$s = "<iframe src='./user/IPS-Highcharts.php?ScriptId=$scriptId' width='100%' height='350' frameborder='0' scrolling='no' ></iframe>";
SetValueString($idOfContentVariable, $s);
return;
}
require_once "Ghunti/HighchartsPHP/Highchart.php";
require_once "Ghunti/HighchartsPHP/HighchartJsExpr.php";
require_once "Ghunti/HighchartsPHP/HighchartOption.php";
require_once "Ghunti/HighchartsPHP/HighchartOptionRenderer.php";
use Ghunti\HighchartsPHP\Highchart;
use Ghunti\HighchartsPHP\HighchartJsExpr;
$chart = new Highchart();
$chart->includeExtraScripts();
$chart->credits = array (
'enabled' => false
);
$chart->exporting = array (
'enabled' => false
);
$chart->chart = array(
'type' => 'line',
'backgroundColor' => "rgba(255,255,255, 0.0)",
'plotBorderWidth' => 0,
'plotBackgroundImage' => null,
'height' => 350
);
$chart->title->text = '';
$chart->title->style->color = '#FFFFFF';
$chart->yAxis = array(
array(
'title' => array(
'text' => 'Vorlauftemperatur °'
),
'minorTickPosition' => 'outside',
'tickPosition' => 'outside',
# 'tickInterval' => 1,
'labels' => array(
'style' => array(
'color' => '#FFFFFF'
),
)
),
);
$chart->xAxis = array(
array(
'title' => array(
'text' => 'Außentemperatur °'
),
'minorTickPosition' => 'outside',
'tickPosition' => 'outside',
'tickInterval' => 1,
'labels' => array(
# 'step' => 1,
'style' => array(
'color' => '#FFFFFF'
),
)
),
);
$chart->legend->enabled = false;
$chart->plotOptions->line->dataLabels->enabled = false;
$chart->series ->color = 'rgba(255,0,2,10)';
$chart->series = array(
array(
'color' => 'rgba(50,30,250,1)',
'data' => array([-15,$TargetHigh],[$OutLow,$TargetHigh],[$OutHigh,$TargetLow],[15,$TargetLow])
),
array(
'color' => 'rgba(255,0,0,1)',
'data' => array([$OutActual,$TargetActual])
)
);
// Tooltip
$chart->tooltip->followPointer = false;
$chart->tooltip->backgroundColor = 'rgba(0,0,0, 0.0)';
# $chart->tooltip->shared = true;
# $chart->tooltip->crosshairs[0] = array('width' =>1,'color' =>'yellow' );
# $chart->tooltip->crosshairs[1] = array('width' =>1,'color' =>'yellow' );
$chart->tooltip->style->color = 'rgba(255,255,255, 0.9)';
$chart->tooltip->pointFormat ='<tr><td style="text-align: right">/ {point.y}</td></tr>';
ob_start();
$chart->printScripts();
$hc_scripts = ob_get_contents();
ob_end_clean();
$hc_renderOptions = $chart->renderOptions();
//echo $hc_renderOptions;
//return;
$s='
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
'.$hc_scripts.'
</head>
<body>
<div id="container"></div>
<script type="text/javascript" >
$(\'#container\').highcharts(
'. $hc_renderOptions . ',
);
</script>
</body>
</html>';
echo $s;
?>