Direct methods support in the IoT Hub Connected Service

The Visual Studio 2017 Connected Service for Azure IoT Hub has received an update a couple of months ago.

This update had some visual updates and now supports a Singleton pattern for the Device client too.

But it also included support for both Device twins and  Direct Methods. The latter feature looks a lot like the Commands method but there are some fundamental changes.

Yes, both solutions (Command and Direct Method) can execute code on a remote IoT Hub client. But the remote method just passes a message to the client. The Direct method can pass a message in a certain context. It calls a specific method (a client can have multiple methods registered) and passes the JSON parameter.

If you execute a Command, it feels like fire-and-forget. There is no descriptive response. But the caller of a Direct Method can wait until a response is accepted and a JSON value is returned.

Let’s check out Direct Methods.

Doorgaan met het lezen van “Direct methods support in the IoT Hub Connected Service”

Advertentie

Combining Azure StreamAnalytics with Azure Function Sink

There are many ways to collect data from an IoTHub and pass it through Azure Functions:

  • Trigger an Azure Function directly by the IoTHub events or operations monitoring
  • Trigger an Azure Function using an EventHub or message bus as endpoints of IoTHub routing
  • Trigger an Azure Function using an EventHub as output sink of a Stream Analytics job

All these solutions serve their own purpose.

But the last one, using an EventHub, can be pretty annoying. Yes, this is a great way if you will use the security policies and/or consumer groups of the Eventhub. But otherwise, there is a lot of administration.

Let’s check out how life is becoming much easier with a new Azure functionality which is still in public preview called Azure Function Sink.

Doorgaan met het lezen van “Combining Azure StreamAnalytics with Azure Function Sink”