Receiving Items state [message #1782556] |
Mon, 26 February 2018 07:55  |
Eclipse User |
|
|
|
Hi all.
I am developing binding and It requires sending multiply items states to hardware.
I have channels names, but I cannot find API that allows return Items, linked to this channels.
Could someone help with this?
How to get Items linked to Binding Channel?
|
|
|
|
Re: Receiving Items state [message #1794871 is a reply to message #1783713] |
Sun, 09 September 2018 22:33   |
Eclipse User |
|
|
|
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 02:38  |
Eclipse User |
|
|
|
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.03510 seconds