|Dynamically changing item-type category during discovery [message #1769910]
||Sat, 05 August 2017 11:43
| Jabba Loon
Registered: August 2017
Just wondering if it is possible to dynamically change the item-type category at run-time, ideally during discovery? Have been looking through the documentation and code, but don't see a way to do it.
For an 'Alarm' zone, the zone could be (for example) a Door, Window, Fire etc...
In my case, all have a type of switch and a category (as defined in thing.xml) of 'Alarm'. When I am discovering the zones, I know which category they are so want to assign/change category at this stage.
Obviously, the alternative here could be to have different thing definitions for each of the types of zone (of which there are about 10 in my implementation!), so that would probably not be ideal.
I have also been looking at the possibility of using a ThingTypeProvider to dynamically generate the Thing's during discovery. However, struggling to figure out how to do this based on the documentation I can find and trawling through code to try to find an example! Could anyone point me at some code to give me an idea please!
Powered by FUDForum
. Page generated in 0.01804 seconds