I have tried starting playSound on 3 non-synced players simultaneously.
They play just fine, but in sequence. I play the default OH ding-dong sound and it takes 15-20s until all players are done.
I’ve updated mine to 7.9.2 too however I don’t believe that the problem is on LMS side. LMS just works fine all the time. If I restart binding then everything gets back to normal immediately. And it works perfectly despite I call multiple players at once. Just after some time something happens and it stops work.
Everything is wired. Im using piCorePlayers, currently all are 4.0.0. Even though the bundle says that there is no connection. Does it try to reconnect? What exactly the message means?
Normally, when the connection is lost between the Squeezebox Server thing handler and the LMS, the binding will try to reconnect every 60 seconds. That does not appear to be happening in this case.
Does the issue only occur when you are playing notifications? If so, does it ever occur when you are playing a notification to just one player?
Hi Mark,
From OpenHAB I only call notifications as sounds like dong, opened door, locked door, flood or fire alarms etc.
I always call 2 players, the main in Hall and the other in Bathroom by sending postupdate with sound name to simple rules that further run playsound to appropriate sink. I can try to leave just one player just for tests and see if the problem occurs, however i think that it does not explain why binding stops trying to reconnect and only restarting binding helps. I also still fight with the notifications as they often don’t back volume to the correct previous value or are not removed from the playlist as I noted here.
Is there any chance to make the binding more reliable?
Setting it to play the notification on one player will help narrow down the issue. If it works reliably with just one player, then that would point to a synchronization/timing issue in the notification code.
This could be another symptom of the problem.
This behavior is visible in the logs, and is definitely a symptom of playing multiple notifications simultaneously.
How are you invoking playSound simultaneously? It is a blocking call (subsequent instructions in a rule won’t execute until playSound returns), so I’m not sure how the calls to playSound are overlapping unless it’s being called from multiple rules that trigger simultaneously.
var String sinkLazienka = "squeezebox:squeezeboxplayer:external:Player_Squeezelite_Bathroom"
var String sinkHol = "squeezebox:squeezeboxplayer:external:Player_Squeezelite_Hall"
rule "piLazienka playsound"
when
Item Player_Squeezelite_Bathroom_StreamAddress received update
then
logInfo("Info", "Playing: " + Player_Squeezelite_Bathroom_StreamAddress.state.toString)
playSound(sinkLazienka, Player_Squeezelite_Bathroom_StreamAddress.state.toString)
end
rule "piHol playsound"
when
Item Player_Squeezelite_Hall_StreamAddress received update
then
logInfo("Info", "Playing: " + Player_Squeezelite_Hall_StreamAddress.state.toString)
playSound(sinkHol, Player_Squeezelite_Hall_StreamAddress.state.toString)
Hopefully the trace level logging will shed some light on what’s happening.
Turned on already.
Can you also confirm your config for me? You have one pi running the LMS and a player, and another pi running just the player?
Exactly like this. Both pi are piCorePlayers, one of them is also LMS, however I have also UPnP and Chromecast addon turned on in LMS as I have Google Home and Google Home mini, however I don’t use them at all with openhab via squeezebox binding and those two are not even configured.
did you happen to notice the CPU utilization on the openHAB system?
Nope. Will do on next occasion.
in the Karaf console, can you run the following when the problem occurs again?
openhab> threads | grep "Squeeze Server Listener"
"pipe-grep "Squeeze Server Listener"" Id=26053 in TIMED_WAITING on lock=java.io.PipedInputStream@1d59569
~ openhab> threads | grep "Squeeze Server Listener"
"pipe-grep "Squeeze Server Listener"" Id=26050 in RUNNABLE
~ openhab> threads | grep "Squeeze Server Listener"
"pipe-grep "Squeeze Server Listener"" Id=26053 in RUNNABLE
~ openhab> threads | grep "Squeeze Server Listener"
"pipe-grep "Squeeze Server Listener"" Id=26050 in TIMED_WAITING on lock=java.io.PipedInputStream@13de78b
~ openhab> threads | grep "Squeeze Server Listener"
"pipe-grep "Squeeze Server Listener"" Id=26052 in RUNNABLE
~ openhab> threads | grep "Squeeze Server Listener"
"pipe-grep "Squeeze Server Listener"" Id=26050 in RUNNABLE
~ openhab>