azure-iot-sdk

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

iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection. mqtt_client timed out waiting for CONNACK

青春壹個敷衍的年華 提交于 2019-12-13 20:10:02
问题 OS:Linux SDK Version : 2018-12-13 Description of the issue: iothub_ll_telemetry_sample.c when i placed 60000 in the function ThreadAPI_Sleep(60000) works well but Tried with 120000 facing the timeout error. cd ~/azure-iot-sdk-c/cmake/iothub_client/samples/iothub_ll_telemetry_sample $ ./iothub_ll_telemetry_sample Console log of the issue: Creating IoTHub Device handle Sending message 1 to IoTHub Sending message 2 to IoTHub Error: Time:Fri Dec 21 11:12:19 2018 File:/home/test/azure-iot-sdk-c

iotedge: How to requeue message that could not be processed

大憨熊 提交于 2019-12-13 04:17:58
问题 There are publisher and consumer custom modules that are running on an Edge IoT device. The publisher module keeps producing messages at constant rate no matter consumer module processes it or not. The consumer module POSTs the message to external service and given that there is no Internet connection, the consumer module would like to requeue the messsage so that is not lost and tried again. I do not prefer to write an infinite loop to keep retrying; also if the module is restarted the

How can I receive from Azure IoT Hub messages sent by devices?

[亡魂溺海] 提交于 2019-12-12 04:49:24
问题 I have successfully built azure-iot-sdk-python and I have managed to handle the device side of things: sending messages and reported-properties receiving messages and desired-properties I can also manage devices from the service side: create devices, update devices delete devices manage device twins (setting tags, reading tags, setting desired-properties, getting reported-properties) What I cannot find is how to access the Events ( messages/events ) endpoint using azure-iot-sdk-python and

How to get deviceid of message in Azure function that is triggered by IOThub message

て烟熏妆下的殇ゞ 提交于 2019-12-11 17:03:10
问题 I have an Azure function that is triggered by IOThub. So in the Azure function, I have public static async Task Run(EventData myIoTHubMessage1, TraceWriter log) How do I get the device id from the Event Data. I tried log.Info("devid="+myIoTHubMessage1.SystemProperties["ConnectionDeviceId"]); It gave an error saying The given key was not present in the dictionary. the following document says that https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-construct

Auto-provisioning device under an enrolment group does not work (java SDK)

自古美人都是妖i 提交于 2019-12-11 15:56:45
问题 I've performed this example https://docs.microsoft.com/en-us/azure/iot-dps/quick-enroll-device-x509-java It does not appear under "registration records" under the enrolment group but it throws this error: PROVISIONING_DEVICE_STATUS_FAILED, Exception: com.microsoft.azure.sdk.iot.provisioning.device.internal.exceptions.ProvisioningDeviceHubException: Signing certificate info did not match chain elements Registration: public class DeviceRegistration { String idScope; String globalEndpoint;

AMQP Message Null when using Azure IoTHub Routing

怎甘沉沦 提交于 2019-12-11 05:35:16
问题 I have a custom Endpoint + Route setup based on TwinChangeEvent in Azure IoT Hub. I'm routing the events to a Service Bus Queue (tried topic also). I'm using Java Service Bus SDK (azure-servicebus-1.1.0.jar) to pull messages off of the queue. However, I keep getting a NullPointerException in com.microsoft.azure.servicebusMessageConverter on line 124 "brokeredMessage.setMessageId(amqpMessage.getMessageId().toString());" The messageId property seems to be getting lost during the routing. Any

Create IOT Device Edge Python Sdk

梦想与她 提交于 2019-12-11 03:04:49
问题 How can create IOT Edge Device? Actually i use azure sdk service iot and created normal device, but i can't figure out how create iot edge device with azure service client sdk. 回答1: It would be similar to how you create a normal device, only difference is that you need to add a capabilities property: { deviceId: "EdgeDevice1", capabilities: { iotEdge: true } } You could also refer to the code: https://github.com/Microsoft/vscode-azure-iot-toolkit/blob/4bfff9cb24cf5f7b42728640c4ed30bf2cda4253

Trouble with Azure IoT C# SDK Certificate

此生再无相见时 提交于 2019-12-08 09:54:13
问题 I am receiving this error when I try to connect to Azure IoT Hub. Microsoft.Azure.Devices.Client.Exceptions.UnauthorizedException. I could not post the error screen shots here, since I do not have enough reputation points. So instead I wrote the whole details at http://azuregeon.blogspot.in/2017/10/azure-iot-c-certificate-connectivity.html if anyone gets a chance please have a look. 回答1: You should set the Common Name as "_demoDevice" when authenticating you x.509 device. The Common Name is