0
votes

Have successfull completed the "Connect Raspberry Pi to Azure IoT Hub (Python)" and "Use iothub-explorer to send and receive messages between your device and IoT Hub" tutorials, setting up a Raspberry Pi that is sending simulated data to the cloud.

Using iot-explorer I can see that all is working great, messages are being sent from the Pi to the cloud and the iot-explorer monitor is pulling and showing them, perfect!

But, now I have tried the "Visualize real-time sensor data from your Azure IoT hub by using the Web Apps feature of Azure App Service" tutorial, and all went perfectly fine except when I load the web page no data is being shown on the graph at all.

Pi is running and sending the messages through, which I can see within the Azure portal and in the iot-explorer monitor, but nothing showing on the graphs.

Any ideas what could be wrong?

1
Hi chivs688, can you see the data showing now?Rita Han

1 Answers

0
votes

You can see the messages in iot-explorer monitor indicate messages are sending successfully to build-in endpoint messages/events of Azure IoT Hub.

And if you can't see any data in the graph, it is a blank graph like this:

enter image description here

It means the web app deploy and running successfully but no data arrived in the web app.

Then what you need to check is the web app settings:

  1. Make use you set the right IoT Hub connection string. It has the following format: HostName=[YOUR HUB NAME].azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=[KEY]. You can find it in IoT Hub -> Settings -> Shared Access Polices -> iothubowner -> Connection string-primary key.
  2. Set the consumer group created in this step of the tutorial.
  3. Enable WebSocket.

Settings in Web App will like this:

enter image description here

enter image description here

Setting(consumer group) in Azure IoT Hub:

enter image description here

If it is still not working feel free let me know.