Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » Truly "dynamic" sitemaps(Discussion on supporting dynamic lists/items in sitemaps)
Truly "dynamic" sitemaps [message #1349866] Mon, 12 May 2014 11:36 Go to next message
Petr Klus is currently offline Petr KlusFriend
Messages: 6
Registered: May 2014
Junior Member
I would really like to integrate selection of a song from the current playlist (MPD binding). However, I struggle to see how this could be implemented in the current setup of OH - the only way I could think of is to create 50-100 placeholder items and selectively show/hide them depending on length of the playlist.

Is there any better way?


My idea would be to create a dynamic group of items, which would get populated by the items on the current playlist (with limit set on the maximum count of course).

I believe this concept would also be helpful for creating dynamic controls for bulbs. For example, the binding can scan devices on the network and then provide a group containing the devices without the need for manual specification of each node.
Re: Truly "dynamic" sitemaps [message #1353047 is a reply to message #1349866] Tue, 13 May 2014 19:01 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 80
Registered: December 2011
Member
I think that your described use case and your feature request are not really the same. Choosing a song from a playlist would actually mean a "Selection" widget for a String item - you only deal with a single item and you want to send a (dynamically selected) command to it.
So all you would need is a way to dynamically define the widget (and with it the command mappings), right?

Regarding the network scan & auto adding of devices: This is a feature that we want to address with this discussion: http://www.eclipse.org/forums/index.php/t/668424/

Regards,
Kai
Re: Truly "dynamic" sitemaps [message #1369379 is a reply to message #1353047] Tue, 20 May 2014 15:02 Go to previous messageGo to next message
Petr Klus is currently offline Petr KlusFriend
Messages: 6
Registered: May 2014
Junior Member
Hi Kai,

Sorry for not being more specific - I've only described the most simple use-case.

What I envision for the MPD binding to perform to truly replace any other UI would also be a more sophisticated track browser. This would require support of multiple levels of hierarchy - apart from flat playlist, I imagine access to tree-like artists, albums, tracks listings.

Also, in the track browser, it would be useful to have multiple buttons associated with each track - play next, add to playlist, add folder to playlist (for folders) - effectively mimicking web interface provided by volumio.org.

I have found hints on how to modify items lists in the OH, however, I am wondering how would the system perform if it had lists of thousands of items? Would I need to selectively populate the menus based on selected artist/album or could I simply re-create the whole structure in OH? It could potentially mean a list of 10k entries or more..
Re: Truly "dynamic" sitemaps [message #1375997 is a reply to message #1369379] Fri, 23 May 2014 08:04 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 80
Registered: December 2011
Member
Hi Petr,

I am a bit reluctant to evolve the framework into this direction as the whole multimedia part is a imho a very special part of a smart home and one with very specific requirements as well. We might end up completing with solutions like XBMC, which already do a terrific job for multimedia control. So I would rather try to go for a better integration with such systems instead of trying to move our UIs to do the same.

Nonetheless, there is the idea discussed to introduce a Player Itemtype, which could help to better model the typical player controls. See https://github.com/openhab/openhab/pull/909

Regards,
Kai
Re: Truly "dynamic" sitemaps [message #1376024 is a reply to message #1375997] Fri, 23 May 2014 08:17 Go to previous messageGo to next message
Petr Klus is currently offline Petr KlusFriend
Messages: 6
Registered: May 2014
Junior Member
Hi Kai,

I agree - the basic core item structure should be kept as simple as possible. I was thinking further about your definition of the problem as being ultimately a selection widget and I think you are correct - I would prefer not to modify the item lists and structure just to populate artist/album lists.

In my opinion, having a dynamic selection widget supporting hierarchy would ultimately be the best - I think it would be a compromise between full-fledged browser with actions and just a track selection. At least for my use case, I imagine multiple entry-points for the selections - item that shows flat playlist for selection, then another item labeled "add to playlist" that would allow browsing through artists and adding them etc etc - user should be able to define filters in item definition, and binding would populate the widget when clicked.

What do you think?

I think that for me, OH is a must in the media control - I am after a multi room system with multiple MPD servers playing simultaneously and players able to select which pulseaudio pipe to listen to. To provide the glue in this system, OH is simply the best. Another best thing would be to be also able to control the music better - at this moment, I need to jump to another webpage with another UI.

Lastly, off-topic (but short) question - I've given up waiting on the official Java api from LIFX guys and starting with unofficial api integration - I am mirroring the Phillips Hue extension, however, I saw that SmartHome will have different binding API - when is this going to be out/is it worth waiting for? Would old-style extensions and addons still be compatible?
Re: Truly "dynamic" sitemaps [message #1376285 is a reply to message #1376024] Fri, 23 May 2014 10:42 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 80
Registered: December 2011
Member
Petr Klus wrote on Fri, 23 May 2014 10:17
In my opinion, having a dynamic selection widget supporting hierarchy would ultimately be the best


The question is whether this is a new kind of widget or if it is simply a dynamically generated sitemap page, which then provides the possible titles as mappings for the selection widget. Not sure, what is the best way. Another problem is the switch from a flat list to a tree structure - this would actually imply that we need both: a new widget type (a TreeSelectionWidget) which is then dynamically filled by a dynamic "playlist" sitemap.

Petr Klus wrote on Fri, 23 May 2014 10:17
I saw that SmartHome will have different binding API - when is this going to be out/is it worth waiting for? Would old-style extensions and addons still be compatible?

A good question. For openHAB 2.0, I am planning a 1.x compatibility layer, so that (most) current addons can still be used. Nonetheless on the long run, bindings should be moved to the new APIs, but currently it is still too early for this. Most of the work in the bindings is usually the device specific stuff (i.e. how to access and control the LIFX) and thus I would not think that migrating a binding from 1.x to 2.x means a rewrite, but that major parts can be kept.
Previous Topic:Questions from new contributor (I hope)
Next Topic:OpenHAB2 and SmartHome dependencies and build structure.
Goto Forum:
  


Current Time: Tue Nov 25 00:54:08 GMT 2014

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

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