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

NGSIv2 notifications #550

Closed
kzangeli opened this issue Oct 8, 2020 · 0 comments · Fixed by #552
Closed

NGSIv2 notifications #550

kzangeli opened this issue Oct 8, 2020 · 0 comments · Fixed by #552
Assignees

Comments

@kzangeli
Copy link
Collaborator

kzangeli commented Oct 8, 2020

In order to reuse current implementations of e.g. Cygnus, that subscribes to updates of the entities, it would be good to
be able to use NGSIv2 notifications on entities that are created and updated using NGSI-LD.

For this to work, when creating the NGSIv2 subscription, entity types and attribute names must be expanded and as the expanded names contain letters like ., :/, etc, a modification in "forbidden characters" will be necessary.
Also, special care might be needed for the special entity attrs:

  • location
  • observationSpace
  • operationSpace

and the special attribute sub-attrs:

  • observedAt
  • unitCode
  • datasetId

Well, datasetId ... that's a whole new story, outside the scope of this issue.

First problem:
A notification including the special attribute "location" is wrongly rendered (and the garbage JSON is sent as a notification):

{
	"subscriptionId": "5f7ee485d8006fb8696744ed",
	"data": [{
		"id": "urn:ngsi-ld:entities:E4",
		"type": "https://uri.etsi.org/ngsi-ld/default-context/T4",
		"location": {
			"type": "GeoProperty",
			"value": {
				"Unset": {
					"type": "Point"
					"coordinates": ["Unset": 1 "Unset": 2 "Unset": 3]
				}
			},
			"metadata": {}
		}
	}]
}

This seems to be a bug in the NGSIv2 rendering mechanism, for attributes with compound values. Which is weird. This should be working perfectly in NGSIv2 ... Perhaps it's the combination of Geo-Property and compound, and the fact that "location attributes" are special in NGSIv2.

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

Successfully merging a pull request may close this issue.

1 participant