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

Twin with property using duration schema can not be updated. #114

Open
Lushkin opened this issue Feb 15, 2021 · 3 comments
Open

Twin with property using duration schema can not be updated. #114

Lushkin opened this issue Feb 15, 2021 · 3 comments

Comments

@Lushkin
Copy link

Lushkin commented Feb 15, 2021

I try to update a twin which contains a property using a duration schema.
A have created an "Asset" model (based on opendigitaltwins-building Ontology models) via the Azure Digital Twins Explorer.

As you can see here I have a TestAsset with almost all values filled except these which uses the duration schema.
image

Then I have tried to update the twin with the "expectedLife" value as following: P1Y for 1 year duration. But it never works. I always get an error:
image

I have also tried to update the twin via the C# SDK, but I have the same issue.

{"error":{"code":"ValidationFailed","message":"Invalid twin specified","details":[{"code":"ValidationFailed","message":"Validation failed for expectedLife on Twin."}]}}

Am I using a wrong format for my duration value ? I have reported to the documentation which explains that the used format should be ISO 8601.
image

So I have followed this documentation to build my duration value. But nothing seems to working.

I have tried the following values to update my twin:

  • P1Y
  • P1Y0M0D
  • P1Y0M0W0D
@danhellem
Copy link

Hello @Lushkin, we have a bug with duration that is on our list to fix in the next parser update. I don't have an exact date on when that will be available but I will update this thread when we do. Most likely sometime this late spring or early summer.

@maxstefaniv
Copy link

just leaving this commemt to have a message when this gets solved. Ty Microsoft Team DT look amazing and very promising :) HOpe to see soon more features.

@kartben
Copy link

kartben commented Jun 23, 2022

  • P1Y0M0W0D

For the record, this one is not a valid ISO-8601 duration, as weeks (W) should not appear together with any other units.

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

No branches or pull requests

4 participants