OH3 Sonos Binding: discovery not compatible with OpenHome/Bubble UPNP Server

Hello everyone,

I use the Sonos binding for quite a while and as other user already mentioned that there is sometimes a problem with upnp discovery. Therefore I set up a new system and installed only the Sonos binding and received already following error → see bottom

I have only sonos boxos based on the S1 Controller software.

Any help is appriciated …

Thanks a lot

2022-04-15 12:06:24.686 [ERROR] [y.upnp.internal.UpnpDiscoveryService] - Participant ‘org.openhab.binding.sonos.internal.discovery.ZonePlayerDiscoveryParticipant’ threw an exception

java.lang.IllegalArgumentException: ID segment ‘Move (OpenHome)’ contains invalid characters. Each segment of the ID must match the pattern [\w-]*.

at org.openhab.core.common.AbstractUID.validateSegment(AbstractUID.java:98) ~[bundleFile:?]

at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:76) ~[bundleFile:?]

at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:59) ~[bundleFile:?]

at org.openhab.core.thing.UID.<init>(UID.java:57) ~[bundleFile:?]

at org.openhab.core.thing.ThingTypeUID.<init>(ThingTypeUID.java:39) ~[bundleFile:?]

at org.openhab.binding.sonos.internal.discovery.ZonePlayerDiscoveryParticipant.getThingUID(ZonePlayerDiscoveryParticipant.java:106) ~[?:?]

at org.openhab.binding.sonos.internal.discovery.ZonePlayerDiscoveryParticipant.createResult(ZonePlayerDiscoveryParticipant.java:53) ~[?:?]

at org.openhab.core.config.discovery.upnp.internal.UpnpDiscoveryService.remoteDeviceAdded(UpnpDiscoveryService.java:169) [bundleFile:?]

at org.jupnp.registry.RemoteItems$1.run(RemoteItems.java:114) [bundleFile:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

at java.lang.Thread.run(Thread.java:829) [?:?]

Your Sonos has apparently the name “Move (OpenHome)”. This is not an expected name. Any idea what is or what they call “OpenHome” ?

Ok, I found that: http://openhome.org/

You are apparently using a system which apparently overrides UPnP provided by the Sonos manufacturer and at least rename the model name to add "(OpenHome)’ in the model name.
This is not something currently expected by the Sonos binding. A change would be required to be more compliant with OpenHome. At least, the binding should be less strict with this value (model name). But maybe other changes would be required to support OpenHome, I have no idea.

I renamed the topic.

Hello,
thanks a lot !
I would never have figured out my problems without your hints. The BubbleUPNP Server makes the problem with the Sonos setup. I do not exactly know what but after deleting the Sonos UPNP renderer from BubbleUPNP Server there is no failure in Openhab any longer. Well, I really like BubbleUPNP so it is a bit a pitty…

I will propose a fix to avoid this error. What is needed is just to replace unexpected characters in thing type ID. Then this model from Bubble UPnP server will still not be recognized as a Move model but rather as a Sonos unidentified model.

Fix submitted. It should then be OK with Bubble UPnP server.

1 Like

I have even updated the code to remove a potential ending text in parenthesis from the model name. So “Move” will now be extracted from “Sonos Move (OpenHome)” and the good thing type will be considered.
Once the PR is merged, please give me a feedback.

Edit: PR is merged and so fix should be available in the next snapshot tomorrow.