Skip to content

Setting up MQTT Dash on your phone

espenakker edited this page Jan 3, 2018 · 2 revisions

MQTT Dash

You can use any MQTT dashboard app available for your phone. For the purpose of this demonstration we will use an android phone with the app MQTT Dash, this app is available for free on google play store

Connecting

In the app we create a new connection. For our broker we have not set any passwords or usernames so this is not needed. We fill in the ip address that the CDP Application will run on, in our case, the ip given by the wireless router "192.168.170.149".

With the CDP Application running and the phone connected to the same network interface, we should be able to connect.

Connected

When we are conencted we are able to create buttons and indicators that we can use to send or display information to/from MQTT topics. We will create two buttons that will be used to turn our snake left and right. We want our two buttons to broadcast the values: 2 for left and 3 for right. We want them to broadcast these values to the "dir" topic.


Open the game in the browser

Once the controller has been set up, we can open the game in the browser and play some snake. The server will have the same ip as the CDP Application and in our case this was "192.168.170.149". To connect to the game all you need to do is add the port and the location for the webapp to the ip "192.168.170.149:7689/www/index.html" and connect to it in the browser. NB, you need to use the ip for your own CDP Application, "your ip here":7689/www/index.html.

Clone this wiki locally