Difference between revisions of "MQTT: mosquitto client di Ubuntu 18.04"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with "==Instalasi== apt update apt install mosquitto-clients") |
Onnowpurbo (talk | contribs) |
||
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 09: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"