[SOLVED]Chromecast stop playing during local mp3 reading

  • Platform information:
    • Hardware: _RPI 3
    • openHAB version: openhabian 2.4.1
      hello, i would like to play mp3 stories to my boy throught my Google home thanks to the chromecast binding, these files are located in the default sound folder, the problem is each time i launch the mp3 file it stop maybe 45s to 1 min on the chromecast, but play normally when i play them throught web audio on my computer.
      I remove the callback url in the binding configuration as i saw in a other post, i change the default audio sink to…i tried everything i could with playsound command, play stream, with and without audio sink… and so on…

here are my items files and my rule:

Number Livres_audio         "livres audio[%d]"              (livres_audio)

My rule

rule "Livres_audio"
when
Item Livres_audio received command
then
 switch(receivedCommand) {
case 0 : sendCommand(ChromecastAudioControl, PAUSE)
case 1 : playStream("chromecast:audio:salon","http://192.168.1.29:8080/sounds/mulan.mp3")
case 2 : playSound("chromecast:audio:salon","peterpan.mp3")
case 3 : playSound("chromecast:audio:salon","pinocchio.mp3")

}
postUpdate(Radio,0)   
end

every things is online and item correctly set,
in the binding configuration the callback field is empty for now,
the default openhab audio sink is set to Chromecast audio…,
i’ve no chromecast.cfg file cause i don’t now know where to write it

Finally the log in frontail:

2019-10-04 17:29:31.734 [ome.event.ItemCommandEvent] - Item 'Livres_audio' received command 2
2019-10-04 17:29:31.744 [vent.ItemStateChangedEvent] - Livres_audio changed from 1 to 2
2019-10-04 17:29:32.183 [vent.ItemStateChangedEvent] - ChromecastAudioCurrentTime changed from 14.768821 s to 0.0 s
2019-10-04 17:29:32.271 [vent.ItemStateChangedEvent] - ChromecastAudioStatustext changed from Casting: Notification to Default Media Receiver
2019-10-04 17:29:32.274 [vent.ItemStateChangedEvent] - ChromecastAudioStatustext changed from Default Media Receiver to Casting: Notification
2019-10-04 17:29:33.594 [vent.ItemStateChangedEvent] - ChromecastAudioCurrentTime changed from 0.0 s to 1.000975 s
2019-10-04 17:29:37.046 [vent.ItemStateChangedEvent] - ChromecastAudioCurrentTime changed from 1.000975 s to 4.54943 s
2019-10-04 17:29:37.076 [vent.ItemStateChangedEvent] - ChromecastAudioDuration changed from 3293.048163 s to 2187.441633 s
2019-10-04 17:29:47.309 [vent.ItemStateChangedEvent] - ChromecastAudioCurrentTime changed from 4.54943 s to 14.796286 s
2019-10-04 17:29:57.565 [vent.ItemStateChangedEvent] - ChromecastAudioCurrentTime changed from 14.796286 s to 25.016803 s
==> /var/log/openhab2/openhab.log <==
2019-10-04 17:30:04.440 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /audio/a67758ae-00ac-41f6-a070-e196dca4f1b0
javax.servlet.ServletException: java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
	at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:235) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:217) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:515) ~[?:?]
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1489) ~[?:?]
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1465) ~[?:?]
	at org.apache.commons.io.IOUtils.copy(IOUtils.java:1440) ~[?:?]
	at org.eclipse.smarthome.core.audio.internal.AudioServlet.doGet(AudioServlet.java:137) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	... 15 more
Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
	at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166) ~[?:?]
	at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:?]
	... 1 more
==> /var/log/openhab2/events.log <==
2019-10-04 17:30:07.819 [vent.ItemStateChangedEvent] - ChromecastAudioCurrentTime changed from 25.016803 s to 35.347354 s
2019-10-04 17:30:18.012 [vent.ItemStateChangedEvent] - ChromecastAudioCurrentTime changed from 35.347354 s to 45.514024 s

Thanks for your help

Have you tried putting the sound file in the html folder and calling playStream on
http://192.168.1.29:8080/static/mulan.mp3

thanks vincent; again you solved my problem,
thanks u you :+1: