MicrosoftDocs / mslearn-mr-adt-in-unity

This is a repo that holds the sample code for the Mixed Reality and Azure Digital Twins in Unity Learn Path
Creative Commons Attribution 4.0 International
65 stars 55 forks source link

No DigitalTwin #16

Closed sergiosolorzano closed 2 years ago

sergiosolorzano commented 2 years ago

Hi, none of the turbines data update (though DeviceSimulator.sln shows the data in console), I checked the DigitalTwins object in Azure and there is no turbine twin - snap below.

If I set alertSent bool in AzureIoTHub in DeviceSimulator.sln , method GetTwinData in PopUpdater for twinId 102 shows message

"{\"error\":{\"code\":\"DigitalTwinNotFound\",\"message\":\"There is no digital twin instance that exists with the ID T102. Please verify that the twin id is valid and ensure that the twin is not deleted. See section on querying the twins https://aka.ms/adtv2query.\"}}"

I see RegistryManager.AddDeviceAsync but that doesn't create the digitaltwin and I can't find in the project the creation of twin with a function similar to await client.CreateOrReplaceDigitalTwinAsync<BasicDigitalTwin>(twinId, initData);

Can someone shed some light whether this example is limited to not creating the twins in Azure and relies on something else for this example? I tried the example twice and I get the same results.

Thank you image

adamlash commented 2 years ago

Hey There,

It looks like the Twins were never imported, due to the shell script maybe not completing. Do you have output from when you ran the deployment script?

sergiosolorzano commented 2 years ago

Hello @adamlash , got it to work, thank you, your video was awesome and really helped, I probably messed it up along the way, apologies :)