This is the first of a series of post explaining the experience of the JEMMA and Energy@home community with the OpenHAB framework. Find below links to all posts of the series:
- JEMMA and OpenHAB: a nice match (publication date: 18/4/2016)
- OpenHAB in theory: a short overview (publication date: 22/4/2016)
- OpenHAB in action: a quick example (publication date: 26/4/2016)
- The JEMMA - OpenHAB remote binding (publication date: 29/4/2016)
- The JEMMA - OpenHAB local binding (publication date: 3/5/2016)
- Conclusions and future work (publication date: 9/5/2016)
The JEMMA - OpenHAB local binding
This post cover the second case anticipated in our previous post.
Some theory first. Since version 0.9, JEMMA register devices according to a standard fashion specified in namely the Device Abstraction Layer (formerly RFC-196, in the OSGi core 6 residential specifications).
The OSGi architecture is service-oriented, so this is the most natural way to proceed also for devices. If any local application is exposing devices, as a natural choice it should register in the OSGi framework a set of Device and Function services, which can be "read" via OSGI standard mechanisms (e.g. the Service Tracker).
The purpose of the ismb/jemma-local-binding is just to read these descriptions by using the standard OSGi service tracker and to register OpenHAB things accordingly. In order to run-it, just run the instructions for the jemma-remote-binding component.
This can be quickly tested e.g. by installing in your local OSGi runtime also all the fake devices project that we normally use for testing JEMMA features without connecting actual hardware.
Despite a few known limitations (mostly due to the demonstrative/PoC nature of this development), this is probably the best way to go for any future activities targeted at providing full interoperability between JEMMA and OpenHAB. The main advantage, is that, being a standard OSGi specification, the binding will be likely usable also to provide interoperability to devices implementing other technologies (e.g. z-Wave, enOcean, ...).
The code of the developed solution is available in the ismb/jemma-local-binding repository.
Nessun commento:
Posta un commento