0
votes

I am working on a simple dashboard for showing IoT data in a browser. So far, I was using the Paho MQTT client library and a public MQTT broker to receive data. However, I'd like to use the Azure IoT Hub from now on.

The data I'm sending is just simple temperature and humidity values.

I already found out that I can't connect to the IoT Hub via MQTT.
So my question is: Is there a possibility to connect (eg. using javascript) directly to IoT Hub and read the data?
If not, what's my best option?

I thought about saving the messages to an SQL Database and reading from that, but that seems quite complicated for what should be a simple IoT use case (showing real-time data)

Thank you in advance!

1

1 Answers

0
votes

You can connect to IoT Hub via MQTT. Please take a look at this documentation for detail. We also have a Node.js SDK for connecting to IoT Hub if you don't want to deal with MQTT directly. I know you are working on your own dashboard, but have you looked at Azure IoT Solutions Accelerator? It's completely open source and you can modify it as you want.