Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Editable sitemaps through REST
Editable sitemaps through REST [message #1688821] Sat, 21 March 2015 21:21 Go to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
We have added by now many new REST resources that allow clients to do changes on the configuration and as such (optionally) replace the need to use the textual DSLs.
One functionality that is not yet covered in this respect are the sitemaps.
My goal is that the sitemaps are the common layout mechanism, shared by all UIs (note: this does not mean that every sitemap has to make sense on every UI). My idea is to allow editing sitemaps through the REST API as well, so that you can easily add functionality such as rearranging widgets, changing their appearance etc. directly within the UI - no need to edit text files.

Without having dived into any details, my blunt initial thought is that we could simply allow to HTTP POST back the JSON-structure of the sitemap (somehow stripped down as it should obviously not include any content such as item values). As a starting point, we could go for an automatically created sitemap (note that this is already done by openHAB 2 now).

I'd like to start a discussion over your requirements and ideas here. This should also include changes to the current sitemap features, i.e. do we need further possibilities to e.g. add tabs, further layout and positioning mechanisms, etc.
Re: Editable sitemaps through REST [message #1690583 is a reply to message #1688821] Sun, 29 March 2015 13:13 Go to previous messageGo to next message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
Hi Kai,
In HABmin there are a few features relating to this that I thought I'd mention... Firstly, in HABmin 1, there was a graphical drag and drop designer for sitemaps, and I had a POST interface that does pretty much exactly what you suggest and writes the sitemap back to the system. For the current sitemap system, this is probably fine, although in some respect, being able to write a single page might be nice...

However, for a more general, forward looking view, I think a bit of a revamp is needed. In HABmin 2 I support sitemaps, although not with too many widgets at the moment. However, I also intend to move more towards a dashboard system where widgets can be placed on the screen. This is currently focussed on charting type dashboards (there's a picture below of what this looks like - sorry - localisation was in French when I took the image) but in the longer term I want to add more widgets to support more of the functionality that sitemaps provide - buttons, video, etc.

So, if we were to have something like this as part of OH, that would be great. Currently, other than the widgets being different, I need to save positioning information (currently, col/row/sizeX, sizeY), although again the plan is to add more metadata to allow common attributes on widgets (eg borders or whatever). This isn't currently implemented so is a blank page in the setup dialog at the moment Sad

I guess it depends on how you see sitemaps as to how you proceed. In one respect you say sitemaps are a common layout mechanism, but then you say they don't have to make sense to all UIs. If I understand this correctly, then you're moving away from a rigid list of widgets to something more flexible, and the sitemap REST interface is simply a place to store this information and the widgets themselves are up to the UI designer?

If that's correct, then my view would be to try and stick to a core set of widgets, but allow UIs to add widgets without having to add to the core code, and also to enhance core widgets. Again, using an example here in HABmin, the HABmin dashboard, and hopefully soon the HABmin sitemap, doesn't use the chart servlet - I use the inbuilt charting system which allows nice pinch to zoom and swipe to scroll type interaction. However, it would nice to still use the same chart definition so that static charts can still be used within the same sitemap in other UIs. Currently this isn't directly possible without a bit of creative reuse of the available fields since the chart widget doesn't pass information to the UI on the items/groups being charted in a nice way. My current intention is to use the label field to store this information, but it would be nice to have something a bit more uniform - maybe allowing UIs to store additional metadata within the widgets?

Things like hyperlinking to other sitemaps would be good - then we can build sitemaps as individual pages and link them together as we like...

Anyway, just some thoughts from me (sorry - my second long email today Cool).

If you wanted to look at the HABmin dashboard designer, take a peek here (http://cdjackson.github.io/HABmin2/#/dashboard/). It should hopefully work, but as it's static, you can't save and anything that links to the server will cause an error...

Cheers
Chris

https://github.com/cdjackson/HABmin2/wiki/screenshots/dashboard.png

[Updated on: Sun, 29 March 2015 13:14]

Report message to a moderator

Re: Editable sitemaps through REST [message #1702535 is a reply to message #1690583] Wed, 22 July 2015 23:43 Go to previous messageGo to next message
Net Wolf is currently offline Net WolfFriend
Messages: 1
Registered: July 2015
Junior Member
I'm interested in progress on the sitemap config, as I'd like to be able to have the following functions:
- settings that are relevant to certain clients/OS/devices
- Ability to update settings from the client.
- More control over layout, which I believe may be client specific.

My use case for this is to have an Intent available on Android that starts another app when pressing a button in HabDroid. For example, start an app based remote controller.
You can read more about my thoughts here: on netwolfuk.wordpress.com
at /2015/04/30/habdroid-ui-concept-openhab-for-android/

I can't link to here due to my newbie-ness on Eclipse.org
Re: Editable sitemaps through REST [message #1703044 is a reply to message #1702535] Tue, 28 July 2015 08:48 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Dennis planned to pick up this topic in August, if he finds the time. I hope he does, so you should expect some more feedback here in a few weeks. Thanks for your input so far already!
Previous Topic:REST / SSE Clazz type
Next Topic:Multi select configDescription options
Goto Forum:
  


Current Time: Thu Apr 25 05:04:20 GMT 2024

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

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

Back to the top