azure-iot-hub

How do we connect Android/iOS app to Azure IoT Central and send Telemetry data?

南楼画角 提交于 2020-08-11 01:22:25
问题 We have registered our IOT device on Azure IOT Central and able to visualise Telemetry data on IoT Central. But when we use the Primary key generated on IOT central in Android Sample app by Azure to send Telemetry we cannot visualise the data. Am I missing anything? How do we register iOS and Android as a device on IoT Central to visualise the data? 回答1: The following screens snippet show an example of the sending a telemetry data to the IoT Central App using the REST Post request: Clicking

Read Azure IoT Hub Telemetry from HttpTrigger Function

烈酒焚心 提交于 2020-07-21 07:57:03
问题 Use case I have an Iot Hub device which sends telemetry data to IoT Hub. I want to process the telemetry, e.g storing to a database, using a Function. Funtion I created the following function in VS2019 and published it to Azure: [FunctionName("HttpTrigger")] public static async Task<HttpResponseMessage> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "post")]HttpRequestMessage req, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); var messages = await req

Read Azure IoT Hub Telemetry from HttpTrigger Function

痴心易碎 提交于 2020-07-21 07:54:11
问题 Use case I have an Iot Hub device which sends telemetry data to IoT Hub. I want to process the telemetry, e.g storing to a database, using a Function. Funtion I created the following function in VS2019 and published it to Azure: [FunctionName("HttpTrigger")] public static async Task<HttpResponseMessage> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "post")]HttpRequestMessage req, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); var messages = await req

Azure IoT HUB. cloud-to-device messages (MQTT, custom topics)

佐手、 提交于 2020-06-29 05:09:09
问题 Azure IoT HUB. cloud-to-device messages (MQTT, custom topic) I have an Azure IoT Hub. Here I created a custom device. This device is connected successfully with the Azure IoT Hub. I can also receive the data from this device (device-to -cloud). But I also want to send a message to this device. This device uses the "MQTT protocol". I cannot change the subscribe topic and the publish topic in this device, so I have to be able to set this "customtopics" in Azure (Function App). For this, I have

Why Primary key and Secondary key in Azure IoT hub?

徘徊边缘 提交于 2020-06-25 09:36:28
问题 When creating a shared access policy or registering a device in Azure IoT hub, there will be a Primary key and Secondary key pair generated. And I noticed I can connect a device to IoT hub using either Primary key or Secondary key. So, what's the purpose to have Primary/Secondary keys? How should I design the use of both keys? 回答1: The goal of primary and secondary key is two-fold. First of all it would allow you to keep using your service when you want to replace your key. Say you connect

iterate nested list in json msg by cql stream analytics

不羁岁月 提交于 2020-05-14 12:13:20
问题 I have a json msg coming from iotHub like: { "deviceId": "abc", "topic": "data", "data": { "varname1": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }], "varname2": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }] } } and want to store this by azure stream analytics job into a transact sql like this: ID | deviceId | varname | timestamp | respondFrame

iterate nested list in json msg by cql stream analytics

僤鯓⒐⒋嵵緔 提交于 2020-05-14 12:10:27
问题 I have a json msg coming from iotHub like: { "deviceId": "abc", "topic": "data", "data": { "varname1": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }], "varname2": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }] } } and want to store this by azure stream analytics job into a transact sql like this: ID | deviceId | varname | timestamp | respondFrame

Azure IoT Hub - Bulk Create or Update REST API returns error

左心房为你撑大大i 提交于 2020-01-25 11:10:11
问题 I am trying to use the preview version of the Azure IoT Hub API to create multiple devices (bulk) in a REST call. The API keeps returning "Request does not contain any devices" which is weird because I am formatting the request exactly as per the documentation. Here is the details of the call: Host https://<hub-name>.azure-devices.net/devices?api-version=2019-07-01-preview Headers Authorization: valid-sas-token-(tested this one), Content-Type: application/json Body { "devices":[ { "id":"TD

How to send Properties details in EventHub message using python?

半腔热情 提交于 2020-01-25 10:02:49
问题 I am referring to this article "https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-python-get-started-send" related to sending messages to EventHub using Python. A Message has the following components: offset, body, systemProperties, properties. offset is auto-generated but we can provide the other. For my project - apart from message body I also need to send "Properties" which is not part of Body, How to do that? I checked the class EventData(object) : and looks like application

Sending Cloud to Device Messages using IoT DevKit and Azure IoT Hub - Device Code

坚强是说给别人听的谎言 提交于 2020-01-25 07:20:08
问题 I need to send a message from the IoT Hub to the DevKit Device. Based on https://docs.microsoft.com/en-au/azure/iot-hub/iot-hub-devguide-c2d-guidance I want to send a Direct Method as I need to manage a bank of relays. I have an IoT DevKit and have successfully configured it and are able to send device to IoT Hub messages but am looking for a sample to do this the other way. I currently can only find samples that set the device twin properties, not send direct methods. On the server-side I