Closed achandana closed 4 years ago
I think something related with metadata was implemented in last versions of the IOTA Node Lib (and in the last versions of IOTA-JSON, which uses that version of the library).
However, I don't remember pretty well... Maybe @jason-fox (with I think was involved in such implementation) could provide more information.
Thanks for the feedback!
There were two underlying issues, the main one being that metadata could only be set up in config. I've just raised a PR to fix this and a related issue.
see: https://github.com/telefonicaid/iotagent-node-lib/pull/870
jason..Is that metadata issue fixed and is it available in new version?
@achandana - I am just a Contributor to these projects and not an Administrator, so I do not have the rights to create new releases.
Don't worry @achandana ... small fixes are usually merged very quicky ;) Thanks @jason-fox for the fix!
I understand that having merged PR https://github.com/telefonicaid/iotagent-node-lib/pull/870 this issue is solved, so I'm closing (if I'm wrong, please tell me and we'll reopen it).
@achandana which docker image are you using for IOTA-JSON? You should use :latest
to benefit from this fix until it lands numbered version.
yeah @fgalan i am using latest version only
Thanks a lot jason and fgalan for greate support
Which exact image? (I mean, not only the tag, but the full line that starts with image:
in your docker-compose.yml, file, if I'm remembering correctly)
I am using fiware/iotagent-json:latest image. is there any another image i have to use in docker-compose.yml
@fgalan Could you please let me know when will be the changes reflected in docker hub
I have re-launched the build of fiware/iotagent-json:latest
. If you pull again the container the new version should have the fix included.
Thank you very much @fgalan
We have used IoT agent -1.14.0 version from docker hub. We have given the service and servicepath as follows fiware-service:testiotagent fiware-servicepath:/
Device registration payload :
{ "devices": [ { "device_id":"Motion-10", "entity_name":"urn:ngsi-ld:SENSOR:Motion-10", "entity_type":"SENSOR", "transport": "MQTT", "attributes": [ {"object_id": "s", "name": "state", "type":"Text"}, {"object_id": "l", "name": "luminosity", "type":"Integer", "metadata":{ "unitCode":{"type": "Text", "value" :"CAL"} } } ] } ] } As per iotagent node lib version 2.12.0 ,IoT agent json -1.14.0 version should support the metadata in device provisioned attributes. But still facing issue. When we try to provision the above device we are getting the below error: { "name": "WRONG_SYNTAX", "message": "Wrong syntax in request: Errors found validating request." } I found that iotagent-node-lib have the schema to validate against device registration payload
https://github.com/telefonicaid/iotagent-node-lib/blob/master/lib/templates/createDevice.json
In this json schema there is no metadata schema mentioned in attributes.
I have followed the below steps for metadata in Entity level:
{ "id":"urn:ngsi-ld:SENSOR:Motion-10", "type":"SENSOR", "luminosity":{ "type":"Integer", "value":"15", "metadata":{} } }
Is it due to the fix given for issue 1788 in fiware-orion ,https://github.com/telefonicaid/fiware-orion/issues?q=1788. Need some qucik confirmation and help from Fiware experts to overcome this issue, it is very much appreciated.