12 063
правки
(Новая страница: «'''Task''': set up forwarding of all MQTT messages to the popular free cloud MQTT broker http://cloudmqtt.com/ and back.») |
(Новая страница: «'''Solution:''' # Register on http://cloudmqtt.com/ # Go to your account on http://cloudmqtt.com/ to view settings: server, port, username, password. # Go to the…») |
||
Строка 177: | Строка 177: | ||
'''Task''': set up forwarding of all MQTT messages to the popular free cloud MQTT broker http://cloudmqtt.com/ and back. | '''Task''': set up forwarding of all MQTT messages to the popular free cloud MQTT broker http://cloudmqtt.com/ and back. | ||
''' | '''Solution:''' | ||
# | # Register on http://cloudmqtt.com/ | ||
# | # Go to your account on http://cloudmqtt.com/ to view settings: server, port, username, password. | ||
# | # Go to the controller and add the following lines to the end of the ''/etc/mosquitto/mosquitto.conf'' file : | ||
#: <syntaxhighlight lang="bash"> | #: <syntaxhighlight lang="bash"> | ||
connection cloudmqtt | connection cloudmqtt | ||
Строка 191: | Строка 191: | ||
topic # both | topic # both | ||
</syntaxhighlight> | </syntaxhighlight> | ||
#: ( | #:(the last line says that you want to forward all messages ('''#''' metasymbol, see description above) in either ('''both''') side (broker cloud controller to the broker and back) | ||
#: | #:For a more detailed description of all options, see https://mosquitto.org/man/mosquitto-conf-5.html. | ||
# | # Restart mosquitto by running the following in console | ||
#: <syntaxhighlight lang="bash"> | #: <syntaxhighlight lang="bash"> | ||
service mosquitto restart | service mosquitto restart | ||
</syntaxhighlight> | </syntaxhighlight> |
правки