Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » How To Query Items Things and Bindings(A few questions about getting global information.)
How To Query Items Things and Bindings [message #1751273] Fri, 06 January 2017 17:48 Go to next message
Daniel Auer is currently offline Daniel AuerFriend
Messages: 2
Registered: January 2017
Junior Member
Hi,

I've just made my first binding and now i'm wondering, how i get access to the things i configured, so i have a few questions to ask.

1. How can i get all items, which are currently configured?
The Reason, why i need this, is that i want to build a binding, that returns static information, such as a list of all items or all bindings currently configured.
Then i would build different applications ( Android App, iOS App, Web UI, ... ), which will get the information about the ui from this binding ( probably as a JSON or something similar ).

2. How do i extend the underlying Database by some more tables? (Example: Protocol, User Management )

I appreciate your help.

Thank you
Re: How To Query Items Things and Bindings [message #1751430 is a reply to message #1751273] Tue, 10 January 2017 10:32 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 658
Registered: December 2011
Senior Member
Hi Daniel,

1. Not sure what you are planning there, but it does not sound like a binding. A binding must not access items itself - it should only expose functionality through channels. For UIs, there is the REST API to access all information (items, things, installed bindings, etc.)

2. Data is persisted through the "StorageService" OSGi service.

Regards,
Kai
Re: How To Query Items Things and Bindings [message #1751499 is a reply to message #1751430] Tue, 10 January 2017 19:54 Go to previous messageGo to next message
Daniel Auer is currently offline Daniel AuerFriend
Messages: 2
Registered: January 2017
Junior Member
Hi Kai,

I plan on making a binding, that improves the security.
As far as i understand, if the server is running in a network, every user in the network can execute every command, or get any information from the REST api.
This binding should call the ESH directly, and return the values. ( for example controlling items and reading information from them should be allowed, however creating or deleting items should not be allowed )

If there is no other way, i will just make a binding that calls the REST Api if the call is GET or PUT and raise an error, if it is not.

I think, i'll find a way.
Thank you Kai
Re: How To Query Items Things and Bindings [message #1751865 is a reply to message #1751499] Mon, 16 January 2017 10:44 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 658
Registered: December 2011
Senior Member
I guess you are rather talking about creating a "bundle", not a binding - i.e. you are working on some custom functionality, for which there is no defined extension point.

Regarding your question (1), the answer is easy then: Simply use the ItemRegistry as an OSGi service - this holds all information you need.
Previous Topic:How to get binding configuration properties in an AbstractDiscoveryService?
Next Topic:Getting channel's current/latest state
Goto Forum:
  


Current Time: Tue Sep 25 04:45:03 GMT 2018

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

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

Back to the top