“say” and “playsound”......not working via Karaf Console

Hi Guys,

i´ve a problem with the say und playsound commands.

System Info:
OH 2.4
Sonos (default audo sink)

smarthome:audio sinks
  Sonos Beam (Wohnzimmer) (sonos:zoneplayer:RINCON_3xxxxxxxBxx)
  Sonos Play:1 (Bad) (sonos:PLAY1:RINCON_xxxxxxxxxx)
*Sonos Play:1 (Küche) (sonos:PLAY1:RINCON_xxxxxxxx)
  Sonos Play:1 (Schlafzimmer) (sonos:PLAY1:RINCON_xxxxxxxxx)
  Sonos Play:1 (Wohnzimmer) (sonos:PLAY1:RINCON_7xxxxxxxxxx)
  Sonos Play:1 (Wohnzimmer) (sonos:PLAY1:RINCON_xxxxxxxxx)
  System Speaker (javasound)
  System Speaker (with mp3 support) (enhancedjavasound)
  Web Audio (webaudio)

VoiceRSS (default TTS)

So if i try the followings command via the Karaf console…it happens…nothing. No Error in the Logs.

openhab> smarthome:audio play doorbell.mp3

or
openhab> smarthome:voice say Hallo

I´ve also tested the with different Sonos, always the same…no output to the speakers, no errors in the logs.
best regards

Hi,

I´ve change the log from DEBUG to TRACE. Seems to be OK, but no Sound output when i try this command.

smarthome:audio play sonos:zoneplayer:RINCON_XXXXXXXX doorbell.mp3

[vent.ItemStateChangedEvent] - BZ_Sonos_CurrentAVtransportURI changed from x-sonosapi-stream:s57735?sid=254&flags=8224&sn=0 to x-rincon-queue:RINCON_XXXXXXXX#0

2019-11-20 20:05:43.563 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrenttrackURI changed from aac://http://swr-edge-202a.fra-lg.cdn.addradio.net/swr/swr3/live/aac/96/stream.aac?ar-distributor=f0a1 to http://192.168.1.87:8080/audio/e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3

2019-11-20 20:05:43.581 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentTitle changed from SWR3 91.6 to e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3

2019-11-20 20:05:43.592 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentTrack changed from SWR3 91.6 - 3 Doors Down - Kryptonite - Mehr Hits. Mehr Kicks. Einfach SWR3 - Koblenz, RP, Germany to  -  - e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3

2019-11-20 20:05:43.600 [vent.ItemStateChangedEvent] - BZ_Sonos_State changed from STOPPED to PLAYING

2019-11-20 20:05:43.603 [vent.ItemStateChangedEvent] - BZ_Sonos_Control changed from PAUSE to PLAY

2019-11-20 20:05:43.607 [vent.ItemStateChangedEvent] - BZ_Sonos_Stop changed from ON to OFF



2019-11-20 20:05:50.336 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrenttrackURI changed from http://192.168.1.87:8080/audio/e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3 to x-sonos-spotify:spotify%3atrack%3a5ChkMS8OtdzJeqyybCc9R5?sid=9&flags=8224&sn=9

2019-11-20 20:05:50.354 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentArtist changed from  to Michael Jackson

2019-11-20 20:05:50.360 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentAlbum changed from  to HIStory - PAST, PRESENT AND FUTURE - Book I

2019-11-20 20:05:50.367 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentTitle changed from e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3 to Billie Jean

2019-11-20 20:05:50.404 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentTrack changed from  -  - e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3 to Michael Jackson - HIStory - PAST, PRESENT AND FUTURE - Book I - Billie Jean

2019-11-20 20:05:50.408 [vent.ItemStateChangedEvent] - BZ_Sonos_State changed from PLAYING to STOPPED

2019-11-20 20:05:50.414 [vent.ItemStateChangedEvent] - BZ_Sonos_Control changed from PLAY to PAUSE

2019-11-20 20:05:50.420 [vent.ItemStateChangedEvent] - BZ_Sonos_Stop changed from OFF to ON

2019-11-20 20:05:50.773 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentAVtransportURI changed from x-rincon-queue:RINCON_XXXXXXXXX0#0 to x-sonosapi-stream:s57735?sid=254&flags=8224&sn=0

2019-11-20 20:05:50.783 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrenttrackURI changed from x-sonos-spotify:spotify%3atrack%3a5ChkMS8OtdzJeqyybCc9R5?sid=9&flags=8224&sn=9 to x-sonosapi-stream:s57735?sid=254&flags=8224&sn=0

2019-11-20 20:05:50.989 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentArtist changed from Michael Jackson to 

2019-11-20 20:05:50.994 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentAlbum changed from HIStory - PAST, PRESENT AND FUTURE - Book I to 

2019-11-20 20:05:50.999 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentTitle changed from Billie Jean to SWR3 91.6

2019-11-20 20:05:51.002 [vent.ItemStateChangedEvent] - BZ_Sonos_CurrentTrack changed from Michael Jackson - HIStory - PAST, PRESENT AND FUTURE - Book I - Billie Jean to SWR3 91.6 - Freya Ridings - Castles - Mehr Hits. Mehr Kicks. Einfach SWR3 - Koblenz, RP, Germany

Your default sink is in the Kitchen, did you listen there? The naming in the second post suggests the Bathroom.
Is the volume above zero?

Hi,

yes, your are right.Default sink is in the kitchen and i listen there. Also did the test in the bathroom. I set the Notification Volume to 25 via the PaperUI for all Sonos Things.

While testing it at my system I noticed that it doesn’t do the say command from the karaf console on my two stereo paired ones (since you are trying it on single ones, that should not be your problem). It works as documented on the others. Funny, but that used to work, I tested it several times ( got bad comments on that).

Hi Jürgen,

thanks for testing. Yes that is strange, it also works in the past for me…I only noticed it now when I reactivated the rule.
I re-tested it last night with all Sonos devices…no luck. Also reinstalled the binding.
I’ve noticed that when you send this commany

smarthome:audio play sonos:zoneplayer:RINCON_XXXXXXXX doorbell.mp3

it is doing some “transformation”
http://192.168.1.87:8080/audio/e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3

…but the doorbell.mp3 ist in /sounds

I split the stereo paired boxes, but that didn’t help. Neither seperated nor as a pair. These two are my oldest ones! Makes me think!

Did you TRACE the log? seems to me that for TRACE there are only a few entries. Maybe a problem with the binding?

It gets even better, now the player in the kitchen isn’t doing the say commands anymore as well.
When the command works you should see the item reporting something like:

   11:42:13.414 [INFO ] [smarthome.event.ItemStateChangedEvent] - PlayBuero_Volume changed from 0 to 40
    11:42:13.795 [INFO ] [smarthome.event.ItemStateChangedEvent] - PlayBuero_Controller changed from PAUSE to PLAY
    11:42:17.285 [DEBUG] [os.internal.handler.ZonePlayerHandler] - Polling job
    11:42:19.131 [INFO ] [smarthome.event.ItemStateChangedEvent] - PlayBuero_Controller changed from PLAY to PAUSE
11:42:29.488 [INFO ] [smarthome.event.ItemStateChangedEvent] - PlayBuero_Volume changed from 40 to 0

Which says the sonos changed to PLAY, switched to the notificationvolume, did a polling job, changed back to PAUSE and back to the normal volume.
For the not working players nothing besides the polling job shows in the log with the sonos binding set to DEBUG.

ok, let me try it and i´ll get back

I’m getting OLD!
I had observed this issue last year and reported it (Issue Report). It should be solved, since we are both running the 2.4 stable version, we didn’t get the correction!

I started “playing” around with the Echo Dot again, sorry for that!
My guess is you did start music via an Alexa device before (actually playing or not). You can see that in the Sonos App. When you select something via the SonosApp the commands should be working.

Hi,

at the moment i´ve no Alexa device like Echo or Dot…
Just that I understood you right, where can i see this in the SonosApp?

OK, if you don’t have one, your problem has to be something else.
In the sonos app it looks like that if the music is started by alexa:

Hi,

ok, i see. But maybe its the same issue. Is it fixed in the new Sonos binding 2.5?

The issue iabeled solved, so YES. I did test the snapshot version last year and my noticed issue was solved.

Ok, i‘ll go ahead and test the snapshot 2.5 from the sonos binding.

Hi,

after testing last night I found out that if I call the following URL via browser

http://192.168.1.87:8080/audio/e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3

I got

HTTP ERROR 404
Problem accessing /audio/e9ba900c-4662-4d93-92b2-ff0cee46d511.mp3. Reason:
    Not Found
________________________________________
Powered by Jetty:// 9.4.11.v20180605

it confuses me bacause the directory is “sounds” and not “audio”.
I have not yet upgraded the binding to 2.5