Native AAC Squeezebox playback working...

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Re: Native AAC Squeezebox playback working...

Post by florca »

jogglerhase wrote: P.S.: Florca - you can also ignore now all the PM's I send you through various forums.... I hope I did not harrass you too much..... :oops:
Didn't feel harassed as until I saw this message I hadn't noticed that I'd received a PM...!

It's not a difficult install, but I don't run PnP so feel a bit nervous about giving advice on that environment. The only downside that I can see (as per earlier exchange..) is that it doesn't support any form of WMA native decode, which may or may not be a problem for you. All my music and regular radio streams are FLAC, AAC/MP4 or MP3 so not a problem here...
Phil
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

offbeatdave wrote:Wahoo! This is so cool!
Now listening to radio via Squeezeplay, having exited Squeezeplay to the Joggler OS!
I can only second that: Wohoo!
I got it working as well w/ Florca / Phils help.

One question to the community:
How can I get this little player to autostart when booting the joggler?
i.e. is there something similar to the autoexec.bat in the unix world where I could put i.e.

Code: Select all

squeezelite -n Squeezelite -m aa:bb:ee:ff:gg:hh &
to have the player start w/ the system?
Cheers,
Heiner
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

Regarding my help request:
Autostart at reboot is probably not sufficient:
I noticed, that squeezelite vanished / died overnight.
I can only assume that this ius because my NAS, where my Squeezeserver (LMS) resides shuts down nightly.
-> I would need kind of a button to start Squeezelite / a button to run the above instruction line.
Any ideas??

Heiner
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: Native AAC Squeezebox playback working...

Post by offbeatdave »

Any ideas??
Yep. But it'll have to wait until I get a bit of time over the next couple of weeks. It should be possible to launch it in the same way the refresh icon or the mount writable USB icon works. You could explore how they work if you don't want to wait for me.
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

Great! And Thank you, offbeatdave!
I guess, I need to wait for your feedback, since I tried already to figure some options out, but it does not work:
This is what I did:

1) create folder in
media/forums/webserver/starter/squeezelite
w/ entries
- language.xml
which consists of:

Code: Select all

<language>
<mm en="SqueezeLite" />
</language>
- squeezelite.cgi
which consists of:

Code: Select all

#!/bin/sh
echo "Content-type: text/plain"
echo ""
squeezelite -n Squeezelite -m aa:0e:8e:24:fe:1a &
- squeezelite.png which contains the icon

2) add entry in /media/appshop/applications.xml:

Code: Select all

<app id="SqueezeLite" loc="http://localhost:80/starter/squeezelite/" app="squeezelite.cgi" title="SqueezeLite" icon="squeezelite.png"/>
-> The icon appears after reboot, but Squeezelite does not start when I press it...
What am I missing???

-> Hope to hear back from you!
Cheers, Heiner

P.S. I also asked the creator of squeezelite (Triode) in the respective forum, if he had an idea why the process dies and how to avoid that. I'll keep you posted, when I get a response...
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Help / feedback - Please!!!

Post by jogglerhase »

OK, this is driving me mad.....
I just can not figure out how to make it work to have an icon to start squeezelite.... :evil:

Offbeatdave / roobarb / somebody:
Any ideas why my approach does not work?
1) create folder in
media/gforums/webserver/starter/squeezelite
w/ entries
- language.xml
which consists of:

Code: Select all

<language>
<mm en="SqueezeLite" />
</language>
- squeezelite.cgi
which consists of:

Code: Select all

#!/bin/sh
echo "Content-type: text/plain"
echo ""
/usr/bin/squeezelite -n Squeezelite -m aa:0e:8e:24:fe:1a &
- squeezelite.png (which contains the icon)

2) add entry in /media/appshop/applications.xml:

Code: Select all

<app id="squeezelite" loc="http://localhost:80/starter/squeezelite/" app="squeezelite.cgi" icon="squeezelite.png"/>
-> The icon appears after reboot, but Squeezelite does not start when I press it...
What am I doing wrong here?
Desperate, Heiner

P.S.
What I was able to do is to start squeezelite w/ starting the joggler by putting

Code: Select all

/usr/bin/squeezelite -n Squeezelite -m aa:0e:8e:24:fe:1a &
in the end of the
/etc/init.d/rcS file
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Help / feedback -> I got it working!

Post by jogglerhase »

Me so happy....
The above method works!
I now have a seperate icon to switch on SqueezeLite!
I just made the absolute beginners mistake to not adjusts the rights ti these files.
Now I did and it works!
Perfect.

Cheers, Heiner
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

Well - even at the risk of monologizing here.....
They way I did it above does not work that perfectly, because I can not control / see how many instances of squeezlite I have running, as every click starts another one, which causes funny behavior.....
-> Ideally, Squeezelite should be started together with Squeezeplay, but with some sort of logic to check, if the process is already running.
This is way beyond my scope.

Now I am back crossing my fingers that the expert (offbeatdave) will get a smooth integration into PNPIII going.

Cheers, Heiner
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Re: Native AAC Squeezebox playback working...

Post by florca »

jogglerhase wrote: -> Ideally, Squeezelite should be started together with Squeezeplay, but with some sort of logic to check, if the process is already running.
Heiner - What's the problem with simply starting squeezelite at boot via .rcS and leaving it running in the background? Doesn't take significant resources when dormant, with the right asound.conf you should be able to share the ALSA output device (in any event it releases the ALSA output when soft / logically "powered off") and would keep everything nice and simple (KISS...). As per earlier post I don't run PnP and have my Joggler configured as a "permanent" Squeezebox client, so maybe I'm missing something here, but I don't understand why you're keen to manually start it?

Phil
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

Hi Phil;
thanks for your feedback.
And yes you are right. Ideally, Squeezelite could just stay running and I did manage to start it within a bootscript.

However, in my setup, Squeezelite 'dies' overnight, which seems to be connected to the fact that my WLAN and the NAS (which runs my LMS) is powered down nightly - that is intended.

This is a really odd behavior and I discussed it w/ Triode in the slimdevices forum, but we did not find the rootcause.
(It's not the NAS being powered down, that alone does not trigger the issue. But when I cut the LAN / WLAN connection between LMS and Squeezelite, at somepoint squeezelite 'dies' / is not seen by LMS anymore)

Can you maby help w/ this related topic:
Since I need to restart Sueezelite everysooften, I would like to have a (unix) startscript, which, when executed, only starts squeezelite, if it is not running already (otherwise does nothing).

Do you (or anyone?) happen to have some example script w/ which I could do that?


Thanks again & have a good day.

Heiner
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

....continue to monologize...

Post by jogglerhase »

I hope I don't bore anyone.... ;)
Just wanted to share my workaround to bandaid this until a better solution pops up.
I use now 3 icons:
- the std squeezeplay
- an icon which kills potential old instances of squeezelite and then starts a new instance
- an icon which kills squeezelite (not really needed, but convenient to switch of the squeezemusic w/o the need to restart squeezeplay and stop it from within)

Important: To execute squeezelite from within a cgi script properly I found it neccessary to run it in daemonized mode - adding '-z'. Otherwise squeezelite starts, but the script somehow hangs and some other apps won't start and you can also not kill / stop it properly.

So, now I keep my mouth shut and wait what PNPIII will offer in it's next revision..... although I am now 99,99% happy with my joggler - really an amazing gadget. A shame that they are so hard to come by - at least here in germany.... otherwise I would buy some backup units.

Cheers, Heiner
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Native AAC Squeezebox playback working...

Post by roobarb! »

Just a little nudge on this thread to say that I'll be adding libmad0 and libvorbisidec1 to sqpOS v1.09, to make setting this up easier. I've been having a play with this today and it works very nicely with SqueezePlay as a controller. :)
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
Post Reply