Blog 3 - MQTT / IFTTT

 Blog 3 - MQTT / IFTTT

MQTT

MQTT (Message Queueing Telemetry Transport) MQTT is a standards based messaging protocol or set of rules, used for machine-to-machine communication. MQTT clients are very small and require minimal resources so it can be used on small microcontrollers.

Lab

We began the lab by downloading the iot mqtt panel app on our phones. This acted as our client side app and allowed us to interact with the mqtt broker. We created a connection on the app using the mqtt beebotte website and a username and password to the broker.



Next, I was able to create a dashboard on the app and set up panels/widgets, such as gauge meters, sliders and line graphs, which could interact with the broker through a mutual topic and JSON payloads. MQTT. MQTT allows for bi-directional communication, meaning messaging from the controller to the broke and vice versa.





When I changed the value of the slider, I was able to send a message to Jason's (our lecturer) broker, displaying the number I entered on LED's.

I was also able to configure separate sliders and gauges to connect to my own micro:bit controller, sending messages from the MQTT app to my micro:bit.

Further Testing

I wanted to test this further without having Jason's MQTT Broker. I decided to set up an account, channel and dashboard on the beebotte website and created a new connection to the channel from my MQTT app.

Below are two widgets I added to my beebotte dashboard, which allowed me to communicate to my app and vice versa again with messages and JSON payloads.





IFTTT

If This Then That, is an application which allows you to set conditions and combine it with a result, e.g. when you receive a text saying "meeting", create a meeting in your calendar. This is done by using event driven workflows which can connect apps and devices. 

We began by setting up by connecting my micro:bit to a cloud board and connecting it to an Android Hotspot (my own).


I proceeded to create an IFTTT condition using a webhook as the input and Google Calendar as the output. I wanted to connect the webhook to my micro:bit 'A' button so that once pressed, it would at an event to my calendar. Webhooks are event driven communication that can send data between applications using HTTP. 


Once created, I took the webhook key and added it to my micro:bit block code in order to be able to trigger it. 


Everything was now set up, it was time to test it out. I pressed the button on several different occasions and each event was added to my calendar


While this isn't the most serious or practical use for IFTTT, my attempts at other implementations, such as SMS, didn't work. I would love to in the future be able to reverse the order of how I set up my IFTTT. For example, if an event is added to my calendar, using a webhook, send a message to my micro:bit.

Works Cited

https://aws.amazon.com/what-is/mqtt/

https://mqtt.org/

https://www.redhat.com/en/topics/automation/what-is-a-webhook


Comments

Popular posts from this blog

Blog 2 - HRV Demo

Week 1: HRV Review

Lock In Day 1 (20/05/25)