What the heck is Azure IoT Hub?
TLDR: It’s an Event Hub towards which Internet-of-Things (IoT) devices publish events and status changes. According to ChatGPT: Azure IoT Hub is a cloud-based service provided by Microsoft Azure that enables secure, reliable, and scalable communication between Internet of Things (IoT) devices and cloud applications.
What’s so cool with it?
Many things, but what I loved the most is how quickly you get up & running and how many ways exist to send telemetry & other data to it. Actually, the only steps you need to get started are:
-
Provision the IoT Hub
If it’s your first project and you’re just trying it out, then don’t worry at all about partitions, scaling, etc. You are most probably not going to use all the resources available on the Free tier (8000 messages/day). -
Create a Device
-
Grab the connection string
(Actually, there are safer ways to connect, but let’s start with that.)
-
Use the connection string in your agent and start streaming messages
You can use various protocols, such as MQTT, AMQP, and HTTP, to name a few! I know this sounds easier than it really is, but don’t worry, I’ll blog about that as well. -
Then what?
What do you do with all this data? Long story short, the IoT Hub keeps it there, but you can’t even see it. You have to use something to pick those messages, process, and visualize them. That something (for me) is an Azure Streaming Job, but that’s a story for another blog post. 🙂
What’s the catch?
You need to set up private endpoints if you want to be safe (and you really want it). In my honest opinion, private endpoints are a slight pain. Otherwise, it’s a pretty straightforward process—no other catches so far for me.
Verdict
It’s a no-brainer for any IoT project. Really, if you don’t use it already, then what are you using? Please write a comment and let me know—I might learn something!