SqueezeBox configuration with textfiles

Hello all.

After successfully getting the KNX things working I’m now trying to get my squeezebox configuration into a working state. Unfortunately I failed so far. :expressionless:

My environment:
I’m running openHAB 2.3.0-1 (Release Build) on a raspberry pi. On another rasperry I’m running picoreplayer with lms 7.9.2 and three instances of a squeezebox player.

What I did so far:
I installed the SqueezeBox binding using the Paper UI. The binding discovered the server and the three player instances and showed them in the Inbox. However - as stated in the thread title - I’d like to do the configuration using only text files to have all the configs together (KNX, SqueezeBox and whatever will follow) to ease the backup.

At first I configured the things in a file called lms.things:

Bridge squeezebox:squeezeboxserver:SBZentral1 [ 
	ipAddress="192.168.78.51", 
	webport=9000, 
	cliport=9090 
]	{
    
	Thing squeezeboxplayer Elternbad [ 
		mac="ab:cd:ef:12:34:01"
	]

	Thing squeezeboxplayer Kinderbad [ 
		mac="ab:cd:ef:12:34:02"
	]

	Thing squeezeboxplayer Kueche [ 
		mac="ab:cd:ef:12:34:03"
	]
	
}

Afterwards I added the following items to lms.items:

Player		I_SL1_C		"Elternbad Control"		<player>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123401:control" }
Switch		I_SL1_P		"Elternbad play"		<soundvolume-100>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123401:playPause" }
Switch		I_SL1_M		"Elternbad mute"		<soundvolume_mute>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123401:mute" }
Dimmer		I_SL1_V		"Elternbad Lautstärke"		<soundvolume>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123401:volume" }

Player		I_SL2_C		"Kinderbad Control"		<player>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123402:control" }
Switch		I_SL2_P		"Kinderbad play"		<soundvolume-100>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123402:playPause" }
Switch		I_SL2_M		"Kinderbad mute"		<soundvolume_mute>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123402:mute" }
Dimmer		I_SL2_V		"Kinderbad Lautstärke"		<soundvolume>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123402:volume" }

Player		I_SL3_C		"Küche Control"			<player>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123403:control" }
Switch		I_SL3_P		"Küche play"			<soundvolume-100>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123403:playPause" }
Switch		I_SL3_M		"Küche mute"			<soundvolume_mute>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123403:mute" }
Dimmer		I_SL3_V		"Küche Lautstärke"		<soundvolume>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:abcdef123403:volume" }

Finally I added the following lines to the default.sitemap

	Frame label="Squeezebox Küche" {
		Default	item=I_SL3_C
		Switch	item=I_SL3_M
		Slider	item=I_SL3_V
	}

Unfortunately, it’s not working. The controls are shown in the sitemap but regardless what I click or which values I’m changing, it has no effect in the real world.

Using the Paper UI I don’t see the things in the Control section.

Afterwards I checked the properties of one of the things and found out, that the channels are not linked (a white circle without any filling is shown on blue background). Using the Paper UI I can link the channel to the defined item. But shouldn’t it be possible also without manually linking the channels to items using the web interface?

As a second try I added a channel configuration to the thing definition as I’m used to do for the KNX configuration:

	Thing squeezeboxplayer Kueche [ 
		mac="ab:cd:ef:12:34:03"
	] {
		Type control : control	"Küche Control"
		Type mute : mute "Küche mute"
		Type volume : volume "Küche Lautstärke"
	}

Unfortunately this didn’t resolve it.

Could you please be so kind and point me into the direction how I can resolve this issue?

Kind regards Martin

Welcome to OH2, thanks for all the info!

Everything looks good from a first glance (i know, not what you wanted to hear)
However, I do remember a similar issue when I wanted to give my squeezeboxserver a sensible name…in your case “SBZentral1”

What worked for me, is going to PaperUI, and copying the string out that PaperUI had as name (long hex string with dashes, something like: 3DXXXX84-XXXX-4EXX-BXX3-B5DXXXXX4BF).

Using that string as a replacement for the server name (in your case SBZentral1) did the trick.

I seem to recall that the LMS likes MAC addresses with upper case letters A-F. Try that and report back.

Going from memory, so maybe I got it backwards.

From the docs. Check the LMS info tab and make sure the MAC addresses match

The LMS treats player MAC addresses as case-sensitive. Therefore, the case of MAC addresses in the Squeeze Player thing configuration must match the case displayed on the Information tab in the LMS Settings.

Hi guys.

Thanks for all your quick responses. Great support! :+1:
I hope it’s okay to answer to the both of you in one post.

@lipp_markus: I assume you’re talking about the Configuration -> Things section in the Paper UI. In that section I have a list of all the things. Amongst others there is also one entry for labelled SqueezeBox Server. However, this entry doesn’t have one of these long names you are referring to (and which I’ve already seen in other posts which I read during trouble shooting). I wasn’t able to find it in the properties neither.

@mhilbush: Based on your posts I changed the letters in the mac addresses to uppercase in every configuration:

  • The picore player configuration
  • The things-file

Before it was lowercase in both places. Afterwards I restarted the picoreplayer and the openhab. Now it shows the mac addresses in uppercase letters in the picoreplayer web interface and in the PaperUI (the LMS web interface still shows the mac addresses with lowercase letters). Unfortunately this didn’t change the behaviour, it still doesn’t work.

Any more ideas?

Kind regards Martin

You probably stuck with a half configuration.

  • comment out your thing definition for all squeezebox related lines using pairs of /* and */ allows for multi-line comments
  • stop OH2 sudo openhab-cli stop
  • clear the cache sudo openhab-cli clear-cache
  • start OH2 sudo openhab-cli start`

You can then find in the PaperUI inbox your newly discovered squeezebox server. You can accept it, go to the thing configuration (you found that already) and click show properties.
Copy the string, put it in your thing file, uncomment the thing definitions and restart OH2. If you do not clean the cache in between, OH2 will complain that it has to define a duplicate thing, but it normally works anyway.
Good luck.

I’m still stuck.

I tried to follow your instructions. Was a bit hard because the command to stop the service appearently is sudo /bin/systemctl stop openhab2.service and there was a typo regarding the cache (for everyone who reads this thread later one: sudo openhab-cli clean-cache.

So I commented out the complete lms.things, followed the following steps (had to sudo openhab-cli reset-ownership) and restarted everything. Unfortunately there was no SqueezeBox server in the inbox.

I added one manually and got a non-speaking name, although it’s not nearly as long as the ones in the other examples one can find on the net. As soon as I added that server manually the three players apeared in the inbox. I copied the name to the things-file and restarted everything, just to find the following in the logs:
BridgeImpl with key 'squeezebox:squeezeboxserver:5cc500cb' already exists from provider ManagedThingProvider! Failed to add a second with the same UID from provider GenericThingProvider!

Next try: I removed everything again, commented out the lms.thing, started again, still couldn’t find a server, added another one manually, but this time deleted instantly the three players from the inbox. Afterwards I copied the name of the new server to the lms.thing, restarted everything. Again, three players appear in the inbox, but still no success. This time I find lines like this in the logfile:
Received HTTP PUT request for update configuration at 'things/squeezebox:squeezeboxplayer:342fea85:Elternbad/config' for an unmanaged thing 'squeezebox:squeezeboxplayer:342fea85:Elternbad'.

Your further help is greatly appreciated.

Kind regards Martin

I just tried to even uninstall the squeezebox binding and reinstall it. Still no change.

One thing that caught my attention: When I uninstalled the binding, I saw a message in the log file that the binding was uninstalled. When I reinstalled it, there was nothing in the log. Don’t know whether this is the normal behaviour.

Maybe I use a brand new SD card and start all over again with the latest version of openhabian. Seems like something is seriously misconfigured in my system.

Sorry I didn’t have a chance to look at this until this morning.

Please change your item definitions to this, then restart openHAB. Basically you’re replacing the MAC address with the name you’ve given the player in the .things file.

Player		I_SL1_C		"Elternbad Control"		<player>		    { channel="squeezebox:squeezeboxplayer:SBZentral1:Elternbad:control" }
Switch		I_SL1_P		"Elternbad play"		<soundvolume-100>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:Elternbad:playPause" }
Switch		I_SL1_M		"Elternbad mute"		<soundvolume_mute>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:Elternbad:mute" }
Dimmer		I_SL1_V		"Elternbad Lautstärke"	<soundvolume>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:Elternbad:volume" }

Player		I_SL2_C		"Kinderbad Control"		<player>		    { channel="squeezebox:squeezeboxplayer:SBZentral1:Kinderbad:control" }
Switch		I_SL2_P		"Kinderbad play"		<soundvolume-100>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:Kinderbad:playPause" }
Switch		I_SL2_M		"Kinderbad mute"		<soundvolume_mute>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:Kinderbad:mute" }
Dimmer		I_SL2_V		"Kinderbad Lautstärke"	<soundvolume>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:Kinderbad:volume" }

Player		I_SL3_C		"Küche Control"			<player>		    { channel="squeezebox:squeezeboxplayer:SBZentral1:Kueche:control" }
Switch		I_SL3_P		"Küche play"			<soundvolume-100>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:Kueche:playPause" }
Switch		I_SL3_M		"Küche mute"			<soundvolume_mute>	{ channel="squeezebox:squeezeboxplayer:SBZentral1:Kueche:mute" }
Dimmer		I_SL3_V		"Küche Lautstärke"		<soundvolume>		{ channel="squeezebox:squeezeboxplayer:SBZentral1:Kueche:volume" }

Sorry for my late reply and once again thanks for your support.

Right now I can’t test the change, I will get back to you as soon as possible. Just wanted to let you know that it might take a few days.