Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » lwm2m binding (Lightweight machine 2 machine protocol)(Binding to support lwm2m )
lwm2m binding (Lightweight machine 2 machine protocol) [message #1769383] Mon, 31 July 2017 08:42 Go to next message
David Graeff is currently offline David GraeffFriend
Messages: 17
Registered: April 2016
Junior Member
Hey all,

I'm going to write a binding to support the lwM2M standard/convention/protocol. The protocol is based on top of CoAP but defines discovery, resources, parameters and return types and therefore allows to map CoAP resources to ESH things/channels.

There is a library (Leshan) dealing with the protocol layer, so the binding mostly do the mapping and connection state management.

My question is, should this be contributed to ESH or to an implementation like OpenHAB?

Cheers,
David
Re: lwm2m binding (Lightweight machine 2 machine protocol) [message #1769384 is a reply to message #1769383] Mon, 31 July 2017 08:53 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Hi David,

Could you elaborate on the planned use case / system architecture?
In general, bindings are meant to support some concrete devices. Are there any real devices out there that could be directly supported by a generic (i.e. not including specific thing types) lwm2m binding? If not, might it make more sense to implement an io.transport.lwm2m bundle, which deals with lwm2m stuff and which can be used by other bindings that implement a specific device support?

Another question (forgive me if it is stupid, but I am not too deep in the details of lwm2m): ESH would be the lwm2m server in such a scenario, right? Which means that the devices themselves need to connect to it (it is not ESH which connects to the devices). Does this mean the devices would need to be programmed / commissioned with a fixed URL for there server? How would that be done in practice?

Cheers,
Kai
Re: lwm2m binding (Lightweight machine 2 machine protocol) [message #1769458 is a reply to message #1769384] Mon, 31 July 2017 19:06 Go to previous messageGo to next message
David Graeff is currently offline David GraeffFriend
Messages: 17
Registered: April 2016
Junior Member
Hey Kai,

I will answer your questions in opposite order. LwM2M devices usually have a bootstrap server preconfigured. As long as no server url is known, the device will try to reach the bootstrap server address, which can even be a multicast address. LwM2M doesn't describe the commissioning itself, but one scenario for an IP based device is:


  • The device opens an Access Point and the LwM2M client tries to reach a bootstrap server on a fixed IP.
  • A smart phone app connects to the Access point and is assigned to the fixed IP.
  • The app scans the network with for example mDNS to find the LwM2M server or in this case ESH/OH2.
  • The app starts a bootstrap server and provides a response with the now known server address and a WiFi configuration.
  • The device will join the destination network and connect to the LwM2M server.


The OMA LWM2M standardized resource documentation is available as XML. With the help of an XSLT it is possible to
transform those resources into ESH xml thing/channel descriptions. A generic binding would therefore immediately support all specified
resources and all the standard objects. Devices are modeled as bridges, CoAP objects as Things and LwM2M resources as Channels.

The necessary ThingType/ChannelTypeProviders could be part of an io.transport.lwm2m bundle though, that is correct. A specific binding
for custom objects could make use of at least the ChannelTypeProvider.

Cheers,
David
Re: lwm2m binding (Lightweight machine 2 machine protocol) [message #1769536 is a reply to message #1769458] Tue, 01 August 2017 11:53 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Thanks for the insights, David!
To answer your original question: I think it makes sense to contribute this to ESH, especially as it is tightly coupled with other Eclipse projects (Leshan).

Do you happen to know any end consumer devices that use lwm2m that would be directly supported through such a binding? Or what hardware do you use for testing or your own productive use case (if you can share that info)?

Cheers,
Kai
Re: lwm2m binding (Lightweight machine 2 machine protocol) [message #1769608 is a reply to message #1769536] Wed, 02 August 2017 07:59 Go to previous messageGo to next message
David Graeff is currently offline David GraeffFriend
Messages: 17
Registered: April 2016
Junior Member
I don't know of any commercial products available right now that would benefit of this binding. There are commercial solutions, based on lwm2m but no real world products. This is nothing surprising though, IKEA just recently made their CoAP smartbulbs available. Before that, CoAP wasn't widespread either, at least commercially.

But there popped up some C libraries that implement the lwm2m client, especially also for embedded systems. I use lwm2m personally and I believe if ESH supports standard protocols that easily map to ESH things, like some Mqtt conventions and LwM2M on top of CoAP, it would be a big benefit for product designers and hardware manufacturers that want to support ESH out of the box.

Cheers,
David
Re: lwm2m binding (Lightweight machine 2 machine protocol) [message #1769644 is a reply to message #1769608] Wed, 02 August 2017 11:24 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Ok, thanks for the info and feel free to go for such a binding :-)
Previous Topic:Problems in creation the development environment
Next Topic:Best way to implement Discovery without known thingtype
Goto Forum:
  


Current Time: Thu Dec 12 21:19:12 GMT 2024

Powered by FUDForum. Page generated in 0.04544 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top