add mosquitto-cli-pub-sub.txt

This commit is contained in:
Evgeny Zinoviev 2023-10-10 03:37:10 +03:00
parent 72e33e193c
commit e956b98975

View File

@ -0,0 +1,7 @@
pub:
echo -ne "\x68\x65\x6c\x6c\x6f\x77\x6f\x72\x6c\x64" | mosquitto_pub -h mqtt.solarmon.ru -p 8883 --cafile ~/dev/homekit/misc/mqtt_ca.crt -u user -P password -t "hk/my/topic" --will-qos 1 -s
sub:
mosquitto_sub -h mqtt.solarmon.ru -p 8883 --cafile ~/dev/homekit/misc/mqtt_ca.crt -u user -P password -t "hk/my/topic/#" -v -F %X
also see man mosquitto_sub(1) for -F (formats)