question

Harisboston avatar image
1 Vote"
Harisboston asked Harisboston commented

Power BI dataset creation issue

Hi,

I am sending MQTT data from my device to my IoT Hub and would like to visualize the data for demonstration purposes.
I am following this tutorial and I am getting stuck because the dataset I create in my output (in the stream analytics job) is not present in Power BI.

Any ideas as to what I should do?

Also the data I sent is not json formatted. The data is sent raw via the paho MQTT library in C. Is that an issue?

Can MQTT data be visualized this way???

thanks

azure-iot-hub
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The product group for Power Bi actively monitors questions over at
https://community.powerbi.com/

--please don't forget to upvote and Accept as answer if the reply is helpful--




0 Votes 0 ·

Thanks a lot for the reply.

It seems however that this tutorial is from 2018 and many details have changed since then, making the whole procedure unnecessarily difficult.

I am a bit confused with all this stuff to be honest.

Isn't there an easier way to just read the telemetry data? Is the Logic App necessary, or the email part??

Where do I use the C# code you provided?

At this point I prefer to just see the raw data than visualize it if that's easier.

thanks and sorry for not being able to get this all

Also, I never get any telemetry in my hub 127536-image.png
Does this mean that there is a problem other than not being able to read the data?



0 Votes 0 ·
image.png (11.2 KiB)

Also, are you saying that I need to sent my telemetry data from my device in JSON format?

As I said I'm using C language. and not C#.

thanks

0 Votes 0 ·

Hi @Harisboston ,

How is your data sent to IoTHub?, do you see the data coming into IoTHub?

Please use Web Simulator to send quick Test Telemetry data to your IoT-Hub: https://azure-samples.github.io/raspberry-pi-web-simulator/

1 Vote 1 ·
Show more comments

1 Answer

SatishBoddu-MSFT avatar image
1 Vote"
SatishBoddu-MSFT answered Harisboston commented

Hello @NickWeliodro-9668

Thanks for posting this issue. You may be interested in checking the telemetry received in the IoTHub side. Please try the steps similar in another document such as: https://docs.microsoft.com/en-us/azure/iot-hub/tutorial-routing-view-message-routing-results

Step 1: Code to send the telemetry in the UTF8 encoded , .JSON format.

Check the encoding of the telemetry message sent.

C# code to send the encoded message as utf-8 instead of utf-32.
Below are the properties I have used. Please try these in your code as well.

 message.ContentEncoding = "utf-8";
 message.ContentType = "application/json";

image

So when you read the telemetry messages from any tool, such as VS code or Device explorer, you will see the below format telemetry .

 [{"deviceId":"Contoso-Test-Device","temperature":21.319264327790247,"humidity":68.288192045077778,"pointInfo":"This is a normal message."}]Properties:
 'level': 'normal'

Step 2: Provide the right info in the ASA job , Input

image

Step 3: Check the Dataset created in the PowerBi app.

127042-image.png

Finally, I was able to create a PowerBi report with the Dataset.
image

Please comment in the below section for further help in this matter.


image.png (37.0 KiB)
image.png (30.3 KiB)
image.png (16.7 KiB)
image.png (285.2 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is there any firewall blocking in your Network? Can you use another network for testing purposes?

Could you please use the Azure IoT Explorer to check if the Telemetry is reaching IoTHub?

127991-image.png


1 Vote 1 ·
image.png (65.1 KiB)

Hi @SatishBoddu-MSFT

Thanks for helping.

There is no firewall blocking as I successfully make a TCP connection with the azure hub and even get a connack back.

My device telemetry doesn't show up on IoT explorer
![128216-image.png][1]

What could be wrong?

EDIT!!
Ok that's embarrassing... i was using an incorrect way of formulating the MQTT topic.
It works now

Again thank you very much for helping out so much.
[1]: /answers/storage/attachments/128216-image.png

0 Votes 0 ·
image.png (46.0 KiB)