issue 1 fixed for username nad password authentication
This commit is contained in:
parent
a214988d8c
commit
d8a5ddc3f2
|
|
@ -57,7 +57,7 @@ class Mqtt
|
||||||
{
|
{
|
||||||
$client = new MqttService($this->host,$this->port, rand(0,100), $this->cert_file, $this->debug);
|
$client = new MqttService($this->host,$this->port, rand(0,100), $this->cert_file, $this->debug);
|
||||||
|
|
||||||
if ($client->connect(true))
|
if ($client->connect(true, null, $this->username, $this->password))
|
||||||
{
|
{
|
||||||
$client->publish($topic,$msg);
|
$client->publish($topic,$msg);
|
||||||
$client->close();
|
$client->close();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue