Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Modifying channel properties
Modifying channel properties [message #1696687] Wed, 27 May 2015 21:59 Go to next message
Dan Cunningham is currently offline Dan CunninghamFriend
Messages: 44
Registered: March 2014
Member
Sorry if this has been discussed elsewhere, I seem to be loosing conversations between esh forums, google, github and bugzilla Wink

Has any work been done on modifying channel properties at runtime? I have a few us cases where I would like to populate the options properties dynamically.

1. Logitech Harmony - I would like to populate the button press channel with options that map to buttons (stop,play, up down,music,video,ect...) that I query from the remote.

2. SONOS favorites - I would like to populate the favorite channel with options where each option is the name of a favorite to play.

Thanks!
Re: Modifying channel properties [message #1696802 is a reply to message #1696687] Thu, 28 May 2015 16:02 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Hi Dan,

Hm, there were discussions, but I also cannot give you any good link right now...

The closest thing would be to implement a StateDescriptionProvider. Unfortunately, this works with item names and not on a Thing/Channel level. But you could get from item to channel in a similar way as the ChannelStateDescriptionProvider - although I do not like this suggestion as it makes a binding have a dependency on itemChannelLinkRegistry... Maybe we should extend the interface by a new method that asks directly for the description on channels...?
@Dennis, any opinion how this could be addressed best?

Regards,
Kai
Re: Modifying channel properties [message #1696868 is a reply to message #1696802] Fri, 29 May 2015 07:32 Go to previous messageGo to next message
Dennis Nobel is currently offline Dennis NobelFriend
Messages: 166
Registered: September 2014
Senior Member
Do you want to modify channels or channel types?

For modifying channel types you could implement an own ThingTypeProvider, which is queried for each request. As the default StateDescriptionProvider also dynamically queries the ThingTypeProvider, this should work at runtime. But currently there is the problem, that you can´t use XML in that case. So you need to implement the ThingTypeProvider manually. But I also don´t like this suggestion.

Regards

Dennis
Re: Modifying channel properties [message #1696889 is a reply to message #1696802] Fri, 29 May 2015 08:58 Go to previous messageGo to next message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
Hi Dan,
Just a thought - do you really need to change the channels, or should you be changing the item labels?

If I understand what you're wanting to do, you have a remote control, or a device, and it has (for example) buttons A, B and C, or outputs labeled, OUT1, OUT2 etc. These are physical labels on the box(?). My thought would be that these are the channel names - they are physical things, and this is what I think therefore should remain associated with the channel... On the other side of the system you then have the item, and you can give the item a different name...

So, you can have Channel OUT1, linked to an item named ITEM_OUT1, with a label XBMC (for example).

Likewise in the SONOS favorites - I don't know quite how you intend this to work, but you could have a favorites channel, with multiple items connected to it (or a single item with multiple selections), and you populate the item(s) with your favorite options - the channel is still just called 'favorites'...

Just my thoughts - it might not fit with how you want it to work, and I might also be wrong in my understanding, but I don't think that the channel necessarily needs to change as the user interface will see the items - not channels.

Chris
Re: Modifying channel properties [message #1696892 is a reply to message #1696889] Fri, 29 May 2015 09:04 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
My understanding is that this could be used for auto-defined mappings for e.g. selection widgets - so you could have your favorites by name in a dropdown list.
Re: Modifying channel properties [message #1696970 is a reply to message #1696892] Fri, 29 May 2015 19:55 Go to previous message
Dan Cunningham is currently offline Dan CunninghamFriend
Messages: 44
Registered: March 2014
Member
Thanks for your responses. The use case is to auto populate a dropdown (or something) with a list of choices that is dynamically generated. So for SONOS this would query your favorites and add them as selections to the favorite channel (which takes a string, the name of the favorite to play). I was assuming this had to be done on a channel, I did not think about using items. I'm still finding my way around the ESH architecture, I need to do some more research so I can have a more intelligent conversation about this.

[Updated on: Fri, 29 May 2015 19:56]

Report message to a moderator

Previous Topic:config-description parameter-group
Next Topic:New Rule Question
Goto Forum:
  


Current Time: Fri May 10 13:50:54 GMT 2024

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

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

Back to the top