Particle -> Azure IoT Hub Blob Storage Data Format Issue


#1

I’m a mech. engineer diving headfirst into this project so please excuse me when my greenhorn shows.

I’m trying to start simple with Particle and make a temperature logger for my family’s farm. There is a lot of documentation of how to integrate the Particle to Azure and it has been helpful, but now I’m stuck. I have a BLOB storage container (would much rather have a table, but this is where I’m at so far) that is capturing data from my device and routing it to an endpoint. The issue is the data that reaches the blob is a bunch of jibberish! This is where I’m at with my debugging.

  1. I am using Particle.publish(‘temp’, String(temperature)) to send the temperature data. It reaches the Particle cloud.

  2. A message is then recorded in the BLOB container. If i open the BLOB using Azure Storage Explorer I see this:
    Objavro.codecnullavro.schema�{“type”:“record”,“name”:“Message”,“namespace”:“Microsoft.Azure.Devices”,“fields”:[{“name”:“EnqueuedTimeUtc”,“type”:“string”},{“name”:“Properties”,“type”:{“type”:“map”,“values”:“string”}},{“name”:“SystemProperties”,“type”:{“type”:“map”,“values”:“string”}},{“name”:“Body”,“type”:[“null”,“bytes”]}]}

  3. If I navigate to the BLOB in the Azure Portal and choose to ‘Edit BLOB’ I see this:


    I see my data value in there, I just can’t get it out!!! Grrrrr:thinking:

  4. I then suspected (with my limited knowledge base) that the message being passed to Azure from the Particle cloud was simply not being interpreted the same way it is on the Particle cloud. I starting looking into JSON (which I have minimal knowledge of) but haven’t found anything. I was thinking I need to tell Azure the format of the Particle’s message somehow, but couldn’t figure that out.

  5. Next, I chose to try to mess with the ‘Query’ ability in the Azure Route but haven’t had luck “guessing” because I had no way to see the format of the data being passed from Particle to Azure

  6. Finally decided I needed to figure out how see the exact message coming into Azure. I used the Cloud Shell and iothub-explorer’s monitor-events function. When the monitor ran, even though that particular device published a file to the BLOB, nothing ever showed up!

I’m beyond lost here guys, but I think I’m missing something small. Any help would be appreciated! I can post any code you need. Thanks!!!

PS this is my first post so I hope that my image shows up.


#2

Having myself tried the Azure integration and storing data into blob storage and also tried other easier to use platforms like Ubidots and more recently my current favorite platform Losant for receiving, databasing, and graphing the data over time.

Is there a specific reason your choosing to use the Azure integration over what I feel like are easier to use options?


#3

I really just didn’t know any better!

I’d really like to learn how to use a full-blown service like Azure, AWS, or Google Cloud which is why I haven’t actively searched anything else out. It would also be cool to be able to machine learn directly from device data, which may be possible through other routes, but I just don’t know enough yet.

I appreciate the tips! I’ll have to check out Ubidots and Losant. Without any research…do they just use Webhooks?

Thanks!


#4

Yes, Losant has a direct webhook integration with Particle that works reliably all the time. I’ve been using them daily for a year now. Losant will also take in data via many different sources, check their form to get answers on all that.

They also allow you to push your data to Googles machine learning programs