Squeezebox configuration

Glad to hear that you could make progress. Not sure I can help much further, as I have never used that function.
I would think that you may need to add the full path, probably starting with file:// judging by the documentation.

Two other remarks, in the event that your use case is voice notifications: if your mp3 is very short Squeezelite will not play it, this is a known bug of squeezelight; and in this use case you will likely need to use a different approach anyway, search the forum for ‘squeezebox mp3’ for pointers (I am not using this function, yet, either). This search string will give you also additional examples and threads that may apply to your situation
Good luck.

Ok, I finally figured out how to play MP3 files on my Synology NAS. The file path is relative to the LMS library folder. I was not able to play files by full file path.

In my case, the library is /Volume1/music/. I placed the MP3s in /Volume1/music/openhab and play them with MySqueezePlayer.sendCommand("openhab/file.mp3")

I am playing short MP3 notifications. I haven’t seen any issues yet, but still testing.

Dustin,

Are you using a full version of Squeezebox, or Squeezelite? I don’t have a SB parameter where I can set the Library. In Squeezelite there is just the ability to set the LMS Data and Cache folders. I’m thinking that Squeezelite doesn’t support a Library.

Thanks

After re-reading this thread, it appears that you’re using a server instance so my Library question is probably irrelevant.

I too am trying to play a file from the OH2 Sounds directory without success. I have to believe that this is due to some missing functionality because I can play a local OH file from the console. When playing the local file, OH serves a local URL reference to SB.

What rule commands are used to serve up a local sound file as a URL like it does via VoiceRSS or the Console Play?

openhab> smarthome:audio play squeezebox:squeezeboxplayer:28C97261-5842-48AE-85C7-DE2E25AFC5D7:d8eb972a4379 10minschool.mp3

This command results in a URL and all works well with SBLite, and a playlist add URL is sent.

2017-02-27 13:59:11.816 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Play notification sound on player d8:eb:97:2a:43:79 at URI http://192.168.10.55:8080/audio/81040a48-f55f-4038-9643-e45a87a2222f.mp3
2017-02-27 13:59:11.818 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Cur State: vol=50, mut=NOT MUTED, pwr=ON, stp=STOPPED, ctl=PAUSED, shf=OFF, rpt=OFF, tix=0, tnm=0, tim=3
2017-02-27 13:59:11.819 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Setting up player for notification
2017-02-27 13:59:11.820 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 mixer volume 80
2017-02-27 13:59:11.921 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 100 ms for volume to update
2017-02-27 13:59:11.923 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Playing notification
2017-02-27 13:59:11.924 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 playlist add http://192.168.10.55:8080/audio/81040a48-f55f-4038-9643-e45a87a2222f.mp3

But when using the sendCommand in a rule I get a playlist play command and not a playlist add.
mySqueezePlayer.sendCommand( “file://doorbell.mp3” )

2017-02-27 14:01:32.832 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 playlist play doorbell.mp3

In summary, I can play a local file from the console, but I cannot use a Rule command to play a local file. I can also us VoiceRSS to request a audio file which also plays correctly via an playlist add and stream.

var string sinkKitchen = "squeezebox:squeezeboxplayer:28C97261-5842-48AE-85C7-DE2E25AFC5D7:d8eb972a4379"

logInfo("logInfoSpeak","RSS Voice Speaking Test")
say("This is a test of Voice RSS", "voicerss:enUS", sinkKitchen)

2017-02-27 14:07:43.710 [INFO ] [.smarthome.model.script.logInfoSpeak] - RSS Voice Speaking Test
2017-02-27 14:07:43.716 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.10.26
2017-02-27 14:07:43.719 [DEBUG] [eezebox.internal.SqueezeBoxAudioSink] - Processing audioStream http://192.168.10.55:8080/audio/4b1d31a3-cf44-41f4-aec9-9abe708f6f7d.mp3 of format AudioFormat [codec=MP3, container=NONE, ]
2017-02-27 14:07:43.721 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Play notification sound on player d8:eb:97:2a:43:79 at URI http://192.168.10.55:8080/audio/4b1d31a3-cf44-41f4-aec9-9abe708f6f7d.mp3
2017-02-27 14:07:43.723 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Cur State: vol=50, mut=NOT MUTED, pwr=ON, stp=STOPPED, ctl=PAUSED, shf=OFF, rpt=OFF, tix=0, tnm=1, tim=0
2017-02-27 14:07:43.726 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Setting up player for notification
2017-02-27 14:07:43.728 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 mixer volume 80
2017-02-27 14:07:44.131 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 400 ms for volume to update
2017-02-27 14:07:44.134 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Playing notification
2017-02-27 14:07:44.136 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 playlist add http://192.168.10.55:8080/audio/4b1d31a3-cf44-41f4-aec9-9abe708f6f7d.mp3
2017-02-27 14:07:44.739 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 600 ms for playlist to update

I’d like to second that; I see exactly the same behaviour:

  • Playing a local file via console: Works great
  • Trying the same from a rule: no Joy. Looking at the LMS server log, triggered from the rule LMS “thinks” it shall search the mp3 locally

I’m not sure the above is implemented. Can you try this instead? Let me know what happens.

var string sinkKitchen = "squeezebox:squeezeboxplayer:28C97261-5842-48AE-85C7-DE2E25AFC5D7:d8eb972a4379"
playSound(sinkKitchen, "doorbell.mp3")
2 Likes

Mark,

Thank you for putting eyes on this!

Yes, that appears to have worked!

My Test Rule

rule "Squeeze Test"

when
   Item DingDong changed
then
   logInfo("logSBTest","Rule playSound Test")

   var string sinkKitchen = "squeezebox:squeezeboxplayer:28C97261-5842-48AE-85C7-DE2E25AFC5D7:d8eb972a4379"
   logInfo("logSBTest","sinkKitchen string set to:" + sinkKitchen)

   playSound(sinkKitchen, "doorbell.mp3")

end

Resulting Log

2017-02-28 10:09:09.736 [INFO ] [pse.smarthome.model.script.logSBTest] - Rule playSound Test
2017-02-28 10:09:09.742 [INFO ] [pse.smarthome.model.script.logSBTest] - sinkKitchen string set to:squeezebox:squeezeboxplayer:28C97261-5842-48AE-85C7-DE2E25AFC5D7:d8eb972a4379
2017-02-28 10:09:09.748 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.10.26
2017-02-28 10:09:09.751 [DEBUG] [eezebox.internal.SqueezeBoxAudioSink] - Processing audioStream http://192.168.10.55:8080/audio/67302b8f-d4e3-4d0c-842a-2c7c7fa71bd8.mp3 of format AudioFormat [codec=MP3, container=NONE, ]
2017-02-28 10:09:09.754 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Play notification sound on player d8:eb:97:2a:43:79 at URI http://192.168.10.55:8080/audio/67302b8f-d4e3-4d0c-842a-2c7c7fa71bd8.mp3
2017-02-28 10:09:09.757 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Cur State: vol=50, mut=NOT MUTED, pwr=ON, stp=STOPPED, ctl=PAUSED, shf=OFF, rpt=OFF, tix=0, tnm=0, tim=0
2017-02-28 10:09:09.758 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Setting up player for notification
2017-02-28 10:09:09.760 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 mixer volume 50
2017-02-28 10:09:11.964 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 2200 ms for volume to update
2017-02-28 10:09:11.966 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Playing notification
2017-02-28 10:09:11.968 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 playlist add http://192.168.10.55:8080/audio/67302b8f-d4e3-4d0c-842a-2c7c7fa71bd8.mp3
2017-02-28 10:09:12.671 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 700 ms for playlist to update
2017-02-28 10:09:12.673 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 playlist index 0
2017-02-28 10:09:25.588 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 12900 ms for stop
2017-02-28 10:09:25.590 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Restoring player state
2017-02-28 10:09:25.591 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 mixer volume 0
2017-02-28 10:09:25.694 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 100 ms for volume to update
2017-02-28 10:09:25.695 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 playlist delete 0
2017-02-28 10:09:26.102 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 400 ms for playlist to update
2017-02-28 10:09:26.103 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Stopping the player
2017-02-28 10:09:26.105 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 stop
2017-02-28 10:09:26.107 [DEBUG] [ebox.handler.SqueezeBoxServerHandler] - Sending command: d8:eb:97:2a:43:79 mixer volume 50
2017-02-28 10:09:26.209 [DEBUG] [ebox.handler.SqueezeBoxPlayerHandler] - Done waiting 100 ms for volume to update

Thanks indeed! “playsound” did the trick :slight_smile:

Hai @lipp_markus,

Would it be possible to mail/post your complete squeezebox cfg,item,sitemap files.

I can’t get it to work, in paperui i have my players/server in my things but somehow it does not work.

thks

I can do that, but I am traveling the next 10 days and have no access
remotely to these files. In case I forget to do it by then :-), fee free to
ping me again if you still need it.

No problem, safe travels!

@Peter_van_hanegem here you go:

watch out: the paper UI is not a user interface, it is only designed to help in configuration; I have everything configured through text files

things file (the bridge identifier is available in the PaperUI)

Bridge squeezebox:squeezeboxserver:3D34F084-8A16-4E61-B593-B5D5B673E4BF [ ipAddress="IP address", webport=9000, cliport=9090 ]
{
    Thing squeezeboxplayer mac_address [ mac="XX:XX:XX:XX:XX:XX" ] //Livingroom
    Thing squeezeboxplayer mac_address [ mac="XX:XX:XX:XX:XX:XX" ] //Guestroom
    Thing squeezeboxplayer mac_address [ mac="XX:XX:XX:XX:XX:XX" ] //Studio 
    Thing squeezeboxplayer mac_address [ mac="XX:XX:XX:XX:XX:XX" ] //Bedroom
    Thing squeezeboxplayer mac_address [ mac="XX:XX:XX:XX:XX:XX" ] //Livingroom2
    Thing squeezeboxplayer mac_address [ mac="XX:XX:XX:XX:XX:XX" ] //Office
}

Items file

Player Livingroom (Players) {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:control" }
Player Livingroom2 (Players) {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:control" }
Player Bedroom (Players) {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:control" }
Player Office (Players) {channel="squeezebox:squeezeeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:control" }
Player Studio (Players) { channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:control" }
Player Guestroom (Players) {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:control" }

and here an example for more items

Switch squeezeBedroomPower           "Bedroom"  (SqueezePlayerPower) {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:power" }
Switch squeezeBedroomPlay            "Bedroom" (SqueezePlay) {channel="squeezebox:squeezeboxplayer:791E1DEA-BBC3-4A9F-80D1-F5CE550F9B:mac_address:playPause" }
Dimmer squeezeBedroomVolume          "Bedroom [%.1f %%]" <soundvolume> (SqueezePlayerVolume) {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:volume" }
String squeezeBedroomTitle		 {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:title" }
String squeezeBedroomRemoteTitle	  {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:remotetitle" , expire="10m, state=unavailable"}
String squeezeBedroomArtist			  {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:artist", expire="10m, state=unavailable" }
String squeezeBedroomCoverArt  {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:coverartdata" }	
String squeezeBedroomYear  {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:year", expire="10m, state=unavilable" }
String squeezeBedroomAlbum  {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:album", expire="10m, state=unavailable" }
Dimmer NotificationVolumeBedroom "Notification Volume Living room [%d %%]" {channel="squeezebox:squeezeboxplayer:3D34F084-8A16-4E61-B593-B5D5B673E4BF:mac_address:notificationSoundVolume"}

sitemap is fairly rudimentary as I it is mostly for testing purposes

Frame label="Audio" {
	Group item=Players label="SqueezePlug Controls" icon="player"
	Group item=SqueezePlayerVolume label="SqueezePlug Volume" icon="soundvolume"
	Group item=SqueezePlayerPower //label="On/Off SqueezePlugs" 
    Slider item=NotificationVolume label="Notification Volume"
    Slider item=NotificationVolumeBedroom label="Notification Volume"
	}
1 Like

Earlier in this thread the following was asked:

My squeeze player Things are defined consistent with squeezebox:squeezeboxserver:myServer:myplayer , so where does 5919BEA2-764B-4590-BC70-D74DCC15491B:20cfbf221510 come from?

For the life of me, I can’t find a reply to this!

Could a guru explain just where this string is found? All I can find in Paper gui is the mac address.

It’s generated when the squeeze server is found by the uPnP discovery process.

Thanks.

What I meant was where do I find the string in the paper gui ?

Got to PaperUI, if you have not done so go to your inbox and accept the newly found thing SqueezeBox Server; when you have the binding installed it discovers the server automatically.

You can then access the ID under “Configuration > Things”


If memory serves me well, the ID is already displayed in the inbox too, so you may not have to accept it as a thing in PaperUI at all, in case you want to stick with config-by-file
Hope that helps

Thanks.

I think something is totally screwed with my OH installation.

Under Inbox I never find any things … despite installing network, squeezebox and sonos bindings.

No idea where to go now!

you can try: Clear the Cache

if that doesn’t work, you may want to open a new thread and post more details: How to ask a good question / Help Us Help You as in this case, your issue is not related to the topic here and you will get more attention if you provide the info under a more descriptive topic heading.

Thanks again.

Endless frustration, I’m afraid.

I’m about ready to give up on OH - 2 weeks of ploughing through ‘guides’, threads, etc. So much is taken for granted.

I’ll try another reinstall.

I hear you and so do likely all people on this forum who have their own share of “war stories” to tell…home automation can be hard…it is simply awesome when it just works…but to get there, it can be frustrating…
Keep at it, OH2 can have a steep learning curve, and be incredibly frustrating while one is working through this, but keep in mind, it is one of the most stable and flexible open source systems out there… and I am not just saying this without admitting that I am looking on and off at some of the alternatives…but as they have their own issues, I am coming back to OH2 over and over again.

If you keep run into trouble, consider posting a new topic with a detailed description (see above), there are so many awesomely informed and committed people on this forum, I am sure if you put in the work, they will too and you will resolve your issues

1 Like