Atos-Research-and-Innovation / IoTagent-LoRaWAN

FIWARE IoT Agent for LoRaWAN protocol (with CayenneLpp and CBOR data models)
https://fiware-lorawan.readthedocs.io/en/latest/
Other
34 stars 40 forks source link

possible bug in the toNGSI translation #63

Closed chicco785 closed 5 years ago

chicco785 commented 5 years ago

looking at this code: https://github.com/Atos-Research-and-Innovation/IoTagent-LoRaWAN/blob/master/lib/dataTranslationService.js#L83

shouldn't be: name: device.active[i].name ?

if I recall right, "name" is what we want to be the attribute in NGSI, but hey, I haven't tested it, it's just a guess reading the code

dcalvoalonso commented 5 years ago

I think that the code is correct @chicco785. As you can see in https://github.com/Atos-Research-and-Innovation/IoTagent-LoRaWAN/blob/master/lib/dataTranslationService.js#L83#75, we are covering the option you mention. But in https://github.com/Atos-Research-and-Innovation/IoTagent-LoRaWAN/blob/master/lib/dataTranslationService.js#L83, we are covering the possibility of using object_id to report the values.

From https://github.com/telefonicaid/iotagent-node-lib:

object_id (optional): name of the attribute as coming from the device

dcalvoalonso commented 5 years ago

I close this issue. @chicco785 If you find further evidence related to it, please open it again.