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

LwM2mNodeSenMLDecoder : Support for timestamped values #1479

Closed
cw8466 opened this issue Jul 19, 2023 · 7 comments
Closed

LwM2mNodeSenMLDecoder : Support for timestamped values #1479

cw8466 opened this issue Jul 19, 2023 · 7 comments
Labels
question Any question about leshan

Comments

@cw8466
Copy link

cw8466 commented Jul 19, 2023

Question

I have connected a client to a Leshan demo server (2.0.0-M10). That particular client adds a timestamp to the values when transmitted over SenML:
[{"n":"/3303/0/5700","t":321,"v":22.953123}]
which isn't typical of the examples provided by the specification as it doesn't specify an offset relative to a base timestamp. However, for a single value, it feels like the implementation makes sense, but the Leshan server throws this exception when it attempts to decode the SenML payload. Based on the exception, it feels like the issue is not how SenML timestamps are implemented by the client, but a lack a support altogether for SenML timestamped values by the server.
If correct, any particular reason why this is not supported? It seems like the timestamp is already parsed.

@cw8466 cw8466 added the question Any question about leshan label Jul 19, 2023
@sbernard31
Copy link
Contributor

sbernard31 commented Jul 20, 2023

[{"n":"/3303/0/5700","t":321,"v":22.953123}]

Your client send that SenML value in a ReadResponse Correct ?

which isn't typical of the examples provided by the specification as it doesn't specify an offset relative to a base timestamp. However, for a single value, it feels like the implementation makes sense

Exactly the point, the specification is not clear at all about that.
We already have this question for Notification and my first understanding was this is not allowed by specification.
But first feedback from OMA seems to say this is allowed for notification : OpenMobileAlliance/OMA_LwM2M_for_Developers#538

The answer could be generalized to ReadResponse but this lead to some problem (as explain in OMA issue above ☝️), so I tried to get more answer about that without success ... 😞

If correct, any particular reason why this is not supported?

Adding this to Leshan API is impacting and not clear how to handle inconsistent timestamp so I would prefer to get clear answer from OMA about that...

It seems like the timestamp is already parsed.

Yep timestamp is supported for stored notification use case.

@sbernard31
Copy link
Contributor

For a short term solution, note that Leshan Library allow you to provide you own Encoder/Decoder, so you can change the behavior with some code if needed.

@cw8466
Copy link
Author

cw8466 commented Jul 20, 2023

Thanks,

I confirm that it is send following a ReadResponse.

@cw8466 cw8466 closed this as completed Jul 20, 2023
@sbernard31
Copy link
Contributor

I'm curious what do you plan to do ? 🙂

@cw8466
Copy link
Author

cw8466 commented Jul 20, 2023

I'm curious what do you plan to do ? 🙂

No big deal for now. We'll avoid SenML with ReadResponse. Our usecases for timestamps is mainly through observations. But we'll also try to clarify the specification with the owner client stack as it might not be compliant to timestamp values following a ReadResponse.

@sbernard31
Copy link
Contributor

Let me know what you find.

In a general way, it's difficult to me to get answer from OMA. So do not hesitate to report us that this is an issue to not get answer and maybe you owner client stack can do that too ?

(I added a new comment on related issue : OpenMobileAlliance/OMA_LwM2M_for_Developers#538)

@sbernard31
Copy link
Contributor

But we'll also try to clarify the specification with the owner client stack as it might not be compliant to timestamp values following a ReadResponse.

@cw8466 do you get more information about that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Any question about leshan
Projects
None yet
Development

No branches or pull requests

2 participants