Does an Azure IoT Hub Maintain both an device twin and a digital twin? - azure-iot-hub

From https://learn.microsoft.com/en-us/azure/iot-develop/concepts-digital-twin#device-twins-and-digital-twins, it says "Along with a digital twin, Azure IoT Hub also maintains a device twin for every connected device. A device twin is similar to a digital twin in that it's a representation of a device's properties. An IoT hub initializes a digital twin and a device twin the first time an IoT Plug and Play device is provisioned".
I'm trying to understand where the digital twins and the device twins are kept. Are they part of the Azure IoT Hub?
There's another Azure service called Azure Digital Twins (https://azure.microsoft.com/en-us/products/digital-twins/). Is that where the IoT digital twins are kept? Even though I can see some devices and device twins in my Azure IoT Hub, I don't see any digital twins in Azure Digital Twins.

Your Azure IoT Hub maintains both the device twin and the digital twin - as the article you referenced describes, they use different JSON representations of the device state. There are separate APIs for each.
Azure Digital Twins is a separate Azure service that extends the concept of the digital twins maintained by IoT Hub. In ADT, the model can represent complex clients, such as smart buildings.

Related

Azure device template vs device twin

Azure IoT Serivce has a Device Template and a Device Twin. How are those two connected - I haven't found an article that clarifies that yet. What is the difference, how are they related? I assume the following: the device twin is derived from the properties,... of the device template.
Where can I find the raw device twin data in IoT Central?
You're correct that they're related - here's a summary:
The device template is an IoT Central only concept.
The device twins concept is applicable to both IoT Hub and IoT Central.
The Device Template defines the capabilities of a device that connects to IoT Central - the capabilities include the telemetry the device sends, the properties that represent the device state, and the commands that the device can respond to. IoT Central uses the device template to define a UI for the device letting you plot telemetry, manage properties, and call commands.
The Device Twin is an abstraction that lets you work with device properties both on the device and in the cloud. Conceptually, a Device Twin is a JSON representation of the device properties (state) that's synced between the device and the cloud. Some properties are read-only which means only the device can modify them. Some properties are read/write which means both the device and the cloud can modify them. A device twin is a useful abastraction for device and cloud developers writing code that interacts with device properties.
The part of the device template that defines the device properties, in effect defines the structure of the device twin that's shared between the device and IoT Central. In IoT Central, you can define views that let you see the device properties, and forms that let you manage read/write device properties. Because IoT Central has GUI tools that you can customize to work with device properties, the device twin concept is less important when you're working with IoT Central.
You can view the raw data that IoT Central receives from a device on the "Raw data" tab for a device:

Access control of Azure IoT Edge device management

Is it possible to restrict management of IoT edge devices by groups or some filtering criteria?
The scenario would be that we have different sites with different edge devices deployed to these sites. We have a single IoT hub for the organization, is it possible to restrict management of only certain devices within the IoT hub or would we require different IoT hubs by site to do this?

Is there a way to connect the data present in Azure IOT hub to IOT Central smart meter application

I have published data to the Azure Iot Hub devices from my hardware devices. Now I want to perform some analysis using the IOT Central's application 'Smart Meter Monitoring' the link to the website is this https://apps.azureiotcentral.com/build/energy.To be more concise, I'm trying to consume the data present in the azure iot hub devices using the the IOT Central's application 'Smart Meter Monitoring' so that i can build dashboards on the data that is consumed. I Have browsed many websites and I am not having any progress in trying to connect azure IOT HUB and the 'Smart Meter Monitoring' application of IOT central. I am beginner in this field want to understand how this integration is made any tutorial or blog will be helpful
You could use this repo https://github.com/IOTD-Americas/iothub-bridge-function in order to re-send all telemetry from IoT Hub to IoT Central using an Azure Function in real time

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).

How to query the build-in IoT-Hub of Azure Digital Twins?

As far as I understand, every instance of Azure Digital Twins Preview brings its own IoT-Hub. A normal Azure IoT-Hub I could query like this (https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-query-language):
SELECT * FROM devices
How do I query the built in IoT-Hub of Azure Digital Twins?
Or isn't it possible to access this IoT-Hub and I always have to use the Digital Twins REST-API?
The current preview of Azure Digital Twins does not allow you to query the IoT Hub. However, at Microsoft Build, a new version of the preview was announced. This will change the structure of the Digital Twins itself and also allow you to bring your own Azure IoT Hub to integrate with. In the Build Book Of News, it is stated that this preview should come this summer.
As Matthijs van der Veer mentioned, Currently, there is no direct access to the IoT Hub created along with Digital Twins. However, in GA we will have the ability for you to bring your own/directly create & associate your own hub. Yes, you need to use Management API to connect the IotHub.
The new capabilities, which will be available in the summer of 2020, include OPEN Modeling Language, live execution environment, easy integration with Azure IoT Hub and other Azure services, and rich query APIs.
For more updates regarding Azure Digital Twins, please check Azure Updates page.