IotHub | MQTT Broker | Websocket library
kandi X-RAY | IotHub Summary
kandi X-RAY | IotHub Summary
Cloud based IoT system solution. MQTT Broker, MQTT Agent, SignalR Hub, Data Source API
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of IotHub
IotHub Key Features
IotHub Examples and Code Snippets
Community Discussions
Trending Discussions on IotHub
QUESTION
I was wondering if IoThub informs the device if the event grid message fails? Here is the architecture flow:
Device->IoTHub->EventGrid->Webhook
So when the EevntGrid gets some error(like 400/500 error due to some reason), does IoThub inform the device of this failure when the device could retry, or does it send a message received where the device will think the message has been sent successfully to the Webhook? Is there a workflow/ design where we could inform the device of this error?
...ANSWER
Answered 2021-Jun-07 at 20:23So when the EevntGrid gets some error(like 400/500 error due to some reason), does IoThub inform the device of this failure when the device could retry, or does it send a message received where the device will think the message has been sent successfully to the Webhook?
No, it is an asynchronous flow. There won't be any cloud-to-device message that tells the device thing have failed. At least not out-of-the-box. Also, the retry logic is already present in the Event Grid, no need for the device to retry the message unless it fails to communicate with the IoT Hub.
Is there a workflow/ design where we could inform the device of this error?
Take this example:
- Device sends telemetry
- IoT Hub receives message and passes it to Event Grid
- Event Grid tries to deliver event
- Event delivery fails due to a transient error
- Event Grid retries event delivery n times over a given period
- Event is succesfully delivered or dead lettered
- In case of succesful delivery, the message is processed by the endpoint.
Now, the cloud-to-device message can only be send at step 6 (or 7 if you want to include the response of the final endpoint). There might be milliseconds between step 1 and 6/7 or there might be minutes, hours or even days (in worst case scenarios, depending on the retry configuration and endpoint status).
A logical thing is to have the endpoint publish its own event and get it delivered to the cloud device, but this will be an asynchronous flow.
Why do you want to burden the device with the outcome of the message delivery? I think it shouldn't have to worry about the flow unless it fails to communicate with the IoT Hub.
QUESTION
I'm trying to create new Azure Monitor Alert using PS script. I'm using MS documentation here: https://docs.microsoft.com/en-us/powershell/module/az.monitor/add-azmetricalertrulev2?view=azps-5.9.0
Steps to reproduce$condition = New-AzMetricAlertRuleV2Criteria -MetricName "SqlDbDtuUsageMetric" -MetricNameSpace "Microsoft.Sql/servers/databases" -TimeAggregation Average -Operator GreaterThan -Threshold 5
$act = New-AzActionGroup -ActionGroupId /subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/microsoft.insights/actionGroups/SqlDbDtuUsageAction
Add-AzMetricAlertRuleV2 -Name "SqlDbDtuUsageAlertGt5" -ResourceGroupName {resource_group} -WindowSize 00:05:00 -Frequency 00:05:00 -TargetResourceId "/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Sql/servers/{sql_server}/databases/vi{sql_db}" -Description "Alerting when max used DTU is > 20" -Severity 3 -ActionGroup $act -Condition $condition
Error outputWARNING: 09:04:18 - *** The namespace for all the model classes will change from Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases. WARNING: 09:04:18 - *** The namespace for output classes will be uniform for all classes in future releases to make it independent of modifications in the model classes. VERBOSE: Performing the operation "Create/update an alert rule" on target "Create/update an alert rule: SqlDbDtuUsageAlertGt5 from resource group: vi-prod-be-cin-rg". Add-AzMetricAlertRuleV2 : Exception type: ErrorResponseException, Message: Couldn't find a metric named metric1. Make sure the name is correct. Activity ID: 3e7e537e-43fc-40ad-8a84-745df33e1668., Code: BadRequest, Status code:BadRequest, Reason phrase: BadRequest At line:1 char:1
- Add-AzMetricAlertRuleV2 -Name "SqlDbDtuUsageAlertGt5" -ResourceGroupN ...
- ...
ANSWER
Answered 2021-May-25 at 01:40According to the error, the MetricNameSpace Microsoft.Sql/servers/databases
does not contain metric SqlDbDtuUsageMetric
. Regarding the supported metric, please use the following command to get
QUESTION
I am trying to enable certs at the IoT Edge device end I am using the demo certs but the iothub module is failing with below error
...ANSWER
Answered 2021-May-07 at 00:51I made a mistake while mentioning the path to the root ca. The issue is resolved
QUESTION
I get an ERROR: The request did not have a subscription or a valid tenant level resource provider.
when trying to create a service principal
via the azure cli under the scope
of an Azure Iot Hub
. I'm using the CLI (bash) but python would be sufficient, too.
As shown at end, i have correct credentials & rights to create sp's in this subscription, and i have owner rights to the iot hub in question.
In case i'm missing a better way to accomplish this, here is the context: We need to authenticate a job that automates the registration of new devices immediately after they are flashed, before they are shipped off to be plugged in. This does many things to customize the flashed filesystem (add unique device hostname & local passwords, for instance); and finally it needs to register the device with IotHub.
...ANSWER
Answered 2021-Mar-27 at 02:26This was caused by a bug in the azure CLI. az iot hub show
is returning an improperly quoted string; az acr show
for example does not.
az iot hub show --name your-iothub-name --query id
returns a string like the following. both quotes "
are in the original
'"/subscriptions/guid/.../IotHubs/your-iothub-name"'
az acr show --name your-acr-name --query id
returns the same format string, but without the extra '
quoting.
"/subscriptions/.../registries/your-acr-name"
az iot hub device-identity create
cannot deal with the '"
..."'
(understandable) but unfortunately doesn't fail cleanly, making this a bit difficult to track down as quoting blends in a bit for script output.
QUESTION
I am able to successfully connect with a python example to my created IoT Edge. However, the same configuration does not work for my actual downstream device (ESP8266).
Downstream device (ESP8266) ConfigurationI am using the following example for the ESP8266: https://github.com/Azure/azure-iot-arduino/tree/master/examples/esp8266/iothub_ll_telemetry_sample
Added the certificate and connection string in the code:
...ANSWER
Answered 2021-Mar-24 at 14:24Finally it's working. Switched the hardware from ESP8266 to ESP32 and running (same code) without any issues.
QUESTION
I want to regularly update the desired properties for IoT Device. The desired properties that I am sending is as follows:
...ANSWER
Answered 2021-Mar-19 at 08:47Try this, upload desired
value to reported
once desired
value changes :
QUESTION
On the Azure IoT Hub's "IoT devices" page I am getting an error:
...ANSWER
Answered 2021-Mar-11 at 17:13It appears this was a transient issue on Azure's side: docs.microsoft.com/en-us/answers/questions/306681/index.html
QUESTION
Using IOTHub message routing feature, I am able to listen device twin change notifications whenever there is any change in device twin.
No matter whether it is a change in tags or reported properties or desired properties.
What I am looking for is a way to filter out events when reported properties are changed. I don't want (or I would like to ignore) any notification for changes in tags or desired properties.
For now, as of my research it can be only done by maintaining last reported properties version and comparing it with new event reported properties version.
Please enlighten me if any other way is there without having to maintain last version details somewhere.
ANSWER
Answered 2021-Mar-11 at 12:47your Message routing should be configured with the following:
Data Source: TwinChangeEvents
Routing Query: IS_OBJECT($body.properties.reported)
QUESTION
I am using Python 3.8.2 on Linux and the azure iot python sdk version 2. I have setup device provisioning in the Azure Portal and can successfully provision my device using the following code.
Provisioning code:
...ANSWER
Answered 2021-Feb-16 at 08:20The answer is that MS does not know how to solve this issue. There are two tickets on the same issue as you are having on github
and microsoft docs
.
First it is important to know exact version of your
azure-iot-sdk-python
. The reporter had these:
Software versions: Python==3.7.8 azure-iot-device==2.3.0
I presume there is an regression in the azure-iot-sdk-python
. Currently Microsoft does not know the cause of the issue.
I would report it to Microsoft:
Hello @VarunVenkatesh-7647, Could you please send us an email attaching your python app code. Please remove your IoT Central's ID scope, Device ID, and Primary key from the .py file before attaching it to the email.
Please send an email to azcommunity@microsoft.com with the below details, so that we can work on this matter.
Thread URL: Link to this thread. Subject : Attn Satish Boddu Attachment: your environmental_sensor.py file.
Next to try is to downgrade your azure-iot-sdk-python
gradually and see if the problem is resolved. You could then do a diff
of the changes and send it to Microsoft too.
QUESTION
I am looking for an endpoint in Azure IotHub to download the full configuration of an edge device.
...ANSWER
Answered 2021-Jan-28 at 10:00One option to query the local configuration is:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install IotHub
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page