2019-06-02

MQTT Web Client


To test the MQTT setup with a web client, you can go here HiveMQ. Or, install the web client on your machine from here HiveMQ GitHub.
In the connection section, enter the address of you MQTT server, my local address is 192.168.0.40 for example. Port number is 8083. The ClientID will be randomly filled. We did not setup a username or password so these fields will be left blank. You can leave the remainder blank also.
Click the Connect button. If all goes well the Connection section will collapse with a green connected indicator.



Publish


Open a terminal and log in to your MQTT server and enter

mosquitto_sub -h localhost -t TestTopic


as you did with the initial test at set up.

In the Publish section of the web client, enter the Topic name TestTopic.
In the message box enter a message such as Hi There!
Click the Publish button and your message will show in the terminal.