question

NikunjPhutela-3837 avatar image
0 Votes"
NikunjPhutela-3837 asked SatishBoddu-MSFT commented

Model already exists-thermostat.json and spacemodel.json

During the creation of the client app, where on submitting the thermostatModel.json, and the SpaceModel.json, I encounter an error which says:
Submitting models: ThermostatModel.json, SpaceModel.json...
Response 409: Service request failed.
Status: 409 (Conflict)

Content:
{"error":{"code":"ModelAlreadyExists","message":"Model with same ID already exists dtmi:contosocom:DigitalTwins:Thermostat;1,dtmi:contosocom:DigitalTwins:Space;1. Use Model_List API to view models that already exist. See the Swagger example.(http://aka.ms/ModelListSwSmpl)"}}

Headers:
Strict-Transport-Security: REDACTED
Date: Wed, 05 Aug 2020 10:32:11 GMT
Content-Length: 275
Content-Type: application/json; charset=utf-8


15872-error2.png


azure-digital-twins
error2.png (24.4 KiB)
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @NikunjPhutela-3837 , Thanks for reaching out to us! could you please let us know the exact documentation you have followed for this sample?

0 Votes 0 ·

I followed the digital twins end to end documentation(https://docs.microsoft.com/en-us/azure/digital-twins/tutorial-end-to-end) for this sample

0 Votes 0 ·

Hello @NikunjPhutela-3837 , Thanks for the confirmation, let me take a look at the Document. We have also received your email regarding this thread. Initially, we try our best to address the issue here on the Q&A forum, otherwise, we will contact you via email.

1 Vote 1 ·

Hello @NikunjPhutela-3837,

The initial Client APP worked perfectly with no issues from our side.

Could you please confirm if you are trying to achieve this for 33 Rooms and 33 Thermostats?



16241-image.png




0 Votes 0 ·
image.png (134.6 KiB)

Hello @SatishBoddu-MSFT , the client app works perfectly when I run the demo, but does not work when I use anything other than the demo, like a custom client app, is there a specific reason for this?

0 Votes 0 ·

Yes @SatishBoddu-MSFT , I am trying to create 33 rooms and 33 thermostats on the twin

0 Votes 0 ·

1 Answer

SatishBoddu-MSFT avatar image
1 Vote"
SatishBoddu-MSFT answered SatishBoddu-MSFT commented

Hello @NikunjPhutela-3837, Did you tried to run the app for the second time?

Have look at the section just above this Catch errors

16234-image.png

I can repro the issue, the reason is running twice the same Model.

16252-image.png



image.png (45.1 KiB)
image.png (189.5 KiB)
· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

We can check the existing Models from Azure Digital Twin Explorer.

16253-image.png


0 Votes 0 ·
image.png (87.6 KiB)

I will check out the ADT Explorer, and try visualising my relationships from the given program, if any doubts persist, I will revert back to you

0 Votes 0 ·

So must I create a new digital twin each time I make some modification in the digital twin?

0 Votes 0 ·

Hello @SatishBoddu-MSFT , I have not tried the rest API operations, but I will try them and get back to you

1 Vote 1 ·
Show more comments