Hello,
Wonder if someone can help me, trying to get a raspberry pi to discover with the generic UPNP example, I have the Pi running an ssdp server and it is responding to the hub and providing the location of the description.xml file problem is the body of the xml file seems to be reformatted by the hub so the UDN key text is missing.
So log.debug in the function below…
void deviceDescriptionHandler(physicalgraph.device.HubResponse hubResponse) {
def body = hubResponse.xml
log.debug "${body}"
def devices = getDevices()
def device = devices.find { it?.key?.contains(body?.device?.UDN?.text()) }
if (device) {
device.value << [name: body?.device?.roomName?.text(), model:body?.device?.modelName?.text(), serialNumber:body?.device?.serialNum?.text(), verified: true]
}
}
Returns this debug…
10urn:schemas-upnp-org:device:RasPiMB:1RasPi MBmarkabRasPiMBuuid:b8:27:eb:7d:58:42
This is the xml file I am serving, but you can see there is no key for UDN in the above body!!
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:RasPiMB:1</deviceType>
<friendlyName>RasPi MB</friendlyName>
<manufacturer>markab</manufacturer>
<modelName>RasPiMB</modelName>
<UDN>uuid:b8:27:eb:7d:58:42</UDN>
</device>
</root>