ol-iver / denonavr

Automation Library for Denon AVR receivers.
MIT License
176 stars 67 forks source link

Fix discovery for AVR-X1600H #136

Closed MarBra closed 4 years ago

MarBra commented 4 years ago

The upnp looks different for AVR-X1600H. I have added a test to verify it for my model. Maybe we can add more tests for other devices.

starkillerOG commented 4 years ago

Yes thank you @JPHutchins The AVR-x-2016 uses a different URL, so it is nice to know it works for those receivers too.

starkillerOG commented 4 years ago

@scarface-4711 looks good to me, could this be merged?

@JPHutchins, @MarBra is the Upnp for Heos speakers also: "urn:schemas-denon-com:device:AiosDevice:1"? Because I don't think that the denonavr integration works for Heos speakers, only for Denon and Marantz receivers that support Heos. I do not want to wrongfully discover Heos speakers.....

MarBra commented 4 years ago

@scarface-4711 looks good to me, could this be merged?

@JPHutchins, @MarBra is the Upnp for Heos speakers also: "urn:schemas-denon-com:device:AiosDevice:1"? Because I don't think that the denonavr integration works for Heos speakers, only for Denon and Marantz receivers that support Heos. I do not want to wrongfully discover Heos speakers.....

Not sure, if it will also detect Heos speakers. I don't have one.

If you search for serialNumber in tests/xml/AVR-X1600H_upnp.xml you see that there are three "devices" with serialNumber tag. We can also use one of them to discover the device. These deviceTypes are suitable:

starkillerOG commented 4 years ago

I think urn:schemas-denon-com:device:ACT-Denon:1 would be better to avoid discovering HEOS speakers, but I think urn:schemas-denon-com:device:AiosDevice:1 would also be fine, we could always filter out Heos later if they cause problems

MarBra commented 4 years ago

@starkillerOG I've chosen urn:schemas-upnp-org:device:MediaServer:1 now, because urn:schemas-denon-com:device:ACT-Denon:1 has a ACT prefix in friendlyName.

This could be easily changed, because we are looping over a deviceList, if one exists.