Hi,
I am trying to implement a Photon to Azure Event Hub solution, and followed the samples etc.
So far - I can raise an event and have this sent to my Azure event hub - works ‘darn’ well ;-)). I am well pleased that I can even get this far with the infrastructure doing the grunt work of encryption and encoding my SAS key for me :-))
BUT - is there any actual documentation on how to form the webhook itself ?? Just using a single ‘example’ is not very ‘definitive’
Followed the ‘ConnectTheDots’ sample but not sure (without trial and error) how to best format my data. What appears in my Event Hub is ALL the event message - including the named event, plus the raw ‘data’ field PLUS the ‘translated’ JSON :-O.
As I am receiving these queued messages in a C# application - I would rather have total control over what gets sent to the queue, so HOW do I create a simple webhook to just send the ‘data’ content (ie the bit I create on the photon) without all this extra stuff, and expanded JSON.
Below is a sample of what I get into my queue (device ID masked - and line breaks added for clarity) :
{
“event”:“myeventname”,
“data”:"{
“s”:“poolheat”,
“u”:“C”,
“l”:“Alnwick”,
“m”:“Temperature”,
“o”:“Northumbria Systems”,
“t1”: 18.75,
“t2”: 16.00,
“d”:“NSL Test 1”
}",
“published_at”:“2015-10-08T13:00:32.822Z”,
“coreid”:“xxxxxxxxxxxxx”,
“subject”:“poolheat”,
“unitofmeasure”:“C”,
“measurename”:“Temperature”,
“value”:"",
“organization”:“Northumbria Systems”,
“displayname”:“NSL Test 1”,
“location”:“Alnwick”,
“timecreated”:“2015-10-08T13:00:32.822Z”,
“guid”:“xxxxxxxxxxxxxx”
}
All I really want is the bits between the {} after data ???.
Thanks
Graham