2022-12-24 17:42:40 +01:00
|
|
|
|
2022-12-24 17:09:22 +01:00
|
|
|
+++
|
2023-02-27 21:59:02 +01:00
|
|
|
date="2023-02-03"
|
2022-12-24 17:09:22 +01:00
|
|
|
author="spanskiduh"
|
|
|
|
title="mosquitto"
|
2022-12-24 17:42:40 +01:00
|
|
|
description="click to read about mosquitto"
|
2022-12-24 17:09:22 +01:00
|
|
|
+++
|
|
|
|
# Mosquitto
|
|
|
|
|
|
|
|
Very nice IOT messaging protocol.
|
|
|
|
|
|
|
|
### How to publish and subscribe to mqtt messages:
|
|
|
|
|
|
|
|
#### Publish
|
|
|
|
`mosquitto_pub -h <host-ip> -p <host-port> -u <username> -P <password> -t <topic> -m '<message>'`
|
|
|
|
#### Subscribe
|
|
|
|
`mosquitto_sub -h <host-ip> -p <host-port> -u <username> -P <password> -t <topic>`
|