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

Question: Device-Twin - read reported properties on device-side #522

Closed
raycon94 opened this issue Jun 13, 2018 · 3 comments
Closed

Question: Device-Twin - read reported properties on device-side #522

raycon94 opened this issue Jun 13, 2018 · 3 comments
Assignees
Labels

Comments

@raycon94
Copy link

As I understand the standard way is to read-only desired properties and write-only reported properties on device-side. So it´s not possible to get the reported properties from the devicetwin on device-side over twin-notification-messages like for the desired-properties. But the graphic below from the azure-documentations confuses me a bit, as it illustrates that we can write and read reported properties on device-side. Does the SDK support any functions to get the reported properties on device-side?

devicetwin

@ewertons ewertons self-assigned this Jun 13, 2018
@ewertons
Copy link
Contributor

Hi @raycon94 ,
The graph is correct, you can access the full twin document from the device client, which includes the reported properties.
The answer here has two parts:

  • Currently, after you subscribe for Device Twin updates, the first time the callback is invoked you will get the full twin document, which contains both desired and reported properties. All subsequent incremental updates will have Desired properties only;
  • We are working on a new function to allow users to get the full Device Twin json on demand (like _GetDeviceTwin(...)) which will make it even easier to retrieve the properties. This is work in progress and should come within one or two months.

@ewertons
Copy link
Contributor

@raycon94 ,
we will close this issue for now but feel free to reopen it if you would like to follow up.
Thanks for using the Azure IoT SDKs!

@ewertons
Copy link
Contributor

@raycon94 , thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey

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

No branches or pull requests

2 participants