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

UnitCode within Subscription payloads #622

Closed
jason-fox opened this issue Dec 9, 2020 · 1 comment
Closed

UnitCode within Subscription payloads #622

jason-fox opened this issue Dec 9, 2020 · 1 comment

Comments

@jason-fox
Copy link
Member

jason-fox commented Dec 9, 2020

I have an entity with a unitCode

{
    "@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
    "id": "urn:ngsi-ld:Device:filling001",
    "type": "FillingSensor",
    "filling": {
        "type": "Property",
        "value": 0.21,
        "unitCode": "C62",
        "observedAt": "2020-12-09T14:11:30.708Z"
    },
    "controllingAsset": {
        "type": "Relationship",
        "object": "urn:ngsi-ld:Building:farm001",
        "observedAt": "2020-12-09T14:11:30.708Z"
    }
}

set up three subscriptions - one keyValues, one normalised and one NGSI-v2-Normalised

Normalised v2

For Normalised v2 I'm getting:

"filling": {
    "type": "Property",
    "value": 0.21,
    "metadata": {
     "unitCode": {
      "type": "",
      "NonSupportedAttributeType": ""
     },
     "observedAt": "2020-12-09T14:11:30.000Z"
}

I should get the unitCode and observedAt within the metadata:

"filling": {
    "type": "Property",
    "value": 0.21,
    "metadata": {
     "unitCode": "C62",
     "observedAt": "2020-12-09T14:11:30.000Z"
    }

NGSI-LD Normalised

For Normalised LD I'm getting:

"filling": {
    "type": "Property",
    "value": 0.21,
    "metadata": {
      "unitCode": {
        "type": "",
        "NonSupportedAttributeType": ""
      },
      "observedAt": "2020-12-09T14:11:30.000Z"
    }
  }

I should get:

"filling": {
    "type": "Property",
    "value": 0.51,
    "unitCode": "C62",
    "observedAt": "2020-12-09T14:24:02.000Z"
}
kzangeli added a commit that referenced this issue Dec 11, 2020
@jason-fox
Copy link
Member Author

fixed by #632

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

1 participant