azure-iot-sdk

How to disable Enable connection to IoT Hub?

烂漫一生 提交于 2021-02-11 12:23:09
问题 I am rehistering succesfully a device in a Azure IoT hub via device provisioning service, but i want to disable the property Enable connection to IoT Hub to disable for every registered device. Is there any way to do this from the code. 回答1: You can use the REST API that allows to create or update enrollments (either group enrollments or single enrollments), in particular the provisioningStatus flag. (there is a similar API for individual enrollments). Next time your device tries to use DPS

Azure IoT Edge ModuleClient invoke direct method in another module

ε祈祈猫儿з 提交于 2021-02-08 10:12:50
问题 I'm using the Azure IoT Edge runtime running Linux containers on a Windows host OS. I have two modules, ModuleA and ModuleB. ModuleA have a registered direct method called "MethodA" and ModuleB have a registered direct method called "MethodB". When I invoke MethodA I want the method to invoke MethodB located in another module (but running in the same IoT Edge runtime). I'm using the Azure IoT SDK for c# and in the Init() function of ModuleA I have: await ioTHubModuleClient

How read line separated json file from azure data lake and query using usql

戏子无情 提交于 2020-03-16 08:14:20
问题 I have ioT data in azure datalake structure as {date}/{month}/{day}/abbs. Json Each file has multiple records separated by new line .. How to read this data using usql and load into table and query. When I load it in usql table using / / / / .json will that load data into same table when new files added to files. I have followed qzure docs but did not find any answer to line separated json file. 回答1: In this example we will create a table to store events: CREATE TABLE dbo.Events ( Event

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

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

Receiving acknowledgements using IoT Hub

穿精又带淫゛_ 提交于 2019-12-25 09:13:09
问题 When using DeviceClient I can send messages using SendEvent and files using SendBlob. But I did not find a way to receive acknowledgement that messages/files have been received by Azure IoT Hub? The only way I found to solve this is using serviceClient.GetFileNotificationReceiver(). Am I missing something or is this the only way? Also it seems I need SharedAccessKeyName to use ServiceClient. But this is not present in e.g. tokens created by DeviceExplorer (which I use for DeviceClient). Any