Skip to content
Permalink
Browse files

Update zigbee2mqtt.class.php

update link phpMQTT libruary
  • Loading branch information...
directman66 committed Jun 25, 2019
1 parent 0ea7d64 commit d2322aa88369788e1b3a1fad04489227381ef2b2
Showing with 24 additions and 12 deletions.
  1. +24 −12 modules/zigbee2mqtt/zigbee2mqtt.class.php
@@ -252,7 +252,8 @@ function setProperty($id, $value, $set_linked=0) {
}
//if ($new_connection) {
include_once("./lib/mqtt/phpMQTT.php");
// include_once("./lib/mqtt/phpMQTT.php");
include_once(ROOT . "3rdparty/phpmqtt/phpMQTT.php");
$this->getConfig();
if ($mqtt->config['MQTT_CLIENT']) {
@@ -296,7 +297,8 @@ function setProperty($id, $value, $set_linked=0) {
// }
$mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
// $mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
$mqtt_client = new Bluerhinos\phpMQTT($host, $port, $client_name . ' Client');
if(!$mqtt_client->connect(true, NULL,$username,$password))
{
@@ -408,7 +410,8 @@ function setPropertyDevice($id, $value, $set_linked=0) {
}
//if ($new_connection) {
include_once("./lib/mqtt/phpMQTT.php");
// include_once("./lib/mqtt/phpMQTT.php");
include_once(ROOT . "3rdparty/phpmqtt/phpMQTT.php");
$this->getConfig();
if ($mqtt->config['MQTT_CLIENT']) {
@@ -451,7 +454,8 @@ function setPropertyDevice($id, $value, $set_linked=0) {
}
$mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
// $mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
$mqtt_client = new Bluerhinos\phpMQTT($host, $port, $client_name . ' Client');
if(!$mqtt_client->connect(true, NULL,$username,$password))
{
@@ -1641,7 +1645,8 @@ function admin(&$out) {
include_once("./lib/mqtt/phpMQTT.php");
// include_once("./lib/mqtt/phpMQTT.php");
include_once(ROOT . "3rdparty/phpmqtt/phpMQTT.php");
$this->getConfig();
if ($mqtt->config['MQTT_CLIENT']) {
@@ -1684,7 +1689,8 @@ function admin(&$out) {
}
$mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
// $mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
$mqtt_client = new Bluerhinos\phpMQTT($host, $port, $client_name . ' Client');
if(!$mqtt_client->connect(true, NULL,$username,$password))
{
@@ -3237,7 +3243,8 @@ function install($data='') {
function get_map(){
include_once("./lib/mqtt/phpMQTT.php");
// include_once("./lib/mqtt/phpMQTT.php");
include_once(ROOT . "3rdparty/phpmqtt/phpMQTT.php");
$this->getConfig();
if ($mqtt->config['MQTT_CLIENT']) {
@@ -3268,7 +3275,8 @@ function get_map(){
$port=1883;
}
$mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
// $mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
$mqtt_client = new Bluerhinos\phpMQTT($host, $port, $client_name . ' Client');
if(!$mqtt_client->connect(true, NULL,$username,$password))
{
@@ -3290,7 +3298,8 @@ function get_map(){
}
function get_map_graphwiz(){
include_once("./lib/mqtt/phpMQTT.php");
// include_once("./lib/mqtt/phpMQTT.php");
include_once(ROOT . "3rdparty/phpmqtt/phpMQTT.php");
$this->getConfig();
if ($mqtt->config['MQTT_CLIENT']) {
@@ -3321,7 +3330,8 @@ function get_map_graphwiz(){
$port=1883;
}
$mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
// $mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
$mqtt_client = new Bluerhinos\phpMQTT($host, $port, $client_name . ' Client');
if(!$mqtt_client->connect(true, NULL,$username,$password))
{
@@ -3345,7 +3355,8 @@ function get_map_graphwiz(){
function sendcommand($topic, $command){
include_once("./lib/mqtt/phpMQTT.php");
// include_once("./lib/mqtt/phpMQTT.php");
include_once(ROOT . "3rdparty/phpmqtt/phpMQTT.php");
$this->getConfig();
if ($mqtt->config['MQTT_CLIENT']) {
@@ -3378,7 +3389,8 @@ function sendcommand($topic, $command){
$port=1883;
}
$mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
// $mqtt_client = new phpMQTT($host, $port, $client_name.' Client');
$mqtt_client = new Bluerhinos\phpMQTT($host, $port, $client_name . ' Client');
if(!$mqtt_client->connect(true, NULL,$username,$password))
{

0 comments on commit d2322aa

Please sign in to comment.
You can’t perform that action at this time.