Install MQTT Client on a Raspberry Pi

In the previous post I wireless installed a clean version of Raspbian on a Raspbian Pi 3.
Now it’s time to do something usefull with this clean install, like install a MQTT Client (Mosquitto).
In this post I will layout the steps needed to do this

Install the client

sudo apt-get install mosquitto-clients


Test the client install

mosquitto_pub -h "192.168.XXX.XXX" -t "home/sensors/presence/iphone" -m "On"

-h : mqtt host to connect to.
-t : mqtt topic to publish to.
-m : message payload to send.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s