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

LwM2M: ObserveComposite operation #10798

Open
alanthompsonch opened this issue May 15, 2024 · 0 comments
Open

LwM2M: ObserveComposite operation #10798

alanthompsonch opened this issue May 15, 2024 · 0 comments
Assignees
Labels

Comments

@alanthompsonch
Copy link

problem
LwM2M is a protocol being used for constrained devices that often focus on using as little power as possible. It is also a protocol designed to react to changes in the observed values. The problem is, that all values are observed individually and changes in these values can trigger a notification to the server. When observing multiple values, these notifications begin to desynchronise after a while, leading to a massive increase in power consumption. Observing 7 different values, if they all send individual notifications after a while, there will be 7 connections to the server instead of 1 connection per day, which leads to our lwm2m client device using ~900 mC instead of ~130 mC per day.

solution
The ObserveComposite function according to section 6.4.4 in the https://www.openmobilealliance.org/release/LightweightM2M/V1_1_1-20190617-A/OMA-TS-LightweightM2M_Core-V1_1_1-20190617-A.pdf would alleviate this issue and allow all transmissions to stay synchronised.

This ObserveComposite feature was introduced in Leshan-2.0.0-M5 (which is the current lwm2m server running on thingsboard) but on thingsboard it is nowhere to be found and also not documented.

A corresponding implementation in the thingsboard lwm2m server would be greatly appreciated, considering the server it is based on does support the functionality.

Describe alternatives you've considered
There are ways to keep the messages synchronised (send operation or automatically triggered ReadComposite commands), but they all lose the ability for variable notification intervals and reactions to changing values. ObserveComposite is a vital function for battery-constrained lwm2m-based IoT applications.

Additional context
LwM2M developer confirming that Observe-Composite would solve my problem and is already implemented in the Leshan LwM2M server:

Quote:
Now, observing all the resources individually, they start to diverge after a day or week or month and instead of the ~7 observed values being sent at once, the device sends one value, ends transmission, drops connection and then immediately starts a new connection to send the next value.

I see the problem.

Composite observation would be the answer.

Regarding the Observer-Composite, at least the current Leshan should support it. I have already tested this

https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/net/lib/lwm2m/interop/README.md

Thanks for looking into this :)

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

No branches or pull requests

2 participants