SONOS, 'say' what?

I get this when I enter “smarthome:audio sinks” :
openhab> smarthome:audio sinks
sonos:PLAY1:RINCON_xxxxxx1400
enhancedjavasound
javasound
webaudio
openhab>

I get command not found when I enter: smarthome:say play doorbell.mp3

When I enter “smarthome:audio play sonos:PLAY1:RINCON_XXXX1400 doorbell.mp3” I get no error message. The command prompt just come back after 5-6 seconds. I never hear any sound on my Sonos

That was a typo in my post , of course “smarthome:say play doorbell.mp3” isn’t playing anything it should have read “smarthome:audio play doorbell.mp3”.

Changed my post above!

They both work now. I had the Callback URL of the Sonos binding as the IP address of the Sonos Speaker. I changed it to the raspberry pi IP address and everything works now. Thanks for your patience in helping me out.

I looked into my setup,I haven’t set any IP for the CallbackURL.
@DanielMalmgren: Could you check the CallbackURL on your system?

Don’t forget to set a notification volume different from 0 to hear something.
A good idea is to open the Sonos application to see what happens and if the app is displaying any error.

That setting was empty here. Tried changing it to match the ip of my OH server. I’m not sure if it made any difference. I still get the same result from running a “smarthome:audio play doorbell.mp3” (the command simply waits for about ten seconds and then returns), but I’m currently at work and nobody is home to listen if there was any sound on the speaker. Guess I’ll have to get back and try this later today :wink:

Oh, didn’t know anything was supposed to happen in the Sonos app. Will check that. Where do I find the notification volume?

The notification volume is used for notifications ( in other words only when using the say command). You have a channel for that (click on more if you don’t se it in PaperUI ).IMHO the play command uses the normal volume. On the Sonos controller the notification volume is NOT displayed.

Yep, connected an Item to the channel and it was set to NULL so I raised it a bit.

Actually I can see things happening in the log now when I try to play the doorbell mp3, so it just might work…

08:18:13.889 [INFO ] [marthome.event.ItemStateChangedEvent] - sonos_PLAY1_RINCON_B8E937BECD0001400_currenttitle changed from 5f5402aa-b8ee-4d3a-8b67-2ccb0bf716b5.mp3 to 18d6a689-b542-4fc9-b930-45023d902587.mp3
08:18:14.087 [INFO ] [marthome.event.ItemStateChangedEvent] - sonos_PLAY1_RINCON_B8E937BECD0001400_control changed from PAUSE to UNDEF
08:18:14.268 [INFO ] [marthome.event.ItemStateChangedEvent] - sonos_PLAY1_RINCON_B8E937BECD0001400_control changed from UNDEF to PLAY
08:18:14.615 [INFO ] [marthome.event.ItemStateChangedEvent] - sonoskok_completetrackinfo changed from  -  - 5f5402aa-b8ee-4d3a-8b67-2ccb0bf716b5.mp3 to  -  - 18d6a689-b542-4fc9-b930-45023d902587.mp3
08:18:20.514 [INFO ] [marthome.event.ItemStateChangedEvent] - sonos_PLAY1_RINCON_B8E937BECD0001400_control changed from PLAY to PAUSE

In that case I was wrong, notification volume is used for the play command also
Learned something.

Not necessarily, I think it was the change in CallbackURL that made the difference. Looking back in the log (didn’t check the log directly after changing that) it seems it was after that change things started happening.

Guess when I’m back home I’ll have to test this a bit more…

1 Like

Be careful to not run the Sonos app on the same hardware that runs OH.

1 Like

No problem. I don’t even think there is a Sonos app for arm Debian :smile:

??
Not that I’m trying to do that with my main system.However, while testing new code it could happen (since I do code on my windows machine ).
Why would that cause problems, I’m just curious.

If not set, the callback URL is built by the binding. It should work on any standard network and OH setup.

The sonos is not able to register notification subscriptions for several app running on the same hsrdware. It is a bug in Sonos but in practice no normal user is in such a case.

1 Like

I wonder why it wasn’t on my system then, it’s all very standard. Anything worth digging more into or just be happy that I (hopefully) solved it?

I have the same error. how did you solve it, setting the calback url does not make any difference.

regards

I know it is a very old thread, but I ran into the same issue and found this topic.

I’ve tried playing mp3 files and Google TTS on my Sonos (Ikea Symfonisk) devices from OH, with the same result: the currently played web radio became muted, but no sound was played. After the 20 seconds of notification timeout, the web radio came back.

No error messages in openhab.log, and in events.log the name of the currently played track was changed to [generated UUID].mp3, and the volume was changed to the level of notifications set in the Thing - but without any sound played.

Then I’ve set up Callback url in the Binding as http://192.168.8.124:8080 which is the same URL where my OH installation is - but still no sound was the result.

Not much later I did a restart of OH Docker, tried again - and it finally worked!
So probably a restart after setting up Callback url solved it in my case.

Dear All, I also haven an issue with my Sonos / Symfonisk setup. It used to work a while ago with some 2.x version of Openhab. I can scan for SONOS boxes, my Symfonisk gets discovered and is shown as ONLINE. I can also select it as the default audio sink in the settings on the web UI:

However, it is not shown when running openhab:audio sinks, my SONOS box is missing:

* System Speaker (enhancedjavasound)
  Web Audio (webaudio)

Any ideas?

Since I wasn’t using it frequently, I don’t know when it stopped working. For sure it did not work using any of the 3.x versions. I’m running Openhab in Docker with the current milestone version (3.1.0.M1).