User Tools

Site Tools


Testing Zibawa Using Mosquitto


Setup account and device in Zibawa.

Install Mosquitto Client

Install mosquitto client (see instructions from

sudo apt install mosquitto-clients

Test Command

Then from command line for example if user is “abdevice1” and password is EQFBQM6ZVB, account is 24, and channel is 1.

Note that the user and password are those of your DEVICE, not your user account. You can only publish on topics related to your device. To find out the credentials for your device, go into admin>devices and press reset password. This will create a new password, and show you the topics you can send on user name, and a download link for the CA certificate to use when making TLS connections.

To connect without TLS you can use the following on port 1883. DO NOT USE for production devices since non encrypted communications are not secure.

More details on mosquitto usage.

If you want to see some value on a graph, then try

mosquitto_pub -h -u "abdevice1" -P "EQFBQM6ZVB" -t 24/abdevice1/test/1 -m '{"value":10}' 

Be careful when sending JSON. You need to escape the “ inside the JSON, or use single on the outside, and double on the inside.

Secure Connection with TLS

If your Zibawa instance is working with ssl you may need to obtain a copy of your SSL certificate CA installed on zibawa. This can be downloaded when you reset the password from any device by pressing on the ca download link that appears. (See screen shot above)

mosquitto_pub -h -p 8883 --cafile "/link/to/ca_certificate/downloaded/from/zibawa_mqtt_ca_cert.pem" -u "abdevice1" -P "EQFBQM6ZVB" -t 24/abdevice1/test/1 -m '{"value":15}' 
user/testing_using_mosquitto.txt · Last modified: 2017/12/20 16:16 by matt