Trop long à lire
0000|[884030] PHP Warning: strpos() expects parameter 1 to be string, array given in /var/www/html/core/class/scenarioExpression.class.php on line 1343
0001|[884053] PHP Stack trace:
0002|[884059] PHP 1. {main}() /var/www/html/plugins/jMQTT/core/php/callback.php:0
0003|[884068] PHP 2. jMQTTComFromDaemon::msgIn($id = '359', $topic = 'topic116244/raw', $payload = 'I\\001\\000\\000\\000\\006\\000\\020', $qos = 0, $retain = FALSE) /var/www/html/plugins/jMQTT/core/php/callback.php:117
0004|[884076] PHP 3. jMQTT->brokerMessageCallback($msgTopic = 'topic116244/raw', $msgValue = 'I\\001\\000\\000\\000\\006\\000\\020', $msgQos = 0, $msgRetain = FALSE) /var/www/html/plugins/jMQTT/core/class/jMQTTComFromDaemon.class.php:384
0005|[884080] PHP 4. jMQTTCmd->updateCmdValue($value = 'I\\001\\000\\000\\000\\006\\000\\020') /var/www/html/plugins/jMQTT/core/class/jMQTT.class.php:2072
0006|[884109] PHP 5. jMQTT->checkAndUpdateCmd($_logicalId = class jMQTTCmd { private $_preSaveInformations = NULL; protected $id = '9145'; protected $logicalId = ''; protected $generic_type = ''; protected $eqType = 'jMQTT'; protected $name = 'rec'; protected $order = '0'; protected $type = 'info'; protected $subType = 'string'; protected $eqLogic_id = '467'; protected $isHistorized = '0'; protected $unite = ''; protected $configuration = ['topic' => 'topic116244/raw', 'jsonPath' => '', 'minValue' => '', 'maxValue' => '', 'timeline::enable' => '0', 'timeline::folder' => '', 'influx::enable' => '0', 'influx::namecmd' => '', 'influx::nameEq' => '', 'influx::nameVal' => '', 'interact::auto::disable' => '0', 'calculValueOffset' => 'current(unpack("Q",#value#))', 'jeedomCheckCmdOperator' => '==', 'jeedomCheckCmdTest' => '', 'jeedomCheckCmdTime' => '', 'historyPurge' => '', 'denyValues' => '', 'returnStateValue' => '', 'returnStateTime' => '', 'repeatEventManagement' => 'never', 'jeedomPushUrl' => '', 'alert::messageReturnBack' => '0', 'actionCheckCmd' => [...], 'jeedomPreExecCmd' => [...], 'jeedomPostExecCmd' => [...], 'historizeRound' => '', 'historizeMode' => 'avg']; protected $template = '{"dashboard":"core::default","mobile":"core::default"}'; protected $display = '{"invertBinary":"0","showNameOndashboard":"1","showNameOnmobile":"1","showIconAndNamedashboard":"0","showIconAndNamemobile":"0","forceReturnLineBefore":"0","forceReturnLineAfter":"0","parameters":[],"showStatsOnmobile":0,"showStatsOndashboard":0}'; protected $value = ''; protected $isVisible = '1'; protected $alert = '{"warningif":"","warningduring":"","dangerif":"","dangerduring":""}'; protected $_collectDate = '2023-11-26 23:06:20'; protected $_valueDate = '2023-11-26 23:06:20'; protected $_eqLogic = class jMQTT { private $_preSaveInformations = NULL; private $_preRemoveInformations = NULL; private $_broker = NULL; private $_statusCmd = NULL; private $_connectedCmd = NULL; protected $id = '467'; protected $name = 'Topic 116244'; protected $logicalId = ''; protected $generic_type = NULL; protected $object_id = '3'; protected $eqType_name = 'jMQTT'; protected $isVisible = '0'; protected $isEnable = '1'; protected $configuration = '{"type":"eqpt","eqLogic":"359","createtime":"2023-11-26 22:28:33","auto_add_cmd":"0","auto_add_topic":"topic116244\\\\/#","Qos":"","battery_type":"","battery_cmd":"","availability_cmd":"","commentaire":"","icone":"","updatetime":"2023-11-26 22:30:03"}'; protected $timeout = NULL; protected $category = '{"heating":"0","security":"0","energy":"0","light":"0","opening":"0","automatism":"0","multimedia":"0","default":"0"}'; protected $display = '{"backGraph::info":0}'; protected $order = '9999'; protected $comment = NULL; protected $tags = NULL; protected $_debug = FALSE; protected $_object = NULL; protected $_needRefreshWidget = FALSE; protected $_timeoutUpdated = FALSE; protected $_batteryUpdated = FALSE; protected $_changed = FALSE; protected $_cmds = [...] }; protected $_needRefreshWidget = NULL; protected $_needRefreshAlert = NULL; protected $_changed = FALSE }, $_value = 'I\\001\\000\\000\\000\\006\\000\\020', $_updateTime = *uninitialized*) /var/www/html/plugins/jMQTT/core/class/jMQTTCmd.class.php:129
0007|[884125] PHP 6. jMQTTCmd->formatValue($_value = 'I\\001\\000\\000\\000\\006\\000\\020', $_quote = *uninitialized*) /var/www/html/core/class/eqLogic.class.php:664
0008|[884130] PHP 7. jeedom::evaluateExpression($_input = 'current(unpack("Q","I\\001\\000\\000\\000\\006\\000\\020"))', $_scenario = *uninitialized*) /var/www/html/core/class/cmd.class.php:1010
0009|[884134] PHP 8. scenarioExpression::setTags($_expression = 'current(unpack("Q","I\\001\\000\\000\\000\\006\\000\\020"))', $_scenario = NULL, $_quote = TRUE, $_nbCall = *uninitialized*) /var/www/html/core/class/jeedom.class.php:1383
0010|[884139] PHP 9. scenarioExpression::setTags($_expression = 'unpack("Q","I\\001\\000\\000\\000\\006\\000\\020")', $_scenario = NULL, $_quote = TRUE, $_nbCall = 0) /var/www/html/core/class/scenarioExpression.class.php:1297
0011|[884143] PHP 10. strpos($haystack = [1 => 1152928101676613961], $needle = ' ') /var/www/html/core/class/scenarioExpression.class.php:1343
0012|[884150] PHP Warning: trim() expects parameter 1 to be string, array given in /var/www/html/core/class/scenarioExpression.class.php on line 1344
0013|[884153] PHP Stack trace:
0014|[884156] PHP 1. {main}() /var/www/html/plugins/jMQTT/core/php/callback.php:0
0015|[884160] PHP 2. jMQTTComFromDaemon::msgIn($id = '359', $topic = 'topic116244/raw', $payload = 'I\\001\\000\\000\\000\\006\\000\\020', $qos = 0, $retain = FALSE) /var/www/html/plugins/jMQTT/core/php/callback.php:117
0016|[884164] PHP 3. jMQTT->brokerMessageCallback($msgTopic = 'topic116244/raw', $msgValue = 'I\\001\\000\\000\\000\\006\\000\\020', $msgQos = 0, $msgRetain = FALSE) /var/www/html/plugins/jMQTT/core/class/jMQTTComFromDaemon.class.php:384
0017|[884168] PHP 4. jMQTTCmd->updateCmdValue($value = 'I\\001\\000\\000\\000\\006\\000\\020') /var/www/html/plugins/jMQTT/core/class/jMQTT.class.php:2072
0018|[884187] PHP 5. jMQTT->checkAndUpdateCmd($_logicalId = class jMQTTCmd { private $_preSaveInformations = NULL; protected $id = '9145'; protected $logicalId = ''; protected $generic_type = ''; protected $eqType = 'jMQTT'; protected $name = 'rec'; protected $order = '0'; protected $type = 'info'; protected $subType = 'string'; protected $eqLogic_id = '467'; protected $isHistorized = '0'; protected $unite = ''; protected $configuration = ['topic' => 'topic116244/raw', 'jsonPath' => '', 'minValue' => '', 'maxValue' => '', 'timeline::enable' => '0', 'timeline::folder' => '', 'influx::enable' => '0', 'influx::namecmd' => '', 'influx::nameEq' => '', 'influx::nameVal' => '', 'interact::auto::disable' => '0', 'calculValueOffset' => 'current(unpack("Q",#value#))', 'jeedomCheckCmdOperator' => '==', 'jeedomCheckCmdTest' => '', 'jeedomCheckCmdTime' => '', 'historyPurge' => '', 'denyValues' => '', 'returnStateValue' => '', 'returnStateTime' => '', 'repeatEventManagement' => 'never', 'jeedomPushUrl' => '', 'alert::messageReturnBack' => '0', 'actionCheckCmd' => [...], 'jeedomPreExecCmd' => [...], 'jeedomPostExecCmd' => [...], 'historizeRound' => '', 'historizeMode' => 'avg']; protected $template = '{"dashboard":"core::default","mobile":"core::default"}'; protected $display = '{"invertBinary":"0","showNameOndashboard":"1","showNameOnmobile":"1","showIconAndNamedashboard":"0","showIconAndNamemobile":"0","forceReturnLineBefore":"0","forceReturnLineAfter":"0","parameters":[],"showStatsOnmobile":0,"showStatsOndashboard":0}'; protected $value = ''; protected $isVisible = '1'; protected $alert = '{"warningif":"","warningduring":"","dangerif":"","dangerduring":""}'; protected $_collectDate = '2023-11-26 23:06:20'; protected $_valueDate = '2023-11-26 23:06:20'; protected $_eqLogic = class jMQTT { private $_preSaveInformations = NULL; private $_preRemoveInformations = NULL; private $_broker = NULL; private $_statusCmd = NULL; private $_connectedCmd = NULL; protected $id = '467'; protected $name = 'Topic 116244'; protected $logicalId = ''; protected $generic_type = NULL; protected $object_id = '3'; protected $eqType_name = 'jMQTT'; protected $isVisible = '0'; protected $isEnable = '1'; protected $configuration = '{"type":"eqpt","eqLogic":"359","createtime":"2023-11-26 22:28:33","auto_add_cmd":"0","auto_add_topic":"topic116244\\\\/#","Qos":"","battery_type":"","battery_cmd":"","availability_cmd":"","commentaire":"","icone":"","updatetime":"2023-11-26 22:30:03"}'; protected $timeout = NULL; protected $category = '{"heating":"0","security":"0","energy":"0","light":"0","opening":"0","automatism":"0","multimedia":"0","default":"0"}'; protected $display = '{"backGraph::info":0}'; protected $order = '9999'; protected $comment = NULL; protected $tags = NULL; protected $_debug = FALSE; protected $_object = NULL; protected $_needRefreshWidget = FALSE; protected $_timeoutUpdated = FALSE; protected $_batteryUpdated = FALSE; protected $_changed = FALSE; protected $_cmds = [...] }; protected $_needRefreshWidget = NULL; protected $_needRefreshAlert = NULL; protected $_changed = FALSE }, $_value = 'I\\001\\000\\000\\000\\006\\000\\020', $_updateTime = *uninitialized*) /var/www/html/plugins/jMQTT/core/class/jMQTTCmd.class.php:129
0019|[884200] PHP 6. jMQTTCmd->formatValue($_value = 'I\\001\\000\\000\\000\\006\\000\\020', $_quote = *uninitialized*) /var/www/html/core/class/eqLogic.class.php:664
0020|[884205] PHP 7. jeedom::evaluateExpression($_input = 'current(unpack("Q","I\\001\\000\\000\\000\\006\\000\\020"))', $_scenario = *uninitialized*) /var/www/html/core/class/cmd.class.php:1010
0021|[884209] PHP 8. scenarioExpression::setTags($_expression = 'current(unpack("Q","I\\001\\000\\000\\000\\006\\000\\020"))', $_scenario = NULL, $_quote = TRUE, $_nbCall = *uninitialized*) /var/www/html/core/class/jeedom.class.php:1383
0022|[884213] PHP 9. scenarioExpression::setTags($_expression = 'unpack("Q","I\\001\\000\\000\\000\\006\\000\\020")', $_scenario = NULL, $_quote = TRUE, $_nbCall = 0) /var/www/html/core/class/scenarioExpression.class.php:1297
0023|[884216] PHP 10. trim($str = [1 => 1152928101676613961], $character_mask = '"') /var/www/html/core/class/scenarioExpression.class.php:1344
0024|[884326] PHP Warning: current() expects parameter 1 to be array, string given in /var/www/html/core/class/scenarioExpression.class.php on line 1340
0025|[884332] PHP Stack trace:
0026|[884341] PHP 1. {main}() /var/www/html/plugins/jMQTT/core/php/callback.php:0
0027|[884346] PHP 2. jMQTTComFromDaemon::msgIn($id = '359', $topic = 'topic116244/raw', $payload = 'I\\001\\000\\000\\000\\006\\000\\020', $qos = 0, $retain = FALSE) /var/www/html/plugins/jMQTT/core/php/callback.php:117
0028|[884351] PHP 3. jMQTT->brokerMessageCallback($msgTopic = 'topic116244/raw', $msgValue = 'I\\001\\000\\000\\000\\006\\000\\020', $msgQos = 0, $msgRetain = FALSE) /var/www/html/plugins/jMQTT/core/class/jMQTTComFromDaemon.class.php:384
0029|[884355] PHP 4. jMQTTCmd->updateCmdValue($value = 'I\\001\\000\\000\\000\\006\\000\\020') /var/www/html/plugins/jMQTT/core/class/jMQTT.class.php:2072
0030|[884375] PHP 5. jMQTT->checkAndUpdateCmd($_logicalId = class jMQTTCmd { private $_preSaveInformations = NULL; protected $id = '9145'; protected $logicalId = ''; protected $generic_type = ''; protected $eqType = 'jMQTT'; protected $name = 'rec'; protected $order = '0'; protected $type = 'info'; protected $subType = 'string'; protected $eqLogic_id = '467'; protected $isHistorized = '0'; protected $unite = ''; protected $configuration = ['topic' => 'topic116244/raw', 'jsonPath' => '', 'minValue' => '', 'maxValue' => '', 'timeline::enable' => '0', 'timeline::folder' => '', 'influx::enable' => '0', 'influx::namecmd' => '', 'influx::nameEq' => '', 'influx::nameVal' => '', 'interact::auto::disable' => '0', 'calculValueOffset' => 'current(unpack("Q",#value#))', 'jeedomCheckCmdOperator' => '==', 'jeedomCheckCmdTest' => '', 'jeedomCheckCmdTime' => '', 'historyPurge' => '', 'denyValues' => '', 'returnStateValue' => '', 'returnStateTime' => '', 'repeatEventManagement' => 'never', 'jeedomPushUrl' => '', 'alert::messageReturnBack' => '0', 'actionCheckCmd' => [...], 'jeedomPreExecCmd' => [...], 'jeedomPostExecCmd' => [...], 'historizeRound' => '', 'historizeMode' => 'avg']; protected $template = '{"dashboard":"core::default","mobile":"core::default"}'; protected $display = '{"invertBinary":"0","showNameOndashboard":"1","showNameOnmobile":"1","showIconAndNamedashboard":"0","showIconAndNamemobile":"0","forceReturnLineBefore":"0","forceReturnLineAfter":"0","parameters":[],"showStatsOnmobile":0,"showStatsOndashboard":0}'; protected $value = ''; protected $isVisible = '1'; protected $alert = '{"warningif":"","warningduring":"","dangerif":"","dangerduring":""}'; protected $_collectDate = '2023-11-26 23:06:20'; protected $_valueDate = '2023-11-26 23:06:20'; protected $_eqLogic = class jMQTT { private $_preSaveInformations = NULL; private $_preRemoveInformations = NULL; private $_broker = NULL; private $_statusCmd = NULL; private $_connectedCmd = NULL; protected $id = '467'; protected $name = 'Topic 116244'; protected $logicalId = ''; protected $generic_type = NULL; protected $object_id = '3'; protected $eqType_name = 'jMQTT'; protected $isVisible = '0'; protected $isEnable = '1'; protected $configuration = '{"type":"eqpt","eqLogic":"359","createtime":"2023-11-26 22:28:33","auto_add_cmd":"0","auto_add_topic":"topic116244\\\\/#","Qos":"","battery_type":"","battery_cmd":"","availability_cmd":"","commentaire":"","icone":"","updatetime":"2023-11-26 22:30:03"}'; protected $timeout = NULL; protected $category = '{"heating":"0","security":"0","energy":"0","light":"0","opening":"0","automatism":"0","multimedia":"0","default":"0"}'; protected $display = '{"backGraph::info":0}'; protected $order = '9999'; protected $comment = NULL; protected $tags = NULL; protected $_debug = FALSE; protected $_object = NULL; protected $_needRefreshWidget = FALSE; protected $_timeoutUpdated = FALSE; protected $_batteryUpdated = FALSE; protected $_changed = FALSE; protected $_cmds = [...] }; protected $_needRefreshWidget = NULL; protected $_needRefreshAlert = NULL; protected $_changed = FALSE }, $_value = 'I\\001\\000\\000\\000\\006\\000\\020', $_updateTime = *uninitialized*) /var/www/html/plugins/jMQTT/core/class/jMQTTCmd.class.php:129
0031|[884388] PHP 6. jMQTTCmd->formatValue($_value = 'I\\001\\000\\000\\000\\006\\000\\020', $_quote = *uninitialized*) /var/www/html/core/class/eqLogic.class.php:664
0032|[884393] PHP 7. jeedom::evaluateExpression($_input = 'current(unpack("Q","I\\001\\000\\000\\000\\006\\000\\020"))', $_scenario = *uninitialized*) /var/www/html/core/class/cmd.class.php:1010
0033|[884397] PHP 8. scenarioExpression::setTags($_expression = 'current(unpack("Q","I\\001\\000\\000\\000\\006\\000\\020"))', $_scenario = NULL, $_quote = TRUE, $_nbCall = *uninitialized*) /var/www/html/core/class/jeedom.class.php:1383
0034|[884400] PHP 9. scenarioExpression::setTags($_expression = 'current("")', $_scenario = NULL, $_quote = TRUE, $_nbCall = 1) /var/www/html/core/class/scenarioExpression.class.php:1305
0035|[884403] PHP 10. current($arg = '') /var/www/html/core/class/scenarioExpression.class.php:1340
On voit bien que jeedom::evaluateExpression()
reçoit bien la formule, mais se plante dessus :
0008|[884130] PHP 7. jeedom::evaluateExpression($_input = 'current(unpack("Q","I\\001\\000\\000\\000\\006\\000\\020"))', $_scenario = *uninitialized*) /var/www/html/core/class/cmd.class.php:1010
Breffff, vu que je n’étais pas à une saleté près, j’ai fait une fonction perso qui fait ce qu’on veut :
Je l’ai collée en « Formule de calcul » :
Et BIIIIMMMM v’la un entier :
Bon, reste à être sur de ce que tu veux recevoir (taille, big/little endian) et jouer avec unpack.
P.S. : N’hésite pas à utiliser php -a
en ligne de commande pour tester sans passer par MQTT :