Closed AlvaroVega closed 2 months ago
Testing with device with timestamp true and the following mapping
and with the follow measure:
curl -i -X POST 'http://localhost:7897/iot/json?i=disp1&k=zrvj173zhvzb12t233z48vg96' -d '{ "TimeInstant": "2024-02-22T08:02:23.000Z", "datetime": "2024-02-22T08:02:23.000Z", "color": "blue"}' -H 'content-type: application/json'
entity has provided TimeInstant in metadata attributes (as expected IMHO):
Testing with device with timestamp false and the following mapping
and with the follow measure:
curl -i -X POST 'http://localhost:7897/iot/json?i=disp1&k=zrvj173zhvzb12t233z48vg96' -d '{ "TimeInstant": "2024-02-22T08:02:23.000Z", "datetime": "2024-02-22T08:02:23.000Z", "color": "blue"}' -H 'content-type: application/json'
entity has no metadata (as expected IMHO):
Testing with a group with timeinstant=true and the following measures:
curl -i -X POST --location 'http://localhost:7897/iot/json?i=disp1&k=APIKEY1' --header 'Content-Type: application/json' --data '{"hola":"adios", "TimeInstant": "2022-02-02T22:22:22.222Z"}'
curl -i -X POST --location 'http://localhost:7897/iot/json?i=disp2&k=APIKEY1&t=2022-02-02T22:22:22.222Z' --header 'Content-Type: application/json' --data '{"hola":"adios"}'
both cases entity TimeInstant has provided value (2022-02-02T22:22:22.222Z) and metadata Timeinstant is also filled with that value (2022-02-02T22:22:22.222Z)
When a mapping is defined like attribute map is: Param | Att Entity | type mydatetime | Timestamp | DateTime
and a measure arrives like:
curl -i -X POST --location 'http://localhost:7897/iot/json?i=SENSOR&k=APIKEY1' --header 'Content-Type: application/json' --data '{"hola":"adios", "mydatetime": "2022-02-02T02:22:22.222Z"}'
then entity TimeInstant and metadata Timeinstant has system timeinstnat, not provided in mydatetime ("2022-02-02T02:22:22.222Z")
Component
No response
Is your feature request related to a problem? Please describe
When timestamp conf if false but:
attribute map is: Param | Att Entity | type Datetime | Timestamp | DateTime TimeInstant | DateObserved | Datetime
measure contains: DateTIme: TimeInstant:
metadatas are lose
Full case is described at https://github.com/telefonicasc/jcyl-project/issues/153
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
The systemd version you checked that didn't have the feature you are asking for
No response