Hello,
I followed one of your tutorials to integrate Particle with Microsoft Azure. I created my event hubs and made sure they work. I wrote a C# code in Visual Studio to send messages to my event hubs, and I was able to receive them.
However, it didn’t work when I tried to do it with Particle Photon. I had this JSON file from the “Hands-on-Lab Particle Photon Weather Station in Azure” on hackster.io:
{
"event": "ctdmohweb",
"url": "https://ctdmoh-ns.servicebus.windows.net/ehdevices",
"requestType": "POST",
"json": {
"subject": "{{s}}",
"unitofmeasure": "{{u}}",
"measurename": "{{m}}",
"value": "{{v}}",
"organization": "{{o}}",
"displayname": "{{d}}",
"location": "{{l}}",
"timecreated": "{{SPARK_PUBLISHED_AT}}",
"guid": "{{SPARK_CORE_ID}}"
},
"azure_sas_token": {
"key_name": "WebSite",
"key": "GL8Yqti9r1wcQUm5FYfzclAnD7M/LfNxcOUcMIqHYUU="
},
"mydevices": true
}
and this was the firmware I flashed on the Particle board:
char payload[4];
void setup() {
Serial.begin(9600);
payload[0] = 2;
payload[1] = 4;
payload[2] = 6;
payload[3] = 1;
}
void loop() {
Spark.publish("ctdmohweb", payload);
delay(10000);
}
It is sending test data.
The problem is I got this error on the Particle dashboard when I created the webhook:
400
The requested HTTP operation is not supported in an EventHub. TrackingId:0baeeda1-cc95-4274-9b21-ede2061281f8_G46,TimeStamp:7/30/2015 9:31:06 PM
I double checked the authentication part and it was correct, and my event hub is functional too. I guess the error is with the HTTP POST operation, and the JSON file in general,
Please advise me on this, and I will appreciate any help.
Thanks,