|Dynamic Channel Groups? [message #1753531]
||Tue, 07 February 2017 14:46
| Tim Roberts
Registered: September 2016
I've looked around in the code and the forum but it doesn't seem very easy to dynamically create channel groups?|
Looks like the closest I can come is by overriding getThingTypeByUID on BaseThingHandlerFactory and pass it the dynamically discovered channel groups? Doesn't appear that the ThingHandler can do this correct?
Use case - sony's newest API (which is really product agnostic) let's me dynamically discover hardware on the underlying device. Example: for audio - I may find 'speakers' and/or 'headphones' and/or 'hdmi', etc based on what the device supports. I'd like to create a channel group type that implements the basic audio channels and then dynamically create channel groups (to that type) based on what the API tells me the device supports. The same applies to other attributes (output ports, network ports, etc).
Ouch - was just looking at how homematic binding did it (basically implementing a bunch of providers) Hopefully there is an easier way...
[Updated on: Tue, 07 February 2017 16:31]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02428 seconds