Device Type used by Sonos

[quote=“guessed, post:6, topic:180116”]Many existing “AV” devices are using a variety of different Device Types:
Onkyo - urn:schemas-onkyo-com:serviceId:Receiver:1
Denon - urn:schemas-denon-com:device:receiver:1, and urn:schemas-denon-com:device:receiverZone:1
Sonos - urn:schemas-micasaverde-com:device:avmisc:1 (same as the original Onkyo)
Pioneer - urn:schemas-micasaverde-com:device:receiver:1
SQBlaster - urn:schemas-micasaverde-com:device:tv:1 (for generated/converted IRBlaster files)[/quote]

I am really not sure that it is a good idea to keep a generic device type for the Sonos plugin.
I would like to change it to a dedicated device type. That should avoid potential conflict in Vera.

[quote=“lolodomo, post:1, topic:180123”]I am really not sure that it is a good idea to keep a generic device type for the Sonos plugin.
I would like to change it to a dedicated device type. That should avoid potential conflict in Vera.[/quote]Sure, you’re basically forced to do that, given the Bugs in Vera’s UI logic, if your component has any sort of UI.

IIRC, changing the DeviceType of a Child device (created via luup.chdev) would recreate it, resulting in loss of it’s DeviceId and any attached scenes, but I don’t think that impacts the Sonos (although, haven’t looked at it in some time)

No, there is no child devices management in this plugin.

[quote=“guessed, post:2, topic:180123”][quote=“lolodomo, post:1, topic:180123”]I am really not sure that it is a good idea to keep a generic device type for the Sonos plugin.
I would like to change it to a dedicated device type. That should avoid potential conflict in Vera.[/quote]Sure, you’re basically forced to do that, given the Bugs in Vera’s UI logic, if your component has any sort of UI.[/quote]

Do you think I should use urn:schemas-micasaverde-com:device:Sonos:1 or urn:schemas-upnp-org:device:ZonePlayer:1 ?
The service type is urn:schemas-micasaverde-com:service:Sonos:1. So it could make sense to use the first one. If I change the service type too, I am afraid that it will break all users’s scenes.
The second is the real device type returned by the Sonos.
So I am in favour of urn:schemas-micasaverde-com:device:Sonos:1

Standard UPnP Devices advertise themselves using the upnp-org Device designations (“schemas-upnp-org:device:InternetGatewayDevice:1”, “schemas-upnp-org:device:MediaServer:1”, etc) even when they’ve tailored the service(s) beneath that definition (as Sonos, Onkyo, DirecTV etc have done)

Given the Vera UI restrictions/bugs, you’re forced to not do the standard UPnP thing and you’ll need to pick another :device: namespace.

Given what you’re doing, I’d move to something with “Sonos” in it, for uniqueness, minimally in the service name part. Technically it could be something like:
[tt] uri:schemas-sonos-com:device:Sonos:1[/tt]

or your own domain-name, as an alternative to using MCV’s, but you’re probably safer using MCV’s than Sonos’s, and definitely more than hijacking the UPnP-org’s for a Sonos thing :wink:

If I use urn:schemas-sonos-com:device:Sonos:1 which looks appropriate, it would make sense to rename service type into urn:schemas-sonos-com:service:Sonos:1 and service id into urn:sonos-com:serviceId:Sonos1. Unfortunately that would probably break users’s scenes.

So, in order to keep compatibility, I think I could go with urn:schemas-micasaverde-com:device:Sonos:1 and do not change service type and id.

Fair enough, really the only thing that’s important at this time is to make it unique 8)

Absolutely.

So let’s go, I commit the change.