Particle to Azure integration sending null values


#1

I have my Particle account forward events to Azure IoT hub and the data in my events come to Particle but are being sent to Microsoft as null. See below. Any ideas why this happening?

Example:
Event to Particle cloud:
{“data”:“Monitoring Started”,“ttl”:60,“published_at”:“2017-09-11T16:12:42.207Z”,“coreid”:“47003b000351353530373132”,“name”:“systemMessage”}

Event hook sent to Microsoft:
{“data”:"",“ttl”:60,“published_at”:“2017-09-11T16:12:42.327Z”,“coreid”:“particle-internal”,“name”:“hook-sent/systemMessage”}


#2

I’ve setup the Microsoft integration before but I would recommend using Losant because it’s much easier to work with and it gives you easy to use dashboards to visualize your data.

Up to you but it’s easier than the Microsoft method.


#3

Thanks for the tip, I’ll check that out but on this project Azure is a requirement due to the customer already having a subscription. I would like to know if I’m doing something wrong either on my publish or on the Azure integration piece.


#4

I believe this is a bug in Particle’s Azure integration but would like someone from Particle to confirm or someone who has successfully sent data to Azure to explain how they did it. Thanks in advance.


#5

I have successfully sent data to Azure using the particle integration.

I outline the setup in this thread How to pass unescaped JSON to Azure IoTHub?

I now prefer Losant and their Particle integration since it’s so much easier to work with and the dashboards are the best out there.


#6

I was able to confirm that even though the event I was monitoring on the console had a null value, Particle was indeed forwarding the data from my device to the Azure IoT Hub. I confirmed this with a tool from Microsoft called iothub-explorer. You can connect with your device ID and your connection string from the Shared Access Policies for your device(s).


#7

So your data is being transmitted just fine to Azure it’s just the Particle Console events show null?


#8

Correct. The hook/sent event showed null data but the iothub-explorer utility shows the events with correct data being received by Azure.

From Particle cloud:
hook-sent/setBattLevelno dataSeptember 15th at 8:58:53 amparticle-internal
{“data”:"",“ttl”:60,“published_at”:“2017-09-15T12:58:53.692Z”,“coreid”:“particle-internal”,“name”:“hook-sent/setBattLevel”}

Same event as seen by iothub-explorer:
==== From: 47003b000351353530373132 ====
{
"data": “100.000000”,
“device_id”: “47003b000351353530373132”,
“event”: “setBattLevel”,
“published_at”: “2017-09-15T12:58:53.559Z”
}
---- properties ----
{}