Giter Site home page Giter Site logo

azure-samples / azure-digital-twins-getting-started Goto Github PK

View Code? Open in Web Editor NEW
27.0 17.0 23.0 7.67 MB

Resources for getting started with Azure Digital Twins

License: MIT License

C# 32.61% Bicep 8.57% PowerShell 6.50% ShaderLab 29.56% HLSL 4.15% GLSL 18.60%

azure-digital-twins-getting-started's Introduction

page_type languages products name description urlFragment
sample
json
azure-digital-twins
Azure Digital Twins getting started samples
Contains getting started samples for Azure Digital Twins.
digital-twins-getting-started

Azure Digital Twins getting started samples

These samples can help you get started with Azure Digital Twins.

Contents

This project contains the following folders.

Folder Description
models Contains sets of "getting started" models to illustrate how certain subjects might be modeled in Digital Twins Definition Language (DTDL).
adt-adx-queries Contains sample queries that can be run with the Azure Digital Twins query plugin for Azure Data Explorer (coming soon).
azure-functions Contains sample Azure functions that can be used (as an example) with Azure Digital Twins for managing data ingress and twin updates.
ISS Project to track the International Space Station with Azure Digital Twins and Azure Data Explorer
bulk-import Contains helper code to generate ndjson files that can be used for bulk import

Resources

azure-digital-twins-getting-started's People

Contributors

abhinav-ghai avatar baanders avatar danhellem avatar jjaramillo98 avatar michielvanschaik avatar microsoft-github-operations[bot] avatar microsoftopensource avatar sekhar-kutikuppala avatar taylor-anderson821 avatar waywardhayward avatar wuqiten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-digital-twins-getting-started's Issues

NDJsonGenerator doesn't generate json compatible with az dt job import create

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run the code in bulk-import/ndjson-generator

Any log messages given by the failure

{"timestamp":"2023-03-21T13:38:43.7308428Z","jobId":"bulk-import-job-58f612c179e44b5dbf46a5f3e3b2a55c","jobType":"Import","logType":"Info","details":{"status":"Started"}}
{"timestamp":"2023-03-21T13:38:47.4166872Z","jobId":"bulk-import-job-58f612c179e44b5dbf46a5f3e3b2a55c","jobType":"Import","logType":"Error","details":{"section":"Models","line":9263,"exceptionType":"UnsupportedFileFormat","message":"Relationship must have property $dtId representing the ID of the source twin."}}
{"timestamp":"2023-03-21T13:38:47.8737031Z","jobId":"bulk-import-job-58f612c179e44b5dbf46a5f3e3b2a55c","jobType":"Import","logType":"Error","details":{"section":"Models","status":"Failed"}}
{"timestamp":"2023-03-21T13:38:48.57213Z","jobId":"bulk-import-job-58f612c179e44b5dbf46a5f3e3b2a55c","jobType":"Import","logType":"Error","details":{"status":"Failed"}}

Expected/desired behavior

The code should generate json that is compatible with az dt job import create.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Azure Digital Twins. Doesn't run locally.

Versions

az --version
azure-cli                         2.45.0 *

core                              2.45.0 *
telemetry                          1.0.8

Extensions:
azure-iot                         0.21.0
kusto                              0.5.0

Dependencies:
msal                              1.20.0
azure-mgmt-resource             21.1.0b1

Python location '/opt/az/bin/python3'
Extensions directory '/home/rquackenbush/.azure/cliextensions'

Python (Linux) 3.10.8 (main, Feb  3 2023, 09:43:57) [GCC 9.4.0]

Mention any other details that might be useful

I was able to mitigate this with the following:

string sanitzedRelationship = JsonSerializer.Serialize(relationship, relationship.GetType())
   .Replace(Environment.NewLine, string.Empty)
   .Replace("$sourceId", "$dtId");

Iryju

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

how can you make the dashboard as no history data in ADT?

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

ADX queries and ADT on a Visual Studio MSDN subscription with outlook account

Hi,

From my MVP membership I have an Visual Studio MSDN subscription with Azure credits. Now I have followed the manual (and my ADT is already running with other apps, ADT explorer is also working with this account, so security wise everything is ok) but when I try to run on sample ADX database the queries in this example receive the following error:

Request is invalid and cannot be processed: AADSTS50020: User account '{EmailHidden}' from identity provider 'live.com' does not exist in tenant 'Microsoft Services' and cannot access the application 'XXXXXXXXXXXX'(Azure Data Explorer) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.
Trace ID: f9f56b8a-e645-4eed-8c84-e1c2e469ae00
Correlation ID: b1a5f978-d480-40a3-87e6-ad725c4baef6
Timestamp: 2021-06-24 07:40:42Z

I was following this manual: https://github.com/Azure-Samples/azure-digital-twins-getting-started/blob/main/adt-adx-queries/sample-queries.kusto

thanks,

Remco

undesired behavior of parent not being updated properly

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

first of all, I'd like to make it clear I have no experience at all with C#, so it might be the case that this is a very trivial question.

I am trying to follow this tutorial: https://docs.microsoft.com/en-us/azure/digital-twins/how-to-send-twin-to-twin-events

using this function sample: https://github.com/Azure-Samples/azure-digital-twins-getting-started/blob/main/azure-functions/twin-updates/ProcessDTRoutedData.cs

However, I am facing a weird error.

Any log messages given by the failure

N/A

Expected/desired behavior

The idea of this code is that every time a child twin is updated somehow, for example with data coming from an IoT HUB, the parent twin would also be updated. For example, we have a room with 2 thermostats, when there is an update on the thermostats the room temperature would be updated with an average of the temperatures of the thermostats. My issue is the following: if my thermostat 1 has a value of 25oC and thermostat 2 has a value of 27oC at timestep 1 my room temperature should be 26oC, however, I am getting no data, I only get data on the parent twin on timestep 2, when a new update is done on the thermostats, so if at the timestep 2 thermostat 1 has a temperature of 30oC and thermostat 2, a temp of 32oC, the room should show 31oC, however, it shows the 26oC from timestep 1, as you can see we keep having this delayed reaction. to be a bit more specific in my case, I have a device that aggregates (sums) readings from other 4 devices, the total on the aggregator looks off by one iteration every time this function is called

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) Windows 10

Versions

Mention any other details that might be useful

the code I am using can be found here: https://stackoverflow.com/questions/73052487/azure-digital-twins-twin-to-twin-update


Thanks! We'll be in touch soon.

Upload of models fails in the Explorer

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

On the Smartgrid scenario, these steps do not work. The models are never uploaded. There is no error messages displayed either:

_Go to the folder where you downloaded the repository. Navigate into /model/energy-grid-example.

Select all the JSON files (models) and upload them._

Any log messages given by the failure

image

Expected/desired behavior

The models can be uploaded successfully to the ADT instance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.