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

Timeinstant as attribute case (not measure) #1557

Closed
AlvaroVega opened this issue Jan 24, 2024 · 5 comments
Closed

Timeinstant as attribute case (not measure) #1557

AlvaroVega opened this issue Jan 24, 2024 · 5 comments

Comments

@AlvaroVega
Copy link
Member

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

@AlvaroVega
Copy link
Member Author

AlvaroVega commented Feb 23, 2024

Testing with device with timestamp true and the following mapping

Screenshot from 2024-02-23 11-15-02

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):

Screenshot from 2024-02-23 11-16-19

@AlvaroVega
Copy link
Member Author

AlvaroVega commented Feb 23, 2024

Testing with device with timestamp false and the following mapping

Screenshot from 2024-02-23 11-15-02

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):

Screenshot from 2024-02-23 11-18-10

@AlvaroVega
Copy link
Member Author

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)

@AlvaroVega
Copy link
Member Author

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")

@fgalan
Copy link
Member

fgalan commented Apr 17, 2024

Fixed by PR #1593

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

2 participants