Openhab 2 Squeezebox Text to speech?

Playing the doorbell.mp3 shows this debug messages:

2017-03-26 20:16:20.377 [DEBUG] [eezebox.internal.SqueezeBoxAudioSink] - Processing audioStream http://192.168.2.5:8080/audio/cc358219-b371-4b24-9725-f046023d7791.mp3 of format AudioFormat [codec=MP3, container=NONE, ]
2017-03-26 20:16:20.378 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Play notification sound on player 00:04:20:06:21:aa at URI http://192.168.2.5:8080/audio/cc358219-b371-4b24-9725-f046023d7791.mp3
2017-03-26 20:16:20.379 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Cur State: vol=50, mut=NOT MUTED, pwr=ON, stp=NOT STOPPED, ctl=PLAYING, shf=OFF, rpt=PLAYLIST, tix=5, tnm=55, tim=251
2017-03-26 20:16:20.381 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Setting up player for notification
2017-03-26 20:16:20.382 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Turning off repeat
2017-03-26 20:16:20.383 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa playlist repeat 0
2017-03-26 20:16:20.384 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa stop
2017-03-26 20:16:20.385 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa mixer volume 50
2017-03-26 20:16:20.886 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 500 ms for volume to update
2017-03-26 20:16:20.886 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Playing notification
2017-03-26 20:16:20.887 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa playlist add http://192.168.2.5:8080/audio/cc358219-b371-4b24-9725-f046023d7791.mp3
2017-03-26 20:16:21.288 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 400 ms for playlist to update
2017-03-26 20:16:21.288 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa playlist index 55
2017-03-26 20:16:51.311 [WARN ] [ebox.handler.SqueezeBoxPlayerHandler] - TIMEOUT after 30000 waiting for stop!
2017-03-26 20:16:51.311 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Restoring player state
2017-03-26 20:16:51.311 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa mixer volume 0
2017-03-26 20:16:51.412 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 100 ms for volume to update
2017-03-26 20:16:51.412 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa playlist delete 55
2017-03-26 20:16:56.417 [WARN ] [ebox.handler.SqueezeBoxPlayerHandler] - TIMEOUT after 5000 waiting for playlist to update!
2017-03-26 20:16:56.417 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Resuming last item playing
2017-03-26 20:16:56.417 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa playlist index 5
2017-03-26 20:16:57.118 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 700 ms for playlist to update
2017-03-26 20:16:57.118 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa time 251
2017-03-26 20:16:57.118 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Playing the playlist item
2017-03-26 20:16:57.119 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa mixer volume 50
2017-03-26 20:16:57.319 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 200 ms for volume to update
2017-03-26 20:16:57.320 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Restoring repeat mode
2017-03-26 20:16:57.320 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:06:21:aa playlist repeat 2
2017-03-26 20:17:00.180 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: players 0

I played the doorbell.mp3 from karaf, as it’s the fatest way to test. When it works I’m going to adapt rules.

Thanks for your assistance. I have no idea, why it doesn’t work. Everything works just fine with my squeebox server and players.

Indeed two issues was my thought as well

Me either. I’ve never tested on a Squeezebox 3, so that’s a bit of an unknown. Do you have any other types of players, and do you get the same behavior on those?

Same in my bathroom, there is a Logitech Squeezebox Receiver (other hardware player)

2017-03-26 20:34:24.728 [DEBUG] [eezebox.internal.SqueezeBoxAudioSink] - Processing audioStream http://192.168.2.5:8080/audio/291d207c-7879-4c1e-be38-2fe1a3c0c9cf.mp3 of format AudioFormat [codec=MP3, container=NONE, ]
2017-03-26 20:34:24.728 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Play notification sound on player 00:04:20:17:44:8d at URI http://192.168.2.5:8080/audio/291d207c-7879-4c1e-be38-2fe1a3c0c9cf.mp3
2017-03-26 20:34:24.729 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Cur State: vol=37, mut=NOT MUTED, pwr=OFF, stp=STOPPED, ctl=PAUSED, shf=OFF, rpt=OFF, tix=5, tnm=55, tim=97
2017-03-26 20:34:24.730 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Setting up player for notification
2017-03-26 20:34:24.730 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Powering on the player
2017-03-26 20:34:24.731 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d power 1
2017-03-26 20:34:24.731 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Initializing notification volume to current player volume
2017-03-26 20:34:24.734 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d mixer volume 37
2017-03-26 20:34:24.766 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d mixer volume 37
2017-03-26 20:34:24.772 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d play
2017-03-26 20:34:25.135 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 400 ms for volume to update
2017-03-26 20:34:25.136 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Playing notification
2017-03-26 20:34:25.137 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d playlist add http://192.168.2.5:8080/audio/291d207c-7879-4c1e-be38-2fe1a3c0c9cf.mp3
2017-03-26 20:34:25.538 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 400 ms for playlist to update
2017-03-26 20:34:25.539 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d playlist index 55
2017-03-26 20:34:55.566 [WARN ] [ebox.handler.SqueezeBoxPlayerHandler] - TIMEOUT after 30000 waiting for stop!
2017-03-26 20:34:55.566 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Restoring player state
2017-03-26 20:34:55.566 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d mixer volume 0
2017-03-26 20:34:55.667 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 100 ms for volume to update
2017-03-26 20:34:55.667 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d playlist delete 55
2017-03-26 20:34:58.470 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 2800 ms for playlist to update
2017-03-26 20:34:58.470 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Stopping the player
2017-03-26 20:34:58.470 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d stop
2017-03-26 20:34:58.470 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d mixer volume 37
2017-03-26 20:34:59.672 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 1200 ms for volume to update
2017-03-26 20:34:59.672 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Powering off the player
2017-03-26 20:34:59.672 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d power 0
2017-03-26 20:35:00.190 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: players 0

Well, my player says, that the playlist is empty. How does LMS know, where to find the mp3? My LMS is not on the openhab server, it runs on my Qnap.

It’s ok that LMS runs elsewhere. openHAB streams the mp3 file through it’s internal web server to the LMS and to the player.

This looks a bit odd. It should just send the volume once. And, I have no idea where that play command is coming from.

2017-03-26 20:34:24.734 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d mixer volume 37
2017-03-26 20:34:24.766 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d mixer volume 37
2017-03-26 20:34:24.772 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d play

I notice that this player was powered off. Maybe try it with the player already powered on. That shouldn’t be an issue, but I’m just trying to eliminate unknowns…

2017-03-26 20:34:24.729 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Cur State: vol=37, mut=NOT MUTED, pwr=OFF, stp=STOPPED, ctl=PAUSED, shf=OFF, rpt=OFF, tix=5, tnm=55, tim=97
2017-03-26 20:34:24.730 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Setting up player for notification
2017-03-26 20:34:24.730 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Powering on the player
2017-03-26 20:34:24.731 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d power 1

What version of LMS/SqueezeServer are you running?

This also is odd, because it appears that LMS thinks the playlist contains 54 items (the notification is #55, which is added to the end of the playlist).

2017-03-26 20:34:25.539 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d playlist index 55
...
2017-03-26 20:34:55.667 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: 00:04:20:17:44:8d playlist delete 55

Sorry for the confusion. The player says that the playlist ist empty when trying to play the tts message. After that (silence pause) the old playlist continues, but not at the same position. I think it starts with the next song, it’s definitately not the interupted song. But that’s not the issue :wink:

My LMS version is Logitech Media Server Version: 7.9.0 - 1474277583 @ Mon Sep 26 04:07:11 UTC 2016

The play comes from a rule. When my squeezeplayer get a power on then a rule appends a play command. So the music starts playing, when my motion sensor detects movement and switches the amplifier on. This starts my squeezebox as well. Sounds complicated, but it works :wink:

Ok, I see.

To help narrow things down, could you disable that rule, power on the player, then try playing the doorbell sound from the karaf console?

Same problem here.
A file is created ā€œde-DE_5c372a32c9ae748a4c040ebadc51a829.mp3ā€ within ā€œ/var/lib/openhab2/voicerss/cacheā€.
And in the Squeezebox Player the streamed file is called ā€œhttp://192.168.1.201:8080/audio/c1dc39fc-a93e-450b-9b07-ecb5beebf415.mp3ā€
I can hear nothing and when i manually call this link from the browser i get a 404.

Where is the link from this file under cache to the http-link? and why does the link not work?

works well, my fault.

FYI, for those using piCorePlayer. piCorePlayer version 3.20 was released on 1 May 2017. This version of piCorePlayer contains the squeezelite fix that caused issues playing short notifications.

See here for ralphy’s confirmation.

And here for the pCP 3.20 announcement.

hi there! i just read this thread for many times but i don’t get it…
shouldn’t i get my squeezebox (running on pCP 3.20) as audio sink under conf / system / audio?

Well you can set a default sink, but you don’t have to.
I guess in most use scenarios you would specifiy the sink to use in your rule, f.e.:

var String sinkKueche = "squeezebox:squeezeboxplayer:XXXX"

rule "play"
when
       Item Someitem received command PLAY
then
      playSound(sinkKueche, "tts.mp3")
end

and how could i set it as default sink? there’s no option for any squeezebox player under ā€œconf / system / audioā€ to select…

The Squeeze player(s) should show up in the dropdown list for Audio Sink. Like this.

Are you certain you’re on a version of OH2 that includes the Squeezebox binding that has Audio Sink support? Audio Sink support was added back in February of this year.

Using Paper UI, if you look at the channel list for your Squeezebox player thing, there should be a channel named ā€œNotification Volumeā€.

erm, i’m using openhabian and just run a update/upgrade, it says ā€œopenhab2 is already the newest version.ā€ (2.0.0-1 ?)

So do you see the Notification Volume channel when you look at the channel list for your Squeezebox player thing?

no, neither is my pCP listed on thinks like it’s on your screenshot.

Ok, so can you confirm that in Paper UI under Configuration->Things you have a Logitech Media Server and a Squeezebox Player, similar to this image?

Note that the default name of Logitech Media Server is something like Logitech Media Server. Mine is called Squeezebox Server simply because I want it to sort so that it’s with the players.

yes!