azure-iot-hub

Send IoT Hub Cloud-to-Device message from Stream Analytics Output (Using Event Hub endpoint)

谁说胖子不能爱 提交于 2019-12-24 19:19:03
问题 We use Stream Analytics successfully for ingesting event messages sent from IoT Hub devices. Stream Analytics supports IoT Hub as Input stream out of the box. But now we have a requirement to send the Stream Analytics Output result to an IoT Hub Device. We are able to setup an Event Hub connection to IoT Hub as the Output sink for Stream Analytics, but we get an error event raised: Message: Access to the Event Hub has been denied. The token may have an invalid signature. Which raises the

How to route message to Service bus queue using routing query?

寵の児 提交于 2019-12-24 16:56:52
问题 I have an IoT hub with connected devices which sends telemetry messages. I want to read messages from each device separately, so I decided to create a different endpoint for each device. For sorting messages I use routes with query, but when I add a query rule to the route, messages stop going to the endpoint. Connected device uses MQTT. Screenshots are below: Endpoint Routes toMyEndpoint route 回答1: Your query expression is correct. But make sure you set content type and content encoding like

How to provision an Azure IoT device from a mobile app

允我心安 提交于 2019-12-24 14:49:16
问题 My requirement is to develop a mobile app which itself register the mobile device in an IoT hub using provisioning services. I am developing a mobile application using react native and Azure IoT Java SDK. It is to send telemetry data to Azure IoT hub. However I don't want to hard code the IoT connection details of each and every mobile devices. There I met the IoT provision services which can be used to register the devices programmatically. My plan was to register device upon the

Search an enrollment device on Device Provisioning Service via initialTwin tag

拥有回忆 提交于 2019-12-24 11:43:39
问题 I want to search a specific enrollment device on DPS (based on its 'OL' tag). For that, I use the next piece of code: QuerySpecification querySpecification = new QuerySpecificationBuilder("*",QuerySpecificationBuilder.FromType.ENROLLMENTS) .where("initialTwin.tags.OL='12345678ABCD'") .createSqlQuery(); Query query = provisioningServiceClient.createIndividualEnrollmentQuery(querySpecification); But, when I execute query.next() to fetch the results, always is returning all the devices in the

Azure IoTHub ExportDevicesAsync throws internal server error

倖福魔咒の 提交于 2019-12-24 07:57:23
问题 I'm working on a solution in which I want to export all the devices from an IoTHub to a BLOB. Microsoft has an API for this and explains how to do this here. I've executed this code for 10 devices and it works fine, it takes a few seconds for Azure to process this but otherwise it works just fine. However I'm working with more than 10 devices (currently testing with 100 devices) on a S1 platform, which should support an undetermined amount of devices This is the code that I've used. Program

How can I work with the received DATA from Azure IoT Hub

混江龙づ霸主 提交于 2019-12-24 07:35:46
问题 I receive the Data: public void accept(PartitionReceiver receiver) { System.out.println("** Created receiver on partition " + partitionId); try { while (true) { Iterable<EventData> receivedEvents = receiver.receive(10).get(); int batchSize = 0; if (receivedEvents != null) { for(EventData receivedEvent: receivedEvents) { System.out.println(String.format("| Time: %s", receivedEvent.getSystemProperties().getEnqueuedTime())); System.out.println(String.format("| Device ID: %s", receivedEvent

Sending message to Azure IoT hub partition

久未见 提交于 2019-12-24 06:58:22
问题 Does anyone know if there is a library that allows you to send a message to a specific partition on an IoT hub with Azure. I was previously able to achieve this with azuresblite library, unfortunatelly which I Cannot use. https://github.com/ppatierno/azuresblite 回答1: There is no way to send a message to a specific partition. Period. Partitions are used internally to allow scaling of the IoT (Event Hub) and allow for scaling out the consumer app (the one that reads the events out of the Hub).

Get a list of devices from Azure IoT Hub

巧了我就是萌 提交于 2019-12-24 02:07:55
问题 I am new at Microsoft Azure IoT Hub. I want to get a list of devices in my IoT Hub and check if there are any devices in the list. Its works fine if I use a console application. static async void QueryDevices() { registryManager = RegistryManager.CreateFromConnectionString(DeviceConnectionString); var devices = await registryManager.GetDevicesAsync(100); // Time 1 sek foreach (var item in devices) { Console.WriteLine("Divice id: " + item.Id + ", Connection state: " + item.ConnectionState); }

Automate the process of creating a private key, a CSR and a final Signed Certificate in .NET Core

亡梦爱人 提交于 2019-12-24 00:45:34
问题 Someone provided me with a intermediate certificate (signed by a root cert) and its password. In order to connect securely to an SSL enpoint I need to provide a signed certificate. Here is what I do: Create a private key Create a CSR with that private key Sign it using the provided Intermediate certificate I used openssl for all this and it worked flawlessly: The TLS endpoint accepted my conection request. In C# though it does not work. Any idea what is missing? var password = new

purpose of Azure iot hub device-to-cloud partitions

自作多情 提交于 2019-12-23 07:16:24
问题 When creating a new Azure IOT Hub you are asked how many device-to-cloud partitions you need. You can select between 2-32 partitions for standard tiers. I understand that the SKU and number of units determine the maximum daily quota of messages that you can send to IOT Hub. And that it is recommended to shard your devices into multiple IOT hubs to smooth traffic bursts. However, device-to-cloud partitions need clarification. 1>> What is the purpose of those device-to-cloud partitions under a