1
0

Debug serveur stats\nDebug

This commit is contained in:
2022-05-05 21:28:26 +02:00
parent d1f1065e44
commit 68fb0579ce
11 changed files with 159 additions and 124 deletions

View File

@ -46,14 +46,14 @@ class rdc_sdb_eclairage extends hook
logger(DEBUG, _("CASE: state_l1"), __FILE__ . ":" . __LINE__);
if ($value == "ON")
{
if ($deviceTarget->properties["state_l1"]["method"] != MANUAL)
{
$delay = $this->delay;
$deviceTarget->properties["state_l1"]["method"] = AUTO;
}else
if ($deviceTarget->properties["state_l1"]["method"] != AUTO)
{
$delay = $this->delayManual;
$deviceTarget->properties["state_l1"]["method"] = MANUAL;
}else
{
$delay = $this->delay;
$deviceTarget->properties["state_l1"]["method"] = MANUAL;
}
setDelay($deviceTarget, $delay, $this->timeUnit, "state_l1", "OFF", true, IDLE);
}elseif ($value == "OFF")

View File

@ -31,6 +31,7 @@ class rdc_store extends hook
logger(DEBUG, "Callback : RDC_STORE", __FILE__ . ":" . __LINE__);
$rain = 0;
static $rainS;
$exterieur_lux = 0;
$salon_lux = 0;
$rafale = 0;
@ -70,7 +71,9 @@ class rdc_store extends hook
{
if (array_key_exists("rainin", $indexDevices[METEO]->properties))
{
$rain = $indexDevices[METEO]->properties["rainin"]["value"];
$rainTmp = $indexDevices[METEO]->properties["rainin"]["value"];
$rain = $rainTmp - $rainS;
$rainS = $rainTmp;
logger(DEBUG, "rain=" . var_dump($rain), __FILE__ . ":" . __LINE__);
}
if (array_key_exists("windgustkmh", $indexDevices[METEO]->properties))
@ -105,7 +108,7 @@ class rdc_store extends hook
//$store2level = $this->maxLevel;
switch ($property)
{
case "illuminance_lux":
case "illuminance_lux":
logger(DEBUG, "CASE: illuminance_lux:" . $value, __FILE__ . ":" . __LINE__);
if ($exterieur_lux > 30000)
{
@ -123,7 +126,7 @@ class rdc_store extends hook
$this->set($store2level);
}
}
}elseif ($exterieur_lux < 15000 and $salon_lux < 300)
}elseif ($exterieur_lux < 15000 and $salon_lux < 110)
{
logger(DEBUG, "exterieur_lux < 15000", __FILE__ . ":" . __LINE__);
$this->close("Luminosité faible");