add mqtt
This commit is contained in:
parent
e3d7c46ce1
commit
9f475b8b70
|
@ -14,13 +14,14 @@ class MqttController extends BaseApiController
|
|||
private string $username = "root";
|
||||
private string $password = "root";
|
||||
private ?ConnectionSettings $settings;
|
||||
public array $notNeedLogin = ['upload'];
|
||||
|
||||
/**
|
||||
* @throws ProtocolNotSupportedException
|
||||
*/
|
||||
public function __construct(App $app)
|
||||
public function initialize()
|
||||
{
|
||||
parent::__construct($app);
|
||||
parent::initialize();
|
||||
# mqtt配置
|
||||
$this->mqtt_client = new MqttClient($this->host, $this->port);
|
||||
$this->settings = new ConnectionSettings();
|
||||
|
|
Loading…
Reference in New Issue