1
0

some debugging

This commit is contained in:
daniel Tartavel 2022-01-04 08:54:06 +01:00
parent 5224d00d5a
commit c97f05d2b6
3 changed files with 5 additions and 5 deletions

View File

@ -24,11 +24,11 @@ class availability
$log = INFO; $log = INFO;
} }
$device->availability = $value; $device->availability = $value;
logger($log, sprintf(_("Device: %s/%s is %s"), $topic, $fn , $value)); logger($log, sprintf(_("Device: %s/%s is %s"), $device->topic, $device->friendlyName, $value));
} }
break; break;
} }
echo _("notification received from MQTT") . EOL; echo sprintf(_("notification received from MQTT -> device %s is %s"), $device->friendlyName , $value). EOL;
//echo $param . "=> " . $value . EOL; //echo $param . "=> " . $value . EOL;
} }
public function getHook() public function getHook()

View File

@ -47,7 +47,7 @@ class rdc_salon_eclairage
if ($value >= $this->luminance_max) $this->send("OFF"); if ($value >= $this->luminance_max) $this->send("OFF");
break; break;
} }
logger (sprintf(_(INFO, "%s: notification received from MQTT from %s => parameter: %s value: %s"), $hookName, $device["friendlyName"], $param, $value)); logger (INFO, sprintf(_("%s: notification received from MQTT from %s => parameter: %s value: %s"), $this->hookName, $device->friendlyName, $param, $value));
} }
private function send($state) private function send($state)

View File

@ -56,7 +56,7 @@ class rdc_sdb_eclairage
} }
break; break;
} }
logger (INFO, _("%s: notification received from MQTT from %s => parameter: %s value: %s"), $hookName, $device["friendlyName"], $param, $value); logger (INFO, _("%s: notification received from MQTT from %s => parameter: %s value: %s"), $this->hookName, $device->friendlyName, $param, $value);
} }
private function send($state) private function send($state)
@ -71,5 +71,5 @@ class rdc_sdb_eclairage
} }
} }
$hooks["rdc-sdb-eclairage"] = new rdc_sdb_eclairage(); $hooks["rdc_sdb_eclairage"] = new rdc_sdb_eclairage();
?> ?>