|
|
Re: Receiving Items state [message #1794871 is a reply to message #1783713] |
Mon, 10 September 2018 02:33 |
mdn thi bui Messages: 1 Registered: September 2018 |
Junior Member |
|
|
Hello Henning,
I have a question regard to the same idea.
Use Case: I want to write my own bundle and deploy it in Karaf. This bundle should get "access" to all "items" provided by other bundles(bindings: knx, yahooweather, zwave, etc.), send these "items" commands((switch light on or off, etc.).
In the console of openHAB, I can get easily "access" to the items with the command: smarthome:status <itemname> or send data to them smarthome:send <itemname> <data> .
If I want to "access all the items" and execute my commands in my Java code, what kind of possibilities do I have?
I know that my question is somewhat weird, since items is an abstract concept and they can not be directly accessible from my code but if there is any possibilities to solve my problem, I would like to hear the approaches.
|
|
|
Re: Receiving Items state [message #1795028 is a reply to message #1794871] |
Thu, 13 September 2018 06:38 |
|
If you develop a binding then you should not access the items yourself.
If you create an OSGi bundle that should handle some logic you can e.g. access the item registry to access the items and you can implement an event subscriber if you want to get notified about events.
|
|
|
Powered by
FUDForum. Page generated in 0.03558 seconds