Message format coap and coap request in a core link format to reset message or coap to coap proxy, variable length token field and datagram transport layer security for the same message in coap message format error.

March 17, 2023

Which IoT protocol to choose? MQTT, CoAP, Zigbee – Experts Zone Talks #23

Olga

Olga Vasylenko

Marketing Specialist
SHARE
Which IoT protocol to choose? MQTT, CoAP, Zigbee – Experts Zone Talks #23
development process(8)

Hi! Welcome to experts zone talks, today we will talk with the IoT expert at Liki and Frontend House about IoT protocols. Kacper has experience in developing embedded systems. Let's talk about IoT protocols and standards and explore the different communication protocols and standards used in IoT, such as MQTT, CoAP, and Zigbee, and how to choose the right one for your project.

Transcription

Olga
Hi everybody, nice to see you here today it is experts zone talks. Today we will speak with Kasper who is an IoT expert and we will speak about IoT protocols. 
Kacper
Hi, I'm Kasper, I'm an embedded developer here at Leaky and Software house and I will today introduce you to the world of IoT protocols. 
Olga
So let's start, but first let's watch the intro and I will prepare and find my questions in my phone because I don't remember them because it is a complicated IoT topic. Let's go. Are you ready to answer the first question? 
Kacper
Yes, let's go. 

Key features of MQTT, COAP and Zigbee and differences


Olga
So what is the difference between Mqtt, COAP and Zigbee and what are the key features of that? 
Kacper
Okay, so let's start with Mqtt. Mqtt is based on the published subscribe principle and basically, we have a server called the broker and every device connected to the broker can send messages usually in JSON format on the given topic. So, for example, the device can send a message on the topic example and the second device can subscribe to this topic and the broker will forward this message to device B and go on with COAP. COAP is a rest-like protocol that key benefit of it is that it's running on UDP instead of TCP like HTTP. And last is Zigbee. Zigbee is a whole I would say ecosystem because it's not only protocol but it's also embedded devices and wireless networks. Zigbee needs a specific device that communicates on a specific band similar to the WiFi in our homes and has its own communication implementation. So that's a bigger topic. 

Use cases of IoT protocols


Olga
Do you have any examples of those protocols and their use cases? I mean Zigbee. 
Kacper
Yes, sure. So let's start with Zigbee. Zigbee is widely used in a smart home environment. You can find Zigbee-compatible switches, bulbs, et cetera.  
Olga
I see the smile on your face when you're starting talking about smart homes. 
Kacper
Yes, I’m a happy person now, I'm really into smart homes and I have many smart things in my home. 
Olga
What do you have? 
Kacper
For example, I wanted to open my garage door with my phone, that's why I connected. I just open my remote, connect some microcontrollers and used MQTT connected to a home assistant instance in my home and now I'm able to remotely by my phone open the garage door. 
Olga
And I think it's beautiful. 
Kacper
Yes, I really recommend trying smart home for yourself, for everyone and you can google now home assistant, it's great. But let's go back to the Zigbee. Okay, so as I said, Zigbee is widely used in a smart home environment. You can find Zigbee-compatible switches, bolts et cetera and it's not used in manufacturing in industrial environments because there you will choose a protocol that runs on wires because you want more reliability. I would say let's go to the CoAP. CoAP is used everywhere where we have some website services. If you have for example API or something like that, you will use CoAP for your embedded devices to easily communicate with HTTP systems. And lastly about MQTT. MQTT has a wider range of usability because it was chosen by Azure and AWS. It's their primary protocol to use with their and only not primary, but only protocol to use with their cloud services. Yes, and that's why it's the most popular, I guess. 
Olga
Because it's the only one, right? 
Kacper
Yes, it's the only one. It was chosen because of something. Because it's the best. 

Green Energy Controller


Olga
Okay, can you please tell me a few words about a real-life examples of it like the energy controller which you are working on currently? 
Kacper
Yes, sure. I'm excited to tell you about it. So, Green Energy Controller is an embedded device we are working on here at Liki. 
Olga
I see a fire in his eyes again. 

Yes, so basically this device communicates with energy meters and inverters via Rs four eight five or called modbus protocol, reads data about energy production and consumption from them. And then this collected data is sending to the cloud via LTE cut M one modem. So I'm really excited about it. I'm really happy I can work on it. 
Olga
We can show you infographics right now which will show the process. 
Kacper
I hope you will be able to buy it yourself in the near future. And thanks to this, you will be able to monitor your energy consumption or production. You will be able to watch beautiful charts about production and to use energy.
Olga
To use energy when it is the most profitable. 
Kacper
I would like to extend it a little bit more because as Olga said, the main purpose of our controller is that you will be able to monitor when you need energy the most and the less and you will be able to optimize the process of selling and buying energy. For example, if you have a Photovoltaic Farm or any energy bank, it will be an essential tool for your energy consumption, et cetera. But let's go back and tell you more about how our controller uses Mqtt. Our controller connects to the broker and subscribe to a few topics that allows us to control it. So for example, we can send specific message to reboot the device or change the Modbus configuration on the device. And about sending data, the data collected from peripherals, we create a JSON message from them and we send this message to the broker on the given topic. But every device we collect data from has its own topic. It allows us to easy browser the data later and easy to create charts, et cetera. 
Olga
Are you ready for the next question or do you want to tell something more about the system of the energy controller? 
Kacper
I feel it's enough about the Green energy controller. Let's go with another question. 

Libraries and tools for MQTT, Zigbee and CoAP protocols


Olga
So I wanted to ask you what tools and libraries are available for developers who want to implement some of those protocols we're talking about. 
Kacper
Yes. So let's start with Zigbee because it's the hardest to dive in because you need the specific hardware and that's the key difficulty. You have to spend some money to even get started. Because, of course, you can find libraries online. You can study them, but you will not run this code. You will not be able to test if your code works. So it's the hardest thing with Zigbee. But on the other hand, the embedded devices for Zigbee aren't very expensive. And Zigbee provides you with libraries written in C++ to play with. And let's switch to the MQTT. MQTT, on the other hand, is the easiest protocol to use because it has many, many implementations in different languages. So, for example, you will find C++ implementation, Python implementation, et cetera. And also you will find a lot of tools, I mean, tools that allow you to simulate the broker, to simulate the device. You will be able to sniff the messages. MQTT is perfect for anyone who wants to start with IoT. It's easy to use and it's well supported and well-documented. 
Olga
So MQTT is our bro. 
Kacper
Our bro, yes. 
Olga
I waited for him to laugh. I'm glad that it was only 5 seconds, not five minutes or something. Okay. 
Kacper
And lastly, to sum up, let's say that IoT world is open for new users. And I would like to encourage you to try it yourself. 
Olga
Yeah. And if you have some questions, you can write them in the comments. And you can also check other videos in our YouTube channel and also visit our frontendhouse.com website. You will find many interesting things there. And I think see you next time. Thank you for watching. Bye bye. Thank you. High five. Thank you for the talk and see you next time.  
Kacper
See you next time. 

What do you think? Share your impressions!

Ask Us any question.

(preffered about front end, in other case we can answer longer and not on topic)

Free consultation usually takes 15 minutes, where we can answer any front end related questions. We are always trying to agree term which suits both sides. Our Experts take care about quality of all answers.

Contact us
Olga
Olga
Bartek

How the consultation looks like?

  1. Ask question

  2. - Which technology choose to build quickly MVP?

    - How to solve problem of required technologies in the project?

    - How to extend my team with experts of UX/UI?

    - Is possible to ...

  3. Who will contact You?

  4. Immediately after ordering a free consultation, our office will contact you, ask about the topic and arrange a convenient date for an interview with an expert.

    Each interview is conducted by our internal consultant based on his full experience and knowledge. Even if he or she does not know the answer (which is rare), he will consult the topic with the full team and come back with the answer.

question mark icon
Arrow icon
Brain cog icon
Arrow icon
Video call icon

Meet the author

Olga

Olga Vasylenko

Marketing Specialist

Subscribe for tech insights

We will keep you up-to-date with fresh front end podcasts, news and articles

Still have some questions?

If you have any questions, feel free to contact us. Our Business Development Team will do their best to find the solution.