MQTTCLIENT
This driver acts as an MQTT client (publisher/subscriber) for Hsyco, it fully supports MQTT version 3.1.1.
Contents
HSYCO Configuration
Add the MQTTCLIENT I/O Server in the I/O Servers section of the Settings and set its parameters:
Communication
- IP Address: host name or IP address of the MQTT broker
- IP Port: TCP/IP port of the MQTT broker
Authentication
- User: username for authentication with MQTT broker
- Password: password for authentication with MQTT broker
If presents, these two fields must be both not empty
Options
ID | Default | Values | Description |
---|---|---|---|
startupevents | false | true | generate IO events also during the driver’s start-up phase |
false | start generating events only after HSYCO is aligned with the current status of the system | ||
pollinterval | 1000 | n >= 1000 | the data acquisition interval, in milliseconds |
Subscriptions file
Under the hsyco root directory you could have a file named "mqttsubscriptions-.ini" which can contain a series of line, each line represents a topic to subscribe and the topic's quality-of-service (Qos):
<clientid>:username=<username>,password=<password>
E.g.
client123:username=homesensor,password=abc123
Clientid must be present in each line while username and password are optional; if username and password are not present there will be two cases:
- if default username and password are specified in "hsyco.ini" they will be used by the authentication mechanism
- if default username and password are not specified in "hsyco.ini" the authentication mechanism is disabled