some debbuging
This commit is contained in:
29
moha.php
29
moha.php
@ -4,15 +4,13 @@
|
||||
define( "EOL", "\n");
|
||||
define("Z2M", "zigbee2mqtt");
|
||||
|
||||
|
||||
|
||||
|
||||
declare(ticks = 1);
|
||||
|
||||
$listProperties = array("powerSource" => "batterie");
|
||||
$listPropertiesKeys = array("property");
|
||||
|
||||
include "class/main.php";
|
||||
|
||||
require "class/main.php";
|
||||
|
||||
//global variables
|
||||
$topics = array(); // list of topics
|
||||
@ -36,25 +34,28 @@ $topics["zigbee2mqtt"] = new topic;
|
||||
bindtextdomain("moha", "./locale");
|
||||
textdomain("moha");
|
||||
|
||||
if (!init()) exit(1);
|
||||
|
||||
require "mqtt_functions.php";
|
||||
require "utils.php";
|
||||
require "events.php";
|
||||
require "db_functions.php";
|
||||
|
||||
if (!init()) exit(1);
|
||||
|
||||
$client = new Mosquitto\Client();
|
||||
|
||||
// log levels
|
||||
define( "DEBUG", $client->LOG_DEBUG);
|
||||
define( "INFO", $client->LOG_INFO);
|
||||
define( "NOTICE", $client->LOG_NOTICE);
|
||||
define( "WARNING", $client->LOG_WARNING);
|
||||
define( "ERROR", $client->LOG_ERR);
|
||||
define( "DEBUG", $client::LOG_DEBUG);
|
||||
define( "INFO", $client::LOG_INFO);
|
||||
define( "NOTICE", $client::LOG_NOTICE);
|
||||
define( "WARNING", $client::LOG_WARNING);
|
||||
define( "ERROR", $client::LOG_ERR);
|
||||
define( "ALL", DEBUG | INFO | NOTICE | WARNING | ERROR);
|
||||
$logLevel = DEBUG;
|
||||
$notificationLevel = WARNING | ERROR;
|
||||
|
||||
require "utils.php";
|
||||
require "mqtt_functions.php";
|
||||
require "events.php";
|
||||
require "db_functions.php";
|
||||
require "class/availability.php";
|
||||
|
||||
// defining callback functions
|
||||
$client->onConnect('connectResponse');
|
||||
$client->onDisconnect('disconnectResponse');
|
||||
|
Reference in New Issue
Block a user