Hello @Alex Fang,
The name 'digital twin' can be a bit confusing here.
If you want to use Azure Digital Twins, you need to work with the Azure Digital Twins service.
Here, the 'digital twin' is the ModelID as seen in the IoT Hub device DeviceTwin:
// Get digital twin and retrieve the modelId from it
const digitalTwin = await digitalTwinClient.getDigitalTwin(deviceId);
This ModelId is a reference to registered DTDL models.
If you have the reference, you can get the actual model at:
Check out this example:
https://devicemodels.azure.com/dtmi/azure/devicemanagement/deviceinformation-1.json
Now you can parse the model and check out units etc.
Check out the blog post for more details.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.