debugging
This commit is contained in:
@ -11,13 +11,13 @@ $callback = function($topic, $message)
|
||||
$topics[$topic[0]]->info = json_decode($message->payload);
|
||||
break;
|
||||
case "devices":
|
||||
logger(DEBUG,_("Inserting zigbee devices in DB"));
|
||||
logger(DEBUG,_("Inserting zigbee devices in DB"), __FILE__ . ":" . __LINE__);
|
||||
$topics[$topic[0]]->devices = json_decode($message->payload);
|
||||
fwrite($logFh, print_r($topics[$topic[0]]->devices, true));
|
||||
mkDevicesDB($topic[0], $topics[$topic[0]]->devices);
|
||||
break;
|
||||
case "groups":
|
||||
logger(DEBUG,_("Inserting zigbee groups in DB"));
|
||||
logger(DEBUG,_("Inserting zigbee groups in DB"), __FILE__ . ":" . __LINE__);
|
||||
$topics[$topic[0]]->groups = json_decode($message->payload);
|
||||
mkDevicesDB($topic[0], $topics[$topic[0]]->groups, true);
|
||||
break;
|
||||
@ -57,7 +57,7 @@ $callback = function($topic, $message)
|
||||
//print_r($device) ;
|
||||
if (!isset($device[$fn])) //must not exists, but ...
|
||||
{
|
||||
logger(LOG_WARNING, $logFh, "init of " . $fn .EOL);
|
||||
logger(LOG_WARNING, $logFh, _("init of ") . $fn, __FILE__ . ":" . __LINE__);
|
||||
$device[$fn] = array();
|
||||
$device[$fn]["device"] = new device;
|
||||
addDevice($device[$fn], $fn, $payloadArray);
|
||||
|
Reference in New Issue
Block a user