I’m starting to think the answer is “no”, but is it possible to create multiple Thing objects as a result of a single response in any of the “stock” DiscoveryService implementations? I’m using a UPnP DiscoveryParticipant instance to handle responses in a Binding. The discovered devices are modeled as a top-level Bridge, with a few universal services they expose. Some of the devices have other functionality, which is encapsulated in two other Thing types.
The issue I have is that I know at the point its discovered which of the two associated Things need to be created – the UPnP metadata tells me.
All of the example bindings I’ve seen that have child devices seem to create them using a secondary DiscoveryService that gets fired off in the ThingFactory (like the Hue one). That makes sense when you need to continue monitoring the thing for changes (when the Bridge represents a technology gateway and the things its representing can change over time). In my case, its a bunch of overhead that isn’t necessary – I’d literally create the DiscoveryService, activate it, it’d immediately create none, one or two and then stop.
I can do that, but it seems clunky enough that I’m thinking there’s an interface I’ve missed, but I can’t find any bindings doing it any other way …