Squeezebox trouble in openHAB2

You can define your own things in a textual way in the .things file. However, it either PaperUI or the textual configurations, you cannot have both, in other words, the if you start using textual definition in a .thing file, the PaperUI will not update this file.
Otherwise, the PaperUI offers easy copy and paste, so it may not matter that much.
Hope that helps

Hello

Now I’m starting to get a hold of it I believe but when I try to arrange items via textfile both of my player plays the same music.

.thing file I hope thi is right

Bridge squeezebox:squeezeboxserver:myServer [ ipAddress=“xxxxxxxxxx”, webport=9000, cliport=9090 ]
{
Thing squeezeboxplayer kok[ mac=“c4:e9:84:db:d4:89” ]
Thing squeezeboxplayer hallen[ mac=“60:e3:27:07:6f:0d” ]

.item file

Switch squeezeKokPower “Köket” (gPlayerPower) {channel=“squeezebox:squeezeboxplayer:myserver:kok:power”}

}

I Hope with this configuration not to need the mac adress in every channel link.

please correct me if I’m wrong

Hello

I have a new problem when i send a command to my string item to stream an url it starts playing on both my players

I’ve check an cannot find any missmatch between channel linking and players.

Sent command is below.

sendCommand(squeezeKokStream,“http://opml.radiotime.com/Tune.ashx?id=s17553&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=01f7b9ee011ae344013ad42dc335e779”)

I must reply to my own stupidity I’ve managed to group my players without knowing about it.

Problem solved.

Hello again I’ve got one further problem when I try to run openhab as doorbell I send this command

sendCommand(squeezeKokStream,“file:///etc/openhab2/sounds/doorbell.mp3”)

Player updates and chnages from paus to play and direct from play to pause I dont know if my string is correct should it be /// or //etc for instance or could it be that openhab dosen’t have permission to file witch would be strange since it’s a standard OH file.

Try this in your rule instead (replacing the string with your player thing UID).

var string player = "squeezebox:squeezeboxplayer:28C97261-5842-48AE-85C7-DE2E25AFC5D7:d8eb911a4bf9"
playSound(player, "doorbell.mp3")

I will try to understand this but I use my syntax for use with my HTTP server and there it works so I thought that file:// also should work. I have troubel to understand what you mean.

Your post with the file path implied that doorbell.mp3 is in your OH sounds directory. sendCommand() doesn’t serve up local OH2 files. To do this you have to use playSound() as suggested. The FILE:// syntax is used when playing from a remote player like LMS, not local.

Thanks for all help but now i’m into a new problem error messeag saying no audiosink I don’t know wath to choose since players ar several diffrent?

In PaperUI, Configuration, System, Audio you can select a default Audiosink.
In your rules you can use any Player you want, just as @mhilbush explained in his previous post:

I guess I might have figured out where my problem is but really dont now how to fix it I had default audio system spekaer with mp3 support in paper ui and added in textual cfg enchancedjava… or what’s supposed to be. But when i look att my player theres no UID in properties and in example there seems to be a uid in uppercase with - between series. What have I been doing wrong?

And heres how a channel is set up for the same player

Look what it says below the Channel “Volume” in your Screenshot, that is the UID and then do this:
Try this in your rule instead (replacing the string with your player thing UID):

var string player = "squeezebox:squeezeboxplayer:YOUR-UID"
playSound(player, "doorbell.mp3")

Yes this is my rule for now but still gets error no audio sink even though I set it bot textual and in paper ui. Is there om MP3 support och codec that could be mising, I usally only plays spotify and web radio.

rule "kitchen_door"
when
Item gDO_kokknapp changed from OFF to ON
then
if (gDO_bells.state==ON){
//sendCommand(gDO_kok, ON)
var string player "squeezebox:squeezeboxplayer:571ee880:c4e984dbd489"
playSound(player, “doorbell.mp3”)

Strange. In PaperUI, Configuration, System, Audio set any of your Squeezeboxes as default.
Save and quite frankly, after that I would go for IT problem solver #1:
Perform a reboot and then try again

But how do I set my squeezeboxes as default audiosink the only options availible is systemspeakre systemspeaker with mp3 support and webaudio, maybe this is the problem?

Aha now we are getting somewhere. If you don’t get the option, you are probably on the Stable Release. This feature is currently only available in the Snapshot release. You need to update. See here for details:

Good that we finally came to some conclusion in this cas butI think it a bit of a hassle to upgrade mostly since my Linux skills are quite poor. Since I’ve done some configuration in paper UI I guess that those settings will be lost due to upfrading to snapshot? I’ve configured all channels and so on textual way but have all bridges set up in Paper UI, and to be honest I’m just to lacy to redo all of that. I can host the file on my web server but that seems slow a delay at almost 5 seconds before it starts to play. I’m intereset in sett up door bells in several places in our house either as a squeezebox or chromecast. But I alos ound a cheap set of Wifi speaker thats sold under the brnd Roxcore her in sweden but I haven’t seen any support for it here but a small wifi speaker is just around 90USD That schould be nice option

When I migrated to OH2 I fell into the same trap. Set up the stable version and found i lack exactly this function. I upgraded to Snapshot as explained in previous post and I did not loose anything, neither did something brake. It was a 10 minutes operation.
As no two setups are the same, YMMW, but i would say the risk is low, the gain is big.

Now I followed your advice and it seems like evreything is working as it’s supposed to. Only troble where to ad on } at the end of sitemap since OH didn’t recognized them. From push at the door button to playing audio is about 3seconds so not so much faster than my HHTP server but atleast it works at its supposed to. I made apt-get update and then apt-get upgrade but maybe I could do someting simplier to only upgrade OH.

I’m running theese machines on HP thin client (got a surplus of them) os Lubuntu 14 running from 16GB USB drive and using internal storage of 1GB for swap. One machines hostes openhab and serves as a squeezeplayer. Could there be some trick to shorten the delay from buttonpush to audio playing or to make it play the file like 4 times in a row or is it easier to just make a new file with loops inside?

Glad you got it working.
3 seconds is not that bad i think. Still, you could check with the “top” command if this is maxing out your cpu. if so, the only speed gain would be better Hardware.
As for playing the sound several times, i would say a an mp3 with loops is the cleanest solution.

On a sidenote: If you are really running Lubuntu 14 you definitely should upgrade to something more recent.
Latest is Lubuntu 16.10 so you are running a real security risk there.