Stream Analytics jobs receive no input - azure

I downloaded and deployed the Remote Monitoring Azure IoT Suite project. The only change I made to the deployment template was to deploy a free version of IoT Hub instead of S2. I am using the Azure IoT SDK to send messages to the IoT Hub. Monitoring on Azure Portal shows me that messages are arriving.
But when I look at the three Azure Stream Analytics jobs, none of them are receiving any inputs. It's like IoT Hub isn't letting any of the ASAs know that there is data to process. The permissions are unchanged. IoT Hub has a policy with all permissions and all the ADAs are using that policy. I created a new ADA with the same policy and I don't get any data in that one either.
What could be going wrong here?

It seems there was a glitch in Azure. I came back and everything was magically working. Sigh...

Related

MXChip AZ3166 without Azure IoT Hub

I have been reading and collecting telemetry data on Azure resources using the MXChip AZ3166 for quite awhile now. May I know if it is possible to observe and extract the telemetry data without using Azure services?
May I know if it is possible to observe and extract the telemetry data without using Azure services?
Apart from using the Azure IoT Central portal, as per documentation:
You can also monitor telemetry from the device by using the Termite app.
You can refer to Quickstart: Connect an MXCHIP AZ3166 devkit to IoT Central, Termite: a simple RS232 terminal and Getting Started with Azure RTOS and Azure IoT

Azure IoT Hub - Where can I see why the hub disconnects the devices?

I'm using an Azure IoT Hub. I'm still in the development phase. It used to work fine, but now the hub is disconnecting the devices almost immedially after they connect. Where can I see some logs or info about why the hub is disconnecting? And if I have to activate some services, which ones?
You may need to turn on diagnostics for IoT Hub for logging the device connection events and errors. Once the logs and alerts are ON for connected devices, you will get alerts, error logs when errors occur. The troubleshooting link to begin with can be https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-troubleshoot-connectivity which captures details about how to enable diagnostics, alerts and other possible troubleshooting methods. This section 'Resolve connectivity errors' has description on how to look for common issues when you receive an alert and this seems to have dependency on Azure monitor logs to be enabled. It also furnishes information in terms of problem resolution guides for the most common errors.
There are couple of services integrated with IoT Hub like Azure Monitor and Azure Resource Health that help to provide you with the data required for keeping your IoT solution running in healthy state. Azure Resource Health helps to monitor whether your IoT hub is up and running. Here is a related link on iot hub health monitor and diagnose problems that can be a additional reference for you.
Azure Monitor stores log data in a Log Analytics workspace, which is an Azure resource and a container where data is collected, aggregated, and serves as an administrative boundary as conveyed in Azure monitor logs. Data in Azure Monitor Logs is retrieved using a log query written with the Kusto query language, which allows you to quickly retrieve, consolidate, and analyze collected data.

How should I link a backend solution to an IoT Hub

So, I am working on an IoT solution on Azure, we have been using a partner solution where we had the partner's devices linked to his cloud solution that exposes the data to us Via REST services. Right now we want to have our own IoT Cloud Solution on Azure.
At first, I am planning to build a Bridge between our IoT Solution and the partner's cloud solution via its REST Services that will link to our IoT Hub in order to ingest the data to our cloud.
Also, the data will not be only telemetry data but we'll have to send commands as well to those devices.
My question: I would like to know what would be the appropriate technology/solution to use a gateway (Data Grid, Azure Function, Azure WebJob)
The numbers in the picture represent the step that I am considering to tackle this problem.
1- First we are implementing an Application gateway that will have to get the data from the partner's system and sending commands to their system. It will allow us to first build the other components of our system and make sure that it can handle what is in place right now.
2- Second, the partner's devices will connect directly to a device gateway that is connected to our IoT Hub. In this case, we will not be using the gateway made in 1 anymore.
3- Finally, we will have our own devices connected to our IoT Hub, the partner's devices will always be connected to our IoT Hub via the gateway built in 2.
Let me try to answer your questions in the order you have asked.
For application gateway, where you are trying to pull data through
REST, you can use Azure functions and then you use Cosmos DB or any
storage to save data. I see , after getting device data from Partner
network, you are routing it to IoT-Hub (I would not say, its
incorrect), however once we pull data through Rest, we can directly
put into DB. So my Answer is to use Azure functions to pull data
from Partner solutions and put into DB.
If partner device is capable of running Azure IoT sdks or can be
provisioned to send data to IoT Hub directly, this will ease lot of
things and you would be able to send D2C and C2D messages easily.
further, here you can route data to DB by using configuration from
IoT Hub.
For your devices you can use IoT Hub Directly or can use Azure
IoT Edge (device gateway as you pointed ), both are fine , depends
on use case and also if we want to do some edge computation or
analytics at device side. And one important suggestions, use Azure
functions where ever you find that you have to integrate devices
data through Rest. Most cost effective in such scenarios.
Let me know if it clears your doubts.
After some time working on the subject, I did implement an AZURE Function app for the following reasons :
Supports Continuous Deployment and Integration Even though Azure Functions is serverless architecture, it still supports Continuous Deployment and Continuous Integration
Capabilities for implementing code - Being event-driven, the application platform has capabilities to implement code triggered by events occurring in any third-party service or on-premise system.
Compute-on-demand: This delivery model ensures that computing resources are available to the users as per their demand.
I have also used Azure Table Storage as database storage technology.

How to send message to Azure IOT hub and display it on Client application using Azure function in portal

Am working on Azure resources like Azure Service Bus, Azure Functions, IOT Hub. Here am trying to send queue messages from Azure Service Bus to IOT Hub using Azure functions and then display that messages in my local device (Cloud-To-Device). Am able to read my messages in Azure function using Service Bus Queue Trigger and tried to send them to IOT Hub as output of function. Once, when I run the Azure function "Its can sending the messages to IOT Hub as output",but it unable to send them to client device. Can you please suggest me to "How to solve this situation"
As far as I know there is currently no way to select a Cloud to Device Message(C2D) as a Azure Functions Output.
You also cannot use the Event Hub Output as it does not support C2D messages as described here.
I can think of 2 methods to accomplish C2D messaging in Azure functions:
Use the Azure IoT SDK as described in this answer and shown in this channel9 video from 2017 (might be out of date).
Use the Azure IoT Hub REST API. You can find general configuration options here and the API endpoint to use would be senddevicecommand.
Unfortunately there is current no output binding for IoT Hub from Functions (you could write a new custom binding, though ;) )
To talk from a Function to your devices, you need the Azure Device Service SDK of the IoT Hub. Then you can either use Cloud-to-Device messages (asynchronous) or Direct Methods (synchronous). You can find a example of the latter in my GitHub repo here: https://github.com/sebader/iotedge-end2end/blob/master/CloudFunctions/DirectMethodCaller.cs
The important pieces being:
ServiceClient _iothubServiceClient = ServiceClient.CreateFromConnectionString(config["iothubowner_cs"]);
var methodRequest = new CloudToDeviceMethod("YourDirectMethodName", TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10));
var result = await _iothubServiceClient.InvokeDeviceMethodAsync(device, module, methodRequest).ConfigureAwait(false);
An implementation for C2D messages will look pretty much the same.

Creating a workflow for an IoT project

I was using ThingSpeak for an IoT project. I've decided to move on with Azure IoT. My project consists Raspberry Pi 3's sending data to an IoT platform using MQTT protocol which will be displayed over mobile app.
While using ThingSpeak, things were easier. I was sending data to IoT platform, ThingSpeak was storing them without me configuring almost anything and mobile app that I wrote was sending HTTP request to IoT platform with an interval. Then, I was parsing JSON response on mobile app to display important values in real time.
So far I've managed to send datas to IoT hub using Azure IoT C SDK. However I am very confused about how I am going to implement these on Azure IoT, what my workflow should be like.
Azure IoT Hub ingests data from your devices into the cloud and then delivers that data to other destinations for storage or processing. By default, IoT Hub delivers data from devices to an Event Hubs compatible end point (these Quickstarts illustrate this process: https://learn.microsoft.com/azure/iot-hub/quickstart-send-telemetry-node). IoT Hub can also use routing rules to send data to other locations, such as storage or a Service Bus queue. The following tutorial illustrates these options for you: https://learn.microsoft.com/azure/iot-hub/tutorial-routing.

Resources