417 - This device has an empty configuration for the edge agent? - azure-iot-hub

I have created an Azure IoT Edge device by following the steps outlined here:
https://learn.microsoft.com/en-us/azure/iot-edge/quickstart-linux
When I create a deployment and check the IoT Edge device I see the following error message:
417 - This device has an empty configuration for the edge agent. Please set a deployment manifest.
What am I missing?

This happens when you create an Edge device in Azure IoT Hub and then launch the Edge runtime before setting up modules for the device in IoT Hub. Once a deployment has been done and the Edge runtime sees it, this should go away.

Related

Azure IoT Edge: How to monitor the edge module (install) state for all devices on IoT hub

Is it possible to read events from IoT hubs in a way that we receive all status changes for IoT edge module installs? Possibly by receiving state changes to the edge agent reported properties of all connected devices?
Background: We are allowing users to "install" applications (represented by edge modules) on their edge devices on the fly through our own portal. We want to monitor changes to IoT devices and their modules, and note the changes in our database, so we can flag the corresponding apps as installed, removed, or failed.
Right now I can only find Event Grid based events for Device connected / disconnected events. I can also see that I can manually query the desired properties of each edge device's edge Agent separately. But since we will a large number of edge devices connected (>5000), polling them all just to see if something changed is not feasible.
Are the edge agent status changes of all IoT edge devices available as an event stream somewhere? Or is there a better solution?
IoT Edge's integration with Azure Monitor may help (docs). It has a module view that shows which modules are running and their availability. Since all the data is available in Log Analytics, you can create custom visualizations and processes using the data.
The Module twins in Azure IoT Hub shall help in below based on the information stored with it.
Monitoring the connectivity of the system
Monitoring the health of IoT Edge deployments
The Azure IoT Edge runtime has "IoT Edge Agent" as one of two modules that performs installation / initiation of modules and updating / reporting of the status of the modules to the IoT Hub. The $edgeAgent maintains the health and connectivity data about both the IoT Edge agent and IoT Edge hub runtime modules.
The Azure IoT Edge hub runtime maintains the data about communications between the "IoT Edge hub" running on the device and that of Azure IoT hub via the $edgeHub.
High level Overview :
Here is "Azure Monitor workbooks for IoT" that provides views couple of views :
An overview / state of active devices can be seen in the "Devices" View
Alerts display as per rules configured for the devices in "Alerts" View
Azure Monitor workbooks can be tuned for seeing data at any level (device state, app status) of interest. The public templates can be modified to meet the need/requirement in hand. The data shall fetched based on resource-centric KQL queries on the InsightsMetrics table.
Screenshot of Devices View :
Screenshot of Alerts View:
References :
Monitor Module Twins
Monitor Workbooks

Azure IoT Hub Device Identity requirements

I need to connect some sensors to an Azure IoT Edge Runtime via MQTT.
I read here:How an IoT Edge device can be used as a gateway , that in the "Transparent" Pattern, devices who hold their own IoT Hub device identity can communicate directly with Azure IoT Edge via MQTT.
I am still in the planning phase and don't have the sensors (or Iot Hub devices) at the moment so I couldn't really start testing directly. I wanted to know if all devices/sensors can hold their IoT Hub device identity and if there are any hardware requirements in order to do so?
Thank you very much in advance!
In the transparent gateway case, the requirements for devices / sensors are the same as if the device would connect directly to an IOTHub using its identity. That is, if the device or sensor supports to Azure IOTHub via MQTT, it should work through the transparent gateway. When configuring the device, instead of using a connection string for the Azure IOTHub itself, you'd use a connection string that references the local Edge gateway.
There are 3 basic steps to take in the transparent gateway scenario - the article you linked steps into them, but I'll add in some color for 2 and 3.
Set up the gateway for connectivity from the downstream devices & routing to the upstream IOTHub. This article has good details.
For each device, create an identity in Azure IOTHub, using the device's unique ID (for example, device EUI for a lorawan sensor) as the IOTHub DeviceId, and set up auth per this article. This step is where you determine the Edge gateway connection string.
Connect the downstream device to the gateway device and start sending messages. That's this article. This is obviously dependent on the device itself and the operating code/configs (whether a 3rd party black box type device or something running your own code).

Azure IoT Edge Module Twin Settings Set to Empty

I have a number of devices deployed with edge modules running on them. I created a deployment in Azure Portal that targets all devices which sets the environment variables and docker settings. The deployment does not set the twin settings.
I then went into the Azure portal, clicked on the individual devices, clicked "Set modules" and set specific twin module settings for each device.
The problem now is after a period of time some of the devices are receiving an transient network error to Azure Hub which causes them to reload the module twin configuration, however some of the devices load a totally empty twin config, It will continue to periodic auto refresh twin settings with the empty twin settings. If i restart the iotedge service it refreshes the twins and will pull down the correct twin config again and continue to run as expected for a period.
This is a major issue because the modules are basically hung until I log in and manually restart the iotedge service.
Is this the correct way to configure edge modules? or am I missing something?
Thanks
After reading the following post it appears we did not properly implement a handler for twin patches. I think the edge runtime calling the twin update hook with no properties after a connection interruption is a bug however we were able to write logic to handle it based on the examples provided in the post.
https://github.com/Azure/iotedge/issues/1654#issuecomment-551258642

Arduino device type is not found at wso2 iot server's device enroll directory

There is not found android at "device types" section when I browse (https://localhost:9443/devicemgt/device/enroll to enroll android device.
In order to Enable IOT Device types which is shipped with WSO2 IOT Server you need to install those plugins in to the server prior to the server startup.
To enable the plugins please follow the steps below,
Stop the server.
Execute the following commands,
cd <IoTS_HOME>/plugins
mvn clean install -f plugins-deployer.xml
Then start the servers again.
Now you can see the rest of the iot device types listed under the enroll device page.

How to add a device to MobileFirst Operations Console?

How to add a device to MobileFirst Operations Console ?
I face issue in identifying my device in the MobileFirst Operations Console.
Please let me know how to configure my device to be detected in the console .
The only feature related to "devices" is adding device simulation in the Console's Mobile Browser Simulator as described in the following user documentation topic: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/wl_studio_tools/topics/ttestwl.html?lang=en
The other feature related to devices is Device profiling, as described in the tutorial Getting Started tutorial: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/hello-world/introduction-to-mobilefirst-platform-operations-console/
Device profiling will be made possible after applications that are installed on simulators or devices are used and connect the MobileFirst Server. You can then create device profiling based on... devices.