Yes, you should be able to do UPNP discovery from smartapp. Any error in the logs?
here is an example of one that does it.