This is an old revision of the document!
In this scenario, you will subscribe to the MQTT broker for MQTT messages and handle them. Most of the code yo will implement here is similar to the scenario U3, including LCD handling and connecting to the MQTT broker.
Undergraduate / Bachelor / Engineering Students
We assume you already know how to:
internal.IOT,
MQTT broker present in the internal.IOT network is also visible under public address. So whenever you subscribe to the MQTT message using VREL node that is connected to the internal.IOT network, you may publish to it using other devices connected to the internal.IOT, i.e. other VREL node or if you're physically present at SUT in the IOT laboratory room 320, then you can connect your mobile and laptop to the internal.IOT network and use “internal” IP address. However, if you're in a remote location, you can access the same broker under public IP as stated in the node description. When you publish an MQTT message using public IP, it will be delivered to the subscribers in the private internal.IOT network as well. Mind, to access MQTT broker you need to use IP, user and password (applies to both public and private IPs of the MQTT Broker). Refer to the node documentation for the latest information.
internal.IOT network access and for the MQTT Broker.
In this scenario, you will connect to the infrastructure as a client (STA) and use the MQTT server to subscribe to the messages sent by some publisher. You will present received MQTT message on the LCD screen. We will implement a “remote display”, where you handle remote requests to put contents on specific (one of four) LCD lines. MQTT payload should be a string then. We assume that the last character of the topic determines line number (between 0 and 3) so you need to construct MQTT topics as i.e. like /mydevice/someuniqueID/LCDcontent/0 for the first line, /mydevice/someuniqueID/LCDcontent/1 for the second one, and so on. Mind to update “someuniquieID” with your ID not to overlap with other students as you share MQTT broker!
You should be able to visualise payload of the subscribed messages on the LCD screen. Note, you handle only a limited number of messages that you subscribe to. When subscribing, do not go “too wide” using wildcards cause you won't be able to present all of them on the LCD display.
Write starting conditions, i.e. what to do at the beginning, what to pay attention before beginning, how the mechanical part should look like, etc.
Write some extra information if i.e. some steps are optional otherwise cancel this paragraph (but do not remove header).
Describe activities done in Step 1.
…
Describe activities done in Step n.
Provide some result validation methods, for self assesment.
This section is to be extended as new questions appear.
When using the printed version of this manual please refer to the latest online version of this document to obtain the valid and up-to-date list of the FAQ.
Provide some FAQs in the following form:
Question?: Answer.