diff --git a/.azure-devops/sync_models.yml b/.azure-devops/sync_models.yml index b3d51bbe2..e328fcef5 100644 --- a/.azure-devops/sync_models.yml +++ b/.azure-devops/sync_models.yml @@ -2,7 +2,7 @@ variables: - name: dmrClientVer - value: 1.0.0-beta.2 + value: 1.0.0-beta.3 - name: indexStagingPath value: ./index_pages/ - name: pageLimit diff --git a/.github/workflows/validate_models.yml b/.github/workflows/validate_models.yml index 1b6169970..c039811ef 100644 --- a/.github/workflows/validate_models.yml +++ b/.github/workflows/validate_models.yml @@ -13,13 +13,13 @@ jobs: uses: actions/checkout@v2 with: repository: Azure/iot-plugandplay-models-tools - ref: 1.0.0-beta.2 + ref: 1.0.0-beta.3 path: dmr-tool-cache - name: Build and install Microsoft.IoT.ModelsRepository.CommandLine tool (dmr-client) run: | dotnet pack dmr-tool-cache/clients/dotnet -v q -c Release - dotnet tool install -g Microsoft.IoT.ModelsRepository.CommandLine --add-source dmr-tool-cache/clients/dotnet/Microsoft.IoT.ModelsRepository.CommandLine/bin/Release --version 1.0.0-beta.2 + dotnet tool install -g Microsoft.IoT.ModelsRepository.CommandLine --add-source dmr-tool-cache/clients/dotnet/Microsoft.IoT.ModelsRepository.CommandLine/bin/Release --version 1.0.0-beta.3 rm -rf dmr-tool-cache - name: Checkout code diff --git a/dtmi/azure/sensors-1.json b/dtmi/azure/sensors-1.json new file mode 100644 index 000000000..9cf65d205 --- /dev/null +++ b/dtmi/azure/sensors-1.json @@ -0,0 +1,78 @@ +{ + "@context": [ + "dtmi:iotcentral:context;2", + "dtmi:dtdl:context;2" + ], + "@id": "dtmi:azure:sensors;1", + "@type": "Interface", + "contents": [ + { + "@id": "dtmi:azure:sensors:battery;1", + "@type": "Telemetry", + "comment": "Level percentage", + "displayName": { + "en": "Battery Level" + }, + "name": "battery", + "schema": "integer" + }, + { + "@id": "dtmi:azure:sensors:accelerometer;1", + "@type": [ + "Telemetry", + "AccelerationVector" + ], + "displayName": { + "en": "Acceleration" + }, + "name": "accelerometer", + "schema": "vector" + }, + { + "@id": "dtmi:azure:sensors:gyroscope;1", + "@type": "Telemetry", + "displayName": { + "en": "Rotation" + }, + "name": "gyroscope", + "schema": "vector" + }, + { + "@id": "dtmi:azure:sensors:magnetometer;1", + "@type": "Telemetry", + "displayName": { + "en": "Magnetic induction" + }, + "name": "magnetometer", + "schema": "vector" + }, + { + "@id": "dtmi:azure:sensors:barometer;1", + "@type": [ + "Telemetry", + "Pressure" + ], + "displayName": { + "en": "Pressure" + }, + "name": "barometer", + "schema": "double", + "unit": "kilopascal" + }, + { + "@id": "dtmi:azure:sensors:geolocation;1", + "@type": [ + "Telemetry", + "Location" + ], + "displayName": { + "en": "Location" + }, + "name": "geolocation", + "schema": "geopoint" + } + ], + "displayName": { + "en": "Sensors" + } + } \ No newline at end of file diff --git a/dtmi/azure/smartphone-1.json b/dtmi/azure/smartphone-1.json new file mode 100644 index 000000000..f5fe4c1e2 --- /dev/null +++ b/dtmi/azure/smartphone-1.json @@ -0,0 +1,351 @@ +{ + "@id": "dtmi:azure:smartphone;1", + "@type": "Interface", + "contents": [ + { + "@id": "dtmi:azure:smartphone:sensors;1", + "@type": "Component", + "displayName": { + "en": "Sensors" + }, + "name": "sensors", + "schema": "dtmi:azure:sensors;1" + }, + { + "@id": "dtmi:azure:smartphone:device_info;1", + "@type": "Component", + "displayName": { + "en": "Device information" + }, + "name": "device_info", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1" + }, + { + "@id": "dtmi:azure:smartphone:enableSensors;1", + "@type": "Command", + "commandType": "synchronous", + "displayName": { + "en": "Enable Sensors" + }, + "name": "enableSensors", + "request": { + "@type": "CommandPayload", + "displayName": { + "en": "Sensor" + }, + "name": "sensor", + "schema": { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema;1", + "@type": "Object", + "displayName": { + "en": "Sensor" + }, + "fields": [ + { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:sensor;1", + "displayName": { + "en": "Sensor" + }, + "name": "sensor", + "schema": { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:sensor:schema;1", + "@type": "Enum", + "displayName": { + "en": "Enum" + }, + "enumValues": [ + { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:sensor:schema:Acceleration;1", + "displayName": { + "en": "Acceleration" + }, + "enumValue": "accelerometer", + "name": "Acceleration" + }, + { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:sensor:schema:Pressure;1", + "displayName": { + "en": "Pressure" + }, + "enumValue": "barometer", + "name": "Pressure" + }, + { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:sensor:schema:Rotation;1", + "displayName": { + "en": "Rotation" + }, + "enumValue": "gyroscope", + "name": "Rotation" + }, + { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:sensor:schema:MagneticInduction;1", + "displayName": { + "en": "Magnetic Induction" + }, + "enumValue": "magnetometer", + "name": "MagneticInduction" + }, + { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:sensor:schema:Location;1", + "displayName": { + "en": "Location" + }, + "enumValue": "geolocation", + "name": "Location" + }, + { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:sensor:schema:Battery;1", + "displayName": { + "en": "Battery Level" + }, + "enumValue": "battery", + "name": "Battery" + } + ], + "valueSchema": "string" + } + }, + { + "@id": "dtmi:azure:smartphone:enableSensors:request:payload:schema:enable;1", + "displayName": { + "en": "Enable" + }, + "name": "enable", + "schema": "boolean" + } + ] + } + } + }, + { + "@id": "dtmi:azure:smartphone:changeInterval;1", + "@type": "Command", + "commandType": "synchronous", + "displayName": { + "en": "Change Delivery Interval" + }, + "name": "changeInterval", + "request": { + "@type": "CommandPayload", + "displayName": { + "en": "Payload" + }, + "name": "payload", + "schema": { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema;1", + "@type": "Object", + "displayName": { + "en": "Sensor" + }, + "fields": [ + { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:sensor;1", + "displayName": { + "en": "Sensor" + }, + "name": "sensor", + "schema": { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:sensor:schema;1", + "@type": "Enum", + "displayName": { + "en": "Enum" + }, + "enumValues": [ + { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:sensor:schema:Acceleration;1", + "displayName": { + "en": "Acceleration" + }, + "enumValue": "accelerometer", + "name": "Acceleration" + }, + { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:sensor:schema:Pressure;1", + "displayName": { + "en": "Pressure" + }, + "enumValue": "barometer", + "name": "Pressure" + }, + { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:sensor:schema:Rotation;1", + "displayName": { + "en": "Rotation" + }, + "enumValue": "gyroscope", + "name": "Rotation" + }, + { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:sensor:schema:MagneticInduction;1", + "displayName": { + "en": "Magnetic Induction" + }, + "enumValue": "magnetometer", + "name": "MagneticInduction" + }, + { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:sensor:schema:Location;1", + "displayName": { + "en": "Location" + }, + "enumValue": "geolocation", + "name": "Location" + }, + { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:sensor:schema:Battery;1", + "displayName": { + "en": "Battery Level" + }, + "enumValue": "battery", + "name": "Battery" + } + ], + "valueSchema": "string" + } + }, + { + "@id": "dtmi:azure:smartphone:changeInterval:request:payload:schema:interval;1", + "displayName": { + "en": "Interval" + }, + "name": "interval", + "schema": "integer" + } + ] + } + } + }, + { + "@id": "dtmi:azure:smartphone:lightOn;1", + "@type": "Command", + "commandType": "synchronous", + "displayName": { + "en": "LightOn" + }, + "name": "lightOn", + "request": { + "@type": "CommandPayload", + "displayName": { + "en": "Parameters" + }, + "name": "parameters", + "schema": { + "@type": "Object", + "displayName": { + "en": "Object" + }, + "fields": [ + { + "displayName": { + "en": "Duration" + }, + "name": "duration", + "schema": "integer" + }, + { + "displayName": { + "en": "Pulses interval" + }, + "name": "delay", + "schema": "integer" + }, + { + "displayName": { + "en": "Pulses" + }, + "name": "pulses", + "schema": "integer" + } + ] + } + } + }, + { + "@id": "dtmi:azure:smartphone:writeableProp;1", + "@type": "Property", + "displayName": { + "en": "Writeable Property" + }, + "name": "writeableProp", + "schema": "string", + "writable": true + }, + { + "@id": "dtmi:azure:smartphone:readOnlyProp;1", + "@type": "Property", + "displayName": { + "en": "Readonly Property" + }, + "name": "readOnlyProp", + "schema": "string" + } + ], + "displayName": { + "en": "Smartphone" + }, + "schemas": [ + { + "@id": "dtmi:azure:smartphone:sensors:schema;1", + "@type": "Enum", + "displayName": { + "en": "Enum" + }, + "enumValues": [ + { + "@id": "dtmi:azure:smartphone:sensors:schema:Acceleration;1", + "displayName": { + "en": "Acceleration" + }, + "enumValue": "accelerometer", + "name": "Acceleration" + }, + { + "@id": "dtmi:azure:smartphone:sensors:schema:Pressure;1", + "displayName": { + "en": "Pressure" + }, + "enumValue": "barometer", + "name": "Pressure" + }, + { + "@id": "dtmi:azure:smartphone:sensors:schema:Rotation;1", + "displayName": { + "en": "Rotation" + }, + "enumValue": "gyroscope", + "name": "Rotation" + }, + { + "@id": "dtmi:azure:smartphone:sensors:schema:MagneticInduction;1", + "displayName": { + "en": "Magnetic Induction" + }, + "enumValue": "magnetometer", + "name": "MagneticInduction" + }, + { + "@id": "dtmi:azure:smartphone:sensors:schema:Location;1", + "displayName": { + "en": "Location" + }, + "enumValue": "geolocation", + "name": "Location" + }, + { + "@id": "dtmi:azure:smartphone:sensors:schema:Battery;1", + "displayName": { + "en": "Battery Level" + }, + "enumValue": "battery", + "name": "Battery" + } + ], + "valueSchema": "string" + } + ], + "@context": [ + "dtmi:iotcentral:context;2", + "dtmi:dtdl:context;2" + ] + } \ No newline at end of file