Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on "Route events within and outside of Azure Digital Twins" #66124

Closed
maxstefaniv opened this issue Nov 16, 2020 · 5 comments
Closed

Issue on "Route events within and outside of Azure Digital Twins" #66124

maxstefaniv opened this issue Nov 16, 2020 · 5 comments

Comments

@maxstefaniv
Copy link

maxstefaniv commented Nov 16, 2020

To whom it may concern, I hope you can understand my issue and give me some answers.
This is based mainly on the data flow explained on Route events within and outside of Azure Digital Twins.
I have some issues finding out and understanding the proper use of a Telemetry on DT as well as the proper generation and consumption. Let me elaborate and ask proper questions:

  • On DTDL Version1, it states that "Telemetry describes the data emitted by a device or digital twin.." and on DTDL Version2 it states that "Telemetry describes the data emitted by any digital twin...".
    All the examples and documentations on DT that I was able to find uses IoT hub Telemetry to overwrite a Property field on DT. Next step being a function that reads that Property and propagates it through DT or out. End-to-end solution this is the example.
    In order to do that DTDL json Model needs to have declared that property on a created DT.
    Question: How is that I can generate Telemetry messages on behalf of a DT without the need of defining that value on a DT as a Telemetry using: client.PublishTelemetryAsync(twinId, Guid.NewGuid().ToString(), "{\"Telemetry1\": 5}"); Git Repo?
    Let me elaborate more:
            "name": "Temperature",
            "@type": [
                "Telemetry",
                "Temperature"
            ],
            "description": "Temperature characteristics",
            "schema": "double",
            "unit": "degreeCelsius"
        },

This is what I declared on my DT. and the above call to client.PublishTelemetryAsync is what I am sending on behalf of this DT. Through event stream the message is sent as telemetry from defined by ID Digital Twin. So the second function that reads, as explained ->Data flow: Digital Twin Change Notification, Digital Twin Lifecycle Notification, Digital Twin Relationship Change Notification and Digital Twin Telemetry Messages will detect a Telemetry name: Telemetry1 (or whatever we want to call it).

Question : Why declare on a DT a Telemetry when in order to emit Telemetry data on behalf of a DT there is no validation with DT for existence of that field?

  • I also noted that this generated Telemetry once detected on endpoint function is not properly consumed. I detect the telemetry a bunch of times when this Telemetry message should disappear once it is consumed on the endpoint.

Final and most important questions:
Am I failing to understand how Telemetry is generated From or on behalf of a Digital Twin?
Could someone link me a proper use example, as I failed to find it?
Which is the value for declaring Schema, Unit, @type for telemetry on DT when it looks like they are not used?

Thank you, very much, for your time.
Kind regards,
Max


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@SaurabhSharma-MSFT
Copy link
Contributor

@maxstefaniv Thanks for the feedback ! I have assigned this issue to content author to investigate and update the document as appropriate.

@alexkarcher-msft
Copy link
Contributor

Hi @maxstefaniv

Thanks for the super detailed response, this is a really good question!

Right now, the only use for Telemetry is to make it a bit easier to send raw telemetry alongside lifecycle events using one message service.

The functionality that you're asking for is contained within twin change events. Those validate input and generate events to drive downstream logic. Plus, you get the benefit of being able to use our query API for the last known value of your IoT devices.

You'll notice in our ingestion tutorial we consume telemetry from IoT hub directly in our ingestion function, and only pass twin update requests on to the Twins instance.

I also noted that this generated Telemetry once detected on endpoint function is not properly consumed. I detect the telemetry a bunch of times when this Telemetry message should disappear once it is consumed on the endpoint.

Your other issue looks much more dire. Are you still experiencing this bug? Is there a particular tutorial you're following that was unable to properly dequeue messages?

@baanders
Copy link
Contributor

@maxstefaniv Hello, are you still experiencing this issue? We'll be closing this issue in 7 days if it's been resolved or if there is no further information by then. (We can also reopen at any time if necessary.)

Thank you!

@maxstefaniv
Copy link
Author

maxstefaniv commented Dec 16, 2020 via email

@baanders
Copy link
Contributor

Thanks for the response! Sounds great!

#please-close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants