Mqtt Toolkit - mqttclient
- :
client =mqttclient(brokerAddr) - :
client =mqttclient(brokerAddr, [name, value ....]) Create a MQTT client connection
Inputs
brokerAddrName or IP address with protocol. ie: tcp://127.0.0.1.
name, valueOptional name / value pairs.
Known options are:
PortNumeric port number to connect to (default 1883)
TimeoutNumeric timeout value in seconds (default 5)
KeepAliveDurationNumeric keep alive value in seconds (default 60)
ClientIDString client Id
UsernameString username
PasswordString password
CARootCertificateString full file path to a root certificate file when using a secure connection
ClientCertificateString full file path to a client certificate file when using a secure connection
ClientKeyString full file path to a private client key file when using a secure connection
SSLPasswordString Password to decrypt the client key file
Outputs
clienta octave_mqtt object
Properties
A octave_mqtt object has the following properties:
BrokerAddressBroker URL
PortNumeric port number to connect to (default 1883)
TimeoutNumeric timeout value in seconds (default 5)
KeepAliveDurationNumeric keep alive value in seconds (default 60)
ClientIDString client Id
Connectedlogical 0|1 for connection status
SubscriptionsList of topics currently subscribed to
Examples
Create a new mqttclient
client = mqttclient("tcp://127.0.0.1");