While going through upnp spec I got the following doubts . Can I define a basic upnp device with all mandatory fields and with no servicelist and when providing the description xml I will modify my description xml to advertise my service based to different conditions. eg: services may playmusic OR switch light OR playfootball.
Can i modify the xml per device basis on run time to inlcude completely different and random services?
I hope the description and service xmls are not static .
Just like almost everything else in UPnP Device Arch document this is not 100% clearly defined, but the idea of dynamic device/service descriptions is mentioned:
If a device needs to change one of these descriptions, it MUST cancel its outstanding advertisements and re-advertise. Consequently, control points SHOULD NOT assume that device and service descriptions are unchanged if a device re-appears on the network, but they can detect whether descriptions changed if a changed CONFIGID.UPNP.ORG field value is present in the announcements.
So descriptions are not static, but you do need need to cancel and re-advertize.
That said, abusing this does not sound useful (Why not use separate root devices or at least sub-devices for totally unrelated services) and is bound to lead to compatibility issues.