MicrosoftDocs / mslearn-your-first-iot-central-app

Sample code for Microsoft Learn module "Build your first IoT Central app"
MIT License
14 stars 41 forks source link

error code 400.470.006.309 when importing in device template in azureiotcentral #9

Open albreche opened 4 years ago

albreche commented 4 years ago

Hi, the json file RefrigeratedTruckCapabilityModel.json from master branch (commit ) cause an 400.470.006.309.

to reproduce, simply create a new device in azureiotcentlral as described in this tutorial and import the json file.

glahaye commented 4 years ago

I get the same problem too

olumideo commented 4 years ago

<Applies to the file: "Refrigerated Truck Capability Model.json"> Same here. It seems the problem persists. And a Google search of the error code yields nothing meaningful so far.

audacity76 commented 4 years ago

Same here

albreche commented 4 years ago

i've built the model manually within iop app central it seems the problem came from the command .

hayatochigi commented 4 years ago

I also see the problem. The detailed error information is below.

Encountered one or more errors while validating json-ld model: {"urn:refrigeratedtrucks:Refrigerated_Truck_226:SetOptimalTemperature:OptimalTemperature:1":[{"instanceId":"urn:refrigeratedtrucks:Refrigerated_Truck_226:SetOptimalTemperature:OptimalTemperature:1","errorCode":"400.804.006.107","message":"Found invalid reference properties on SchemaField urn:refrigeratedtrucks:Refrigerated_Truck_226:SetOptimalTemperature:OptimalTemperature:1. Reference properties [unit] are not allowed on SchemaField urn:refrigeratedtrucks:Refrigerated_Truck_226:SetOptimalTemperature:OptimalTemperature:1","propertyName":"vertex"}]}. Error Code: 400.470.006.309 / 1q2519kv779.6

In line 247, "name": "OptimalTemperature", "schema": "double", "unit": "Units/Temperature/celsius" but my json template is, "name": "OptimalTemperature", "writable": true, "schema": "double", "unit": "celsius"

Is the schema old format? My template which I created manually worked well --> Azure-Sphere/Azure IoT Hub/IoTCentral/

tymtam2 commented 3 years ago

I removed line 246: "unit": "celsius"

Was:

       "name": "OptimalTemperature",
       "schema": "double",
       "unit": "celsius"
},

Now:

       "name": "OptimalTemperature",
       "schema": "double"                            <------ no comma
},