Azure / connectthedots

Connect tiny devices to Microsoft Azure services to build IoT solutions
http://connectthedots.io
MIT License
399 stars 274 forks source link

Alerts in ConnectTheDotsIot #211

Closed lukazorc closed 8 years ago

lukazorc commented 8 years ago

Hi, I tried the ConnectTheDotsIot example on Raspberry Pi 2 and it worked fine. But if I add alerts in the message send to Event Hubs the web site doesn't show neither the graph nor the alerts. If before the message with the alerts I send some message without alerts, then the web site work fine, it shows the graph and the alerts. If the first message that I send is with alerts then the ConnectTheDotsWebSite throws an exception (System.ArgumentOutOfRangeException) in the WebSocketEventProcessor.cs file on line 127 because SortedDataBuffer is Count=0.

Is this normal or I'am doing something wrong?

The way I add the alerts in MainPage.cs is this:

ctdHelper = new ConnectTheDotsHelper(serviceBusNamespace: "xxx", eventHubName: "ehdevices", keyName: "xxx", key: "xxx", displayName: "xxx", organization: "xxx", location: "xxx", alerttype: "xxx", //if I comment this in all the code work fine... message: "xxx", //the message of the alarm sensorList: sensors);

dinarisio commented 8 years ago

Hello, thanks for detailed feedback. I pushed fix to master. Please let me know if it would not work for you.

lukazorc commented 8 years ago

It works! Thank you!

spyrossak commented 8 years ago

Thanks!

Sent from my Windows Phone


From: Dinar Gainitdinovmailto:notifications@github.com Sent: ‎8/‎20/‎2015 2:37 AM To: MSOpenTech/connectthedotsmailto:connectthedots@noreply.github.com Subject: Re: [connectthedots] Alerts in ConnectTheDotsIot (#211)

Closed #211https://github.com/MSOpenTech/connectthedots/issues/211.

— Reply to this email directly or view it on GitHubhttps://github.com/MSOpenTech/connectthedots/issues/211#event-387446010.