Squeeze box server & Javascript

187 views
Skip to first unread message

NDSNI

unread,
Aug 8, 2011, 10:16:57 AM8/8/11
to CommandFusion
Hi,

Was looking to find out has anyone developed a javascript module for
controlling the logitech squeezebox server/players from within
iViewer. I have looked at the GitHub, which has not been updated since
June 8th.

We would be happy to pay for this module if any one has it available?

Regards,

Noel Sofley

Barry Gordon

unread,
Aug 8, 2011, 12:01:29 PM8/8/11
to comman...@googlegroups.com
Noel, I wrote a complete system for the Pronto PRO all in Javascript. You
could buy that one from me for $29.95 (source code) and then use it as a
base to convert it to the CF systems. I just decided to use the Squeezepad
app as it can be launched by a url schema.

Hi,

Regards,

Noel Sofley

--
You received this message because you are subscribed to the Google Groups
"CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to
commandfusio...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/commandfusion?hl=en.

skorpioknx

unread,
Aug 9, 2011, 11:35:02 AM8/9/11
to CommandFusion
Hi Barry,

Squeezepad is very good.. but how do you go back to iViewer from
Squeezepad ?

Regards

Raimundas

panos_k75

unread,
Aug 9, 2011, 1:17:14 PM8/9/11
to CommandFusion
You can't...I am also interested in a module for this.

Barry Gordon

unread,
Aug 9, 2011, 1:18:46 PM8/9/11
to comman...@googlegroups.com
Right now I just exit squeezepad and start the iviewer. I have
multiprocessing off in iViewer. I think in theory if it were on iViewer
would stay active in the background and when it was restarted would pick up
where it was. If iViewer is running in MP on mode then a double tap exiting
squeezepad should bring up the bottom line showing what is in the
background??? I am not sure being a little new to the iPAD. I have only
been at this for about a month.

skorpioknx

unread,
Aug 9, 2011, 3:10:25 PM8/9/11
to CommandFusion
Text from developer squeezepad :

Hi Raimundas,

I don't plan to integrate a way 'back' - it would confuse to many
users.
But you can do a double tap on the home button of the iPad - then the
taskbar of the iPad appears and you can choose your previous program.

Cheers
Stefan

Maybe posible special version for smarthome instalers ? :) only one
button add needet... URL to iviewer...

Raimundas

Barry Gordon

unread,
Aug 9, 2011, 11:40:54 PM8/9/11
to comman...@googlegroups.com
Well I tried a couple of things. I turned multitasking on in iViewer. I
have a button called music that when touched does a url to squeezepad. It
does that nice page interchange that safari does as you switch between pages
and Squeezepad starts. A double tap on the power button in squeezepad
raises the current squeezepad page exposing the task bar. The iViewer icon
is there and touching it returns you to where you were in the viewer. Using
the double touch on the power button you can switch between iViewer and
Squeezepad, both of which seem to keep running in the background.

Works for me

Jarrod Bell

unread,
Aug 10, 2011, 1:03:15 AM8/10/11
to comman...@googlegroups.com
Hi Barry, Would love it if you could share your prontoscript file with
us to see if we can convert to a CF Javascript file perhaps?
I realise you sell the prontoscript version, but I'm just asking nicely
to see if you would be willing to open source the code for us to port? :)

Jarrod

Barry Gordon

unread,
Aug 10, 2011, 10:17:13 AM8/10/11
to comman...@googlegroups.com
Philosophically I am against doing that for the following reason.

I believe it would be a great capability for other apps to be able to be
integrated reasonably into the CommandFusion iViewer. Using SqueezePad as
the example. In my GUI there is a button called Music. Running the iViewer
in multitasking mode gives the following behavior. Touching the music button
switches to the SqueezePad app via the apps URL schema. From that point on
while in Squeezepad a double tap of the power button brings up the task bar
and a single touch of the iViewer app brings back iViewer which is running
in the background. A touch of the music button in the iViewer app now brings
back squeezepad at the state it is in (it is running in the background). A
double tap of the power button in either app brings up the taskbar with a
single tap switching to the app of choice that is running in the background.
I would like to see Squeezepad (and other similar apps) enhanced so that it
had a setting to control what happened on a double tap of the power button:
Either brings up the task bar as it does now (default) or switches directly
to the declared app without the task bar step. While the current situation
is pretty good and works with any app (better if the app has a URL schema),
the enhancement mentioned would truly give the model of apps as launched
apps with ability to easily move back and forth between them and iViewer.

Having said all of the above: The prontoscript code is always delivered as
source and I really have no issue giving you a copy at no charge to play
with. I assume if you do that either it will be given away for free after
the port, or we will have some sharing (royalty) arrangement if you intend
to sell it. The code is not well written as at the time I was (1) Learning
Javascript, (2) learning the Squeezeserver interface which was not well
documented at the time (3) learning how to code for the Pronto Pro
environment (their equivalent of iViewer). The code is written in a style
where there is very little code at the button level, just calls to the
Prontoscript (javascript + Pronto environment classes) functions which do
all the lifting. It was also written for easy maintenance (less efficient)
but better when dealing in the environment I was (Programming is like Ice
skating, it is better if things are Frozen)

Contact me at my eMail if you still want a copy.

-----Original Message-----
From: comman...@googlegroups.com [mailto:comman...@googlegroups.com]

On Behalf Of Jarrod Bell
Sent: Wednesday, August 10, 2011 1:03 AM
To: comman...@googlegroups.com
Subject: Re: Squeeze box server & Javascript

Jarrod Bell

unread,
Aug 10, 2011, 12:36:56 PM8/10/11
to comman...@googlegroups.com
The way I see it, relying on a third party app is definitely not the way
to go for true automation.
For instance, you can't control the sound system at the same time as
anything else if you have to keep swapping between apps.
"House All Off" is impossible this way, amongst many other things.

Apple will never allow you to change what the home button does, and
every app developer for all the AV apps out there will not add a way
back to iViewer.

I'd love to take a look at the prontoscript if nothing more to see how
they compare to our API for porting of other prontoscript files in
future as well.

Jarrod

Barry Gordon

unread,
Aug 10, 2011, 1:45:55 PM8/10/11
to comman...@googlegroups.com
I understand your "other app" point, but I respectfully disagree. After all
a complete implementation of a Squeezeserver control system using javascript
in Commandfusion is "just another app". Yes the integration is a little
tighter, but I am quite pleased with how iViewer switches to another app via
a URL schema. I just wish other independent apps had a similar capability.
The switchback is less than optimal but not too bad, at least with
squeezepad.

I am not a proponent of open source having worked in software development my
entire life, but I do take advantage of it as I am financially astute. I
still believe that Commandfusion as an "Integrating app" should be able to
seamlessly integrate third party apps.

Too bad Apple does not allow control over the double tap on the power (or is
it called the "home" ?) button.

To reinforce your point of view I did write my own weather handler for
CommandFusion that uses the rss feed from yahoo weather. I did cheat a
little since my auxiliary system (the PAL which runs on a PC 24/7) already
had the RSS feed pull and structure into an array so I used it. It would be
trivial IMHO to have CF get the RSS Feed directly and stuff it into an
array. If you are interested I can send you a screen shot of the page if
someone tells me how to do that on the iPAd. I think I did it once but have
forgotten how (getting old sucks, but the alternative is much worse)

I will send you the Prontoscript Squeezeserver control code on one condition
- No Laughing!

I have been thinking about an automatic system to give a real leg up in
porting Prontoscript to CommandFusion. I already have programs that parse
the Pronto xcf format files into seperate JS objects and break apart all of
the button/page actions. Maybe if I get some time. . .

Fiasco

unread,
Aug 10, 2011, 2:25:54 PM8/10/11
to CommandFusion
Multiple apps is the modern equivalent of a tabletop of remotes

Scott Shanafelt

unread,
Aug 10, 2011, 2:28:55 PM8/10/11
to comman...@googlegroups.com
We had some experience a while back using multiple apps (sonos and crestron, was a nightmare) and can say clients pretty universally hate it. People prefer everything living in one app, it seems. At least for stuff that are logically related that would cause you to switch back and forth frequently for.

S

panos_k75

unread,
Aug 10, 2011, 3:49:19 PM8/10/11
to CommandFusion
I also use squeezepad and it's great but i wish with one button I
could turn music on, amplifier on, favourite playlist playing (among
other things)..CF has the technology built-in now to fully control
squeezesever and provide the same (if not better experience like
squeezepad. It's just case of someone investing the time to do this.

Barry Gordon

unread,
Aug 10, 2011, 4:29:35 PM8/10/11
to comman...@googlegroups.com
Did you know that on some of the squeeze devices you can issue IR to control
your amp, adjust volume etc. It is a third party plugin (IR Blaster) that
works fine. In one room it just turns on and off the power amp (no IR on the
amp) using an IR controlled power dongle by simrec. Much cheaper than the
Xantech similar devices. The Squeeze receiver does not have this capability
but the regular squeeze box's and the Transporter do.

In my theater I do something a little different. (first of all the entire
theater is controlled by a small inexpensive PC running 24/7, normally it is
in state s3 (sleeping)). The iPad talks to this PC when dealing with the
theater.

Using the xAP plugin for the Squeezeserver I have the Theater PC controlling
the Theaters audio system as it sees the Squeeze Transporter changing
things. It knows when (via the xAP messages) the transporter turns on or
off, and when the volume changes and to what degree. It adjusts the A/V
processor appropriately so the Squeezepad app doesn't have to worry about
it. I play a lot of multichannel encoded music so I cannot use the
squeezeserver for volume control as you cannot adjust volume on an encoded
audio stream.


Lastly Stefan, the Squeezepad author, indicated a new ios capablity that
might help, the 4-finger swipe. I think it may be in ios 5 which is not yet
released. He stated that a 4 fingered swipe may be used to switch apps I
assume without using the task bar.

Hope that helps

Barry Gordon

unread,
Aug 10, 2011, 4:35:40 PM8/10/11
to comman...@googlegroups.com
I need an email address to send you the SlimPronto source code.

Jarrod Bell

unread,
Aug 10, 2011, 9:29:40 PM8/10/11
to comman...@googlegroups.com
I emailed you off the list last night to your private email, if you
didnt get that, then just send to support at commandfusion dot com

Jarrod

Barry Gordon

unread,
Aug 11, 2011, 12:48:14 AM8/11/11
to comman...@googlegroups.com
never got it. It is on its way to sup...@commandfusion.com

Fakum12

unread,
Aug 11, 2011, 2:51:22 AM8/11/11
to CommandFusion
> Multiple apps is the modern equivalent of a tabletop of remotes

Very well said!

And I had the same experience as Scott Shanafelt, customers really,
really don't like switching between apps.

Sorna Devadas

unread,
Mar 9, 2014, 9:13:39 PM3/9/14
to comman...@googlegroups.com
hi,

was wondering if anyone could create a squeezebox controller for us.

we are building a customer server/player using LMS, squeezelite and jivelite, and want to create an ios controller for it without using the ipeng or squeezebox commercial apps (we want to package with our own product)

if anyone can help or provide clues, would be greatly appreciated. email sornaconnects at gmail dot com

regards, Sorna

Barry Gordon

unread,
Mar 10, 2014, 12:32:09 AM3/10/14
to comman...@googlegroups.com

I wrote one several years ago for the Pronto family of remotes which were Javascript based.  It is quite q complex undertaking.  One of the issues is the feature set. For example just transport control and displaying the play list with cover art is not too bad, but if you want to include all of the other capabilities of LMS then it is a serious undertaking.  I personally use sqqueezebox.

 

From: comman...@googlegroups.com [mailto:comman...@googlegroups.com] On Behalf Of Sorna Devadas
Sent: Sunday, March 09, 2014 9:14 PM
To: comman...@googlegroups.com
Subject: Re: Squeeze box server & Javascript

 

hi,

--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

JohanJ

unread,
Mar 10, 2014, 4:01:16 AM3/10/14
to comman...@googlegroups.com
Hi

I think you should describe more about what your expectations are, e.g. what supported apps, alarms support, synchronization of players, editing of playlists etc.. As Barry mentioned, the LMS are quite complex and adding support for all that iPeng and Squeezepad has is quite an undertaking. E.g. the API can apparently differ between server versions and the API is not fully documented and different apps does apparently not handle the menu browsing in the same way.

The commercial apps are using cometd for subscribing to player changes, it's however not according to specifications so one would probably need to read a lot of logs and accept trial and error approach if going this road instead of tcp/cli for subscriptions.

I have started to implement Squeezeserver support for my own usage and have right now no ambition to create a full blown module with support of everything, only the parts I use in Squeezepad. I'm using the tcp/ip CLI interface for subscriptions and the jsonrpc over HTTP for pulling data. I can browse and play the own library, the Triods Spotify app, podcats and internet radio. Have a now playing playlist with titles and thumbs, also player and transport control.

Johan   

Barry Gordon

unread,
Mar 10, 2014, 11:19:48 AM3/10/14
to comman...@googlegroups.com

Slightly OT

 

Interesting. When I wrote the app for the ProntoPAL they were not yet using JSONRPC, so I did everything via the CLI, which at the time was well documented.  Logitech had not yet bought Slim (the server portion was originally called SlimServer) so the entire server (it may still be) was open source with world class support and help from a very active community.  They had the best bug tracking system I ever came across. 

 

It is still the music system for my house. I have 2 receivers, 1 player, 1 BoomBox and one Transporter.  The BoomBox is my favorite as it is fully self contained, just needs wi-fi access and a place to plug in for power.  The Transporter was a gift and is overkill for me as I feed out the optical to my AVP which handles the decoding, but it is so pretty!   IIRC the optical out of every player is the same being the file as received from the server.

 

There is another interesting approach to building a control system. If the XAP plugin is installed in the server then there will be XAP messages for every change that occurs. For example if a player is turned on a message is sent over XAP that  states which player has just turned on (or off). As music is playing messages come out regarding state.  I use this to keep the PC in my theater up to date.  I am not sure you can control LMS using XAP.

 

For those who never heard of XAP it is a protocol riding over UDP. It is supported by a community of developers/users and is reasonably well documented. There is no reason that XAP couldn't run under iViewer.

 

From: comman...@googlegroups.com [mailto:comman...@googlegroups.com] On Behalf Of JohanJ
Sent: Monday, March 10, 2014 4:01 AM
To: comman...@googlegroups.com
Subject: Re: Squeeze box server & Javascript

 

Hi

--

JohanJ

unread,
Mar 11, 2014, 5:06:42 AM3/11/14
to comman...@googlegroups.com
"Interesting. When I wrote the app for the ProntoPAL they were not yet using JSONRPC, so I did everything via the CLI, which at the time was well documented. "

JSONRPC is actually also using the CLI syntax and that is fairly well documented, the difference is that you get JSON data as reply. One still need to debug each reply in order to see what they include. E.g. creating the url for the image thumbs depend on the media source, it can include a full url including http, only an id and one need to combine the url. It's done differently for own music library, apps and internet radio and the id can be given with different keys depending on who knows:).    

I also learned (the hard way) that iPeng/Squeezpad are not browsing menus for the apps like a regular XML radio/app that is documented in the CLI doc. The reply from regular CLI command when browsing XML apps do not give enough data for building the lists including thumbs for all occasions, e.g. Top 100 tracks in Spotify.  One should instead add  'menu:1' to the request and get a different formated replies according to these specs:
http://wiki.slimdevices.com/index.php/SBS_SqueezePlay_interface#.3Caction_name.3E
The replies include all available actions that one can perform for each menu item. I'm still not 100% sure of how to create the JSON requests for all the actions, some of them are complex. I was also told that the replies can differ between server versions and that different apps are doing some things differently. 

One way of understanding more is to turn on comed debugging in the server and reading the logs after using iPeng or Squeezepad. Cometd is using the same command structure as JSONRPC.



panos_k75

unread,
Mar 12, 2014, 9:00:08 AM3/12/14
to comman...@googlegroups.com
I have also been waiting for Squeeze Server integration but in the end I gave up waiting and created my own interface exactly as JohanJ did (JSON/HTTP for database requests and CLI for subscriptions). I am not bothered with trying to replicate what SqueezePad or iPeng have done with reading menu structures etc...I just wanted to be able to browse my music, generate MusicIP mixes and control the players. I can even wake them up, all within CF. It's not that hard as it looks and using JSON simplifies things quite a bit. 
Reply all
Reply to author
Forward
0 new messages