* inverter.php disabled stop alarm (unexplored strange behavior)
* pvoutput.php fixed validity check of day total
This commit is contained in:
@@ -67,12 +67,12 @@ while (!$bStop && !System_Daemon::isDying()) {
|
|||||||
|
|
||||||
if ($bAwake && !$bSleep) {
|
if ($bAwake && !$bSleep) {
|
||||||
/* Schedule next sleep time */
|
/* Schedule next sleep time */
|
||||||
if (!$bAlarm) {
|
/*if (!$bAlarm) {
|
||||||
$sTime = date('H:i', strtotime($sSleep));
|
$sTime = date('H:i', strtotime($sSleep));
|
||||||
System_Daemon::info(sprintf('Schedule sleep at %s', $sTime));
|
System_Daemon::info(sprintf('Schedule sleep at %s', $sTime));
|
||||||
command(sprintf('at -f %s %s 2> /dev/null', FILE_DAEMON_STOP, $sTime));
|
command(sprintf('at -f %s %s 2> /dev/null', FILE_DAEMON_STOP, $sTime));
|
||||||
$bAlarm = true;
|
$bAlarm = true;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/* Execute task */
|
/* Execute task */
|
||||||
System_Daemon::info('Running task');
|
System_Daemon::info('Running task');
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ $aSystems = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
/* Fake command line for debugging */
|
/* Fake command line for debugging */
|
||||||
//$argv = array(null, 1.5, 1234, 230, '1204DQ0116');
|
if (count($argv) < 5) {
|
||||||
|
$argv = array(null, 1.5, 1234, 230, '1204DQ0116');
|
||||||
|
}
|
||||||
|
|
||||||
/* Fetch command line arguments */
|
/* Fetch command line arguments */
|
||||||
$fToday = floatval($argv[1]); // Wh
|
$fToday = floatval($argv[1]); // Wh
|
||||||
@@ -77,7 +79,7 @@ $aToday[3] = $fTemperature;
|
|||||||
file_put_contents($sTodayFile, implode(',', $aToday));
|
file_put_contents($sTodayFile, implode(',', $aToday));
|
||||||
|
|
||||||
/* Correct today data */
|
/* Correct today data */
|
||||||
$fToday = $fToday > ((1 + MARGIN_ENERGY) * $aToday[1]) ? $aToday[1] : $fToday;
|
$fToday = abs($aToday[1] - $fToday) > (MARGIN_ENERGY * $aToday[1]) ? $aToday[1] : $fToday;
|
||||||
|
|
||||||
/* Construct PVOutput data */
|
/* Construct PVOutput data */
|
||||||
$aData = array(
|
$aData = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user