SMS Messaging from Azure IOT Hub

2019-06-08 14:56发布

问题:

I am currently building a project using an Adruino Uno to collect weather data such as temperature and humidity, this data is then passed onto the Azure IOT hub, the messages are then processed and stored to an SQL database again in Azure. Finally the data is then displayed on a website which users can sign up to and view the weather data I have collected.

I am trying to implement SMS notifications into the system so that if the temperature is to hit a certain threshold say 0 degrees Celsius, users on the system will receive SMS messages notifying them of the cold temperature.

My question is can the triggering and sending of the SMS messages be contained within Stream Analytics or the Event Hub. Or would I need to create an Event Hub that can trigger an action on the website which will send the SMS messages?

I have seen this link https://github.com/Azure-Samples/event-hubs-dotnet-user-notifications but I don't think at answers the specific question I have asked.

Thanks for any help or advice

回答1:

You might want to look into Logic Apps which has a SQL connector as well as a Twilio one for sending SMS messages



回答2:

Per my experience, I suggest that you can use Events trigger and bind SQL table as input & Twilio as output via Azure Function Apps to implement the needs. As references, please see these documents below.

  1. Azure Functions triggers and bindings concepts
  2. Event Hub Trigger
  3. Send SMS messages from Azure Functions using the Twilio output binding


回答3:

I prepared detailed tutorial how to send SMS messages once motion is detected by IoT device. You can find it here:

https://github.com/Daniel-Krzyczkowski/Daniel-Krzyczkowski.github.io/blob/master/cloudyofthings/article1/index.md

Here is the architecture diagram: