MQTT: mosquitto client di Ubuntu 18.04: Difference between revisions
From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs) Created page with "==Instalasi== apt update apt install mosquitto-clients" |
Onnowpurbo (talk | contribs) No edit summary |
||
| Line 3: | Line 3: | ||
apt update | apt update | ||
apt install mosquitto-clients | apt install mosquitto-clients | ||
==Pemakaian== | |||
mosquitto_sub -h localhost -t test -u "your-user" -P "your-password" | |||
mosquitto_pub -h localhost -t test -m "hello world" -u "your-user" -P "your-password" | |||
mosquitto_sub -h mqtt.mydomain.com -t test -p 8883 --capath /etc/ssl/certs/ -u "your-username" -P "your-password" | |||
mosquitto_pub -h mqtt.mydomain.com -t test -m "hello world" -p 8883 --capath /etc/ssl/certs/ -u "your-username" -P "your-password" | |||
Latest revision as of 02:45, 14 November 2019
Instalasi
apt update apt install mosquitto-clients
Pemakaian
mosquitto_sub -h localhost -t test -u "your-user" -P "your-password" mosquitto_pub -h localhost -t test -m "hello world" -u "your-user" -P "your-password"
mosquitto_sub -h mqtt.mydomain.com -t test -p 8883 --capath /etc/ssl/certs/ -u "your-username" -P "your-password" mosquitto_pub -h mqtt.mydomain.com -t test -m "hello world" -p 8883 --capath /etc/ssl/certs/ -u "your-username" -P "your-password"