Blog 2 Matteo
This weeks sprint was focusing on MQTT's. They are a publish-subscribe, machine to machine network protocol for message queue(ing) service. We have used them in a Slave-Master set up between multiple microbits. MQTT is most prominent in IOT and in many smart devices due to its lightweight and condensed size.
Flaws in MQTT would include a single point of failure as they rely on a central broker if the broker dies every sub and sub instastantly stops communticating. So theres no P2P fallback.
Theres no built in data validation so technically you can just send rubbish and they will forward it.
Not being able to handle a large amount of messages from devices. These are just some of the issues it has (I'm sorry for making them look bad).
Lab work
In this lab we connected a microbit to our phones through an IOT device panel app on the App Store. The broker for the MQTT was called Beebotte. We could see in real time the data passing through and being displayed on the MQTT.
The slave nodes were connected to the masternode using the "radio" field inside the Microbit python package. This is so we can wirelessly communicate through the system. With this now done the master node can connect to the beebotte server so i can send and recieve MQTT inputs and outputs.
The panel app was essential as it connected our phones to the Beebotte MQTT broker. It can now read the inputs and outputs from the master and our phones can send inputs back so they can be used in the system.
The slider corresponds to the MQTT device and displays any number that is inputted on the slider. For example a 5.
Independant Lab Work
Unfortunately I was sick for the past week so i wasn't able to do the independant lab work. However I was talking to George and Igor on what they were doing so i could catch up on the work i missed out on.
They were working on finding other services that could connect to a MQTT server. they want to send an email if a Microbit were to tilt more than a certain degree. They found Node-RED. They explained Node-RED creates connections and linking them to functions including MQTT in a graphical manner. Running a Node-RED container connected to a Beebotte server in which they filtered each input in schools/inputs using the switch block. this allowed for giving specific tilt values of a microbit. It is then linked to a function that will send an email if it hits the threshold.
Propsed Fixes For Gaps in Knowledge
Given that my gaps in knowledge is practical as I was out sick. My plan is to sit down with George and have a run through of the labs and do some of my own independant learning.
These issues could of been fixed if I recognised earlier that I have certain gaps and propose a plan to fix these holes. With the extra time I had during this class I should of made a plan on how to combat these gaps in knowledge.
Such as using the MQTT's available and doing a run through of the work with the help of the everyone in the class. That would of been a good use of my time.



Comments
Post a Comment