MQTT: protocol for IoT and m2m communication

MQTT (formerly Message Queue Telemetry Transport) is a publish/ subcribe “light weight” messaging protocol. Imagine that Twitter or Apple’s iMessage could be based on MQTT. In essence, you have a broker (server) allowing multiple clients to publish certain topics or areas of interest or perhaps device statuses. At the same time you have clients which can subscribe to these topics in order to receive updates in real time. You can imagine one to one, one to many, many to one, or many to many relationships, so hopefully, you can imagine how powerful this concept is. I see this as an essential component of the Internet of Things, one of many conduits for m2m communication.

In the next few blog posts, I will talk about Zigbee and Z-wave as home automation protocols and initial extensions to IoT for your home. I will also explain their shortcomings for global or distributed deployments. The MQTT may be the solution.mqtt

My first project involving MQTT is an endpoint (sensor), detecting gestures and sending them to a centralized MQTT based hub. I decided to use Mosquitto as the broker and CC3200 as the initial development platform. Once again more details will follow. Such an endpoint could control many things.  Imagine it acting as a dimmer in your home (fun) but also for more practical purposes, as a dimmer in a laboratory where people can not easily touch it to control the lights.

Obviously, bridging to the HA protocol of your choice will have to occur, but that is another blog all together.  😉

Another project using MQTT is a presence detector. Small iBeacon can be installed in your house and your mobile device (initially iOS based) is aware of it. An app detects your beacon, or should I say, iOS detects your beacon and calls my app to let it know you just entered in proximity of that beacon. At this point the app will wakeup and using MQTT willbeacon report your presence to the main hub. What can you do with it? How about opening your Zwave lock, or perhaps disarming your security system, or maybe just a garage door? Are you concerned that someone takes your phone and pretends to be you? Well, you will have an option to use your alarm code or fingerprint identification if your device supports it. Initially, I will probably also provide RESTful API to communicate directly with your existing home automation system, if your HA supports generic RESTful calls, but again the goal is to use MQTT and  “IoT hub”…

   Stay tuned …

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.