From b7d2b8def59fee1912d2defa58197a686fe84ab9 Mon Sep 17 00:00:00 2001 From: daniel Tartavel Date: Sat, 15 Jan 2022 10:59:53 +0100 Subject: [PATCH] debugging lines suppressed --- linky2mqtt.php | 14 +++++++------- mqtt_functions.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/linky2mqtt.php b/linky2mqtt.php index 72e2c41..95794e2 100644 --- a/linky2mqtt.php +++ b/linky2mqtt.php @@ -96,8 +96,8 @@ while(1) //test if the last tag is completed or not if ($key === $lastKey) { - print("repere 1"); - var_dump($token); + //print("repere 1"); + //var_dump($token); if (isset($token[0])) { logger(DEBUG, _("ẗoken[0] is set")); @@ -150,12 +150,12 @@ function mkLinkyDatas($data) { static $started = false; static $linkyDatas; - echo $data[0] . EOL; + //echo $data[0] . EOL; logger(DEBUG, _("function mkLinkyDatas")); if (!$started) { logger(DEBUG, _("Array not started")); - echo "is ADSC ?" . $data[0] .EOL; + //echo "is ADSC ?" . $data[0] .EOL; if ($data[0] == "ADSC") { logger(DEBUG, _("ADSC found, i start making array")); @@ -163,7 +163,7 @@ function mkLinkyDatas($data) //$linkyDatas[][$data[0]] = $data[1]; $linkyDatas = "{"; json_add($data, $linkyDatas); - echo $data[0] . "=>" . $data[1] .EOL; + //echo $data[0] . "=>" . $data[1] .EOL; } }else { @@ -176,14 +176,14 @@ function mkLinkyDatas($data) $linkyDatas = "{"; //Reinitialisation of array //$linkyDatas[][$data[0]] = $data[1]; json_add($data, $linkyDatas); - echo $data[0] . "=>" . $data[1] .EOL; + //echo $data[0] . "=>" . $data[1] .EOL; }else { logger(DEBUG, _("Adding data to array")); //$linkyDatas[][$data[0]] = $data[1]; $linkyDatas.= ","; json_add($data, $linkyDatas); - echo $data[0] . "=>" . $data[1] . EOL; + //echo $data[0] . "=>" . $data[1] . EOL; } } //echo $linkyDatas[array_key_last($linkyDatas)][$data[0]] ." => " . $linkyDatas[array_key_last($linkyDatas)][$data[1]]; diff --git a/mqtt_functions.php b/mqtt_functions.php index 67028d3..6afe2f5 100644 --- a/mqtt_functions.php +++ b/mqtt_functions.php @@ -40,7 +40,7 @@ function messageReceived($message) { $topic = explode ("/", $message->topic, 2); // get topic name $fnTree = explode ("/" , $topic[1]); // get friendlyname - echo $topic[0] . " => " . $topic[1] . EOL; + //echo $topic[0] . " => " . $topic[1] . EOL; logger(INFO, print_r(json_decode($message->payload), true)); } }