Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/UlisesGascon/POC-azure-iot-digital-twins-modeling
Unlock the Power of IoT with Azure Digital Twin Modeling
https://github.com/UlisesGascon/POC-azure-iot-digital-twins-modeling
azure azure-iot azure-iot-hub azure-iothub digital-twins dtdl iot
Last synced: 5 days ago
JSON representation
Unlock the Power of IoT with Azure Digital Twin Modeling
- Host: GitHub
- URL: https://github.com/UlisesGascon/POC-azure-iot-digital-twins-modeling
- Owner: UlisesGascon
- License: mit
- Created: 2023-02-05T01:13:33.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T10:29:30.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T18:41:45.614Z (about 2 months ago)
- Topics: azure, azure-iot, azure-iot-hub, azure-iothub, digital-twins, dtdl, iot
- Language: JavaScript
- Homepage:
- Size: 1.28 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# POC Azure IOT Digital Twins modeling
**Unlock the Power of IoT with Azure Digital Twin Modeling**
### :crystal_ball: About
This proof of concept uses some components from the [Digital Twins Definition Language (DTDL)](https://learn.microsoft.com/en-us/azure/digital-twins/concepts-models) to build and maintain a simple product.
#### DTDL
> A model is similar to a class in an object-oriented programming language, defining a data shape for one particular concept in your real work environment. Models have names (such as Room or TemperatureSensor), and contain elements such as properties, telemetry, and relationships that describe what this type of entity in your environment does. Later, you'll use these models to create digital twins that represent specific entities that meet this type description.
> Twin type models can be written in any text editor. The DTDL language follows JSON syntax, so you should store models with the extension .json. Using the JSON extension will enable many programming text editors to provide basic syntax checking and highlighting for your DTDL documents.
**References**
- [Learn about twin models and how to define them in Azure Digital Twins](https://learn.microsoft.com/en-us/azure/digital-twins/concepts-models)
- [Digital Twins Definition Language (DTDL)](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/DTDL.v2.md)
- [DTDL extension for VSCode](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-dtdl)### :tv: Tutorial
[![Youtube promotional banner](.github/img/banner.png)](https://www.youtube.com/watch?v=Me7IAAT_mH4)
### :tada: Features
- Simple interface that include multiple components to build a simple and isolated model
- Tests included to check the model integrity.
- Commands, Telemetry and properties integrated### :shipit: Simple model
```json
{
"@context": "dtmi:dtdl:context;2",
"@id": "dtmi:com:example:thegenericmachine;1",
"@type": "Interface",
"displayName": "thegenericmachine",
"contents": [
{
"@type": "Telemetry",
"name": "temperature",
"schema": "double"
},
{
"@type": "Property",
"name": "deviceStatus",
"schema": "string"
},
{
"@type": "Command",
"name": "reboot",
"request": {
"name": "delay",
"schema": "integer"
}
}
]
}
```### :satellite: Usage
Download the source code
```bash
git clone https://github.com/UlisesGascon/POC-azure-iot-digital-twins-modeling
cd POC-azure-iot-digital-twins-modeling
```Install the project dependencies
```bash
nvm use
npm i
```Run the linter:
```bash
npm run lint
npm run lint:fix
```Run the tests:
```bash
npm run test
npm run test:coverage
```