Web Controller Software - Perl based

I've built a very simple web based Controller, if folks want to try it out. It is written in Perl, so it will run on a Unix box or probably a Mac. However you can use any browser with it.



303 replies

Userlevel 2
All I can say is... WOW! Great job. It took a few tried to get it to run, but once it does, it works surprisingly well for a first version.

I'm sure I could come up with a laundry list of features I'd like to see, but this is exactly the type of interface I've been hoping someone would develop. Great work!
I've just posted version 2 with some of the bugs fixed that folks have sent me, plus it now works on my Sidekick (using http://host:8001/mobile.html).

Userlevel 2
The mobile web interface works with my Motorola V60 also, although the only information I can see is a number in the Song field; the Artist and Album fields always appear blank.

Also, it appears to have a problem refreshing if the Zoneplayer is paused or playing Internet Radio.
Got a chance to work on it last night, so I posted version 3. It should display Radio stations correctly instead of a number. Also it now lets you select Radio stations and saved Playlists.

Let me know if you have any issues.


Is this going to work with a pocket PC based PDA? I have a HP with WiFi and Bluetooth. Is all I need a web browser?
The UI should work in any browser, especially the /mobile.html version.
However you still need to install the software on a computer that supports Perl.

I develop and test on a Fedora box, and have gotten reports that it works on a Mac OS X box (if you install the Apple Dev tools, you could probably also use fink to install gcc etc..)

I know there is Perl for the PC, but no clue if the required Perl packages work on the PC or not.

I am not technical enough re Perl to get any of this to work (mainframe guy), but J. River Media Center has an app for PocketPC that is effectively a remote control. I hope someone here with the talent comes up with a way of controlling the Sonos PC software, thus turning a PocketPC into a mini controller.
It turns out it is pretty easy to get this to run on Windows XP/Mac because a company called ActiveState has put together a Free Perl Installer that includes everything required except one package, and even that package is easy to install.

I've put the instructions at the bottom of my web site. Let me know if it does/doesn't work for you.

Userlevel 2
uh oh!

The latest version doesn't seem to run... I keep getting the following error:

Can't call method "getService" on an undefined value at ./sonos.pl line 551.
Could you send me the entire log, [email]sonos@purple.org[/email]

I assume you are getting this on start up?

I posted another new version tonight, 0.07 that fixes many of the problems that people have been having

I also have detailed instructions on the webpage to make it work both under Windows XP and Mac OS X.

Userlevel 2
Great job mang!!! Lovn' it!!!

Keep it up!!!
Thanks for all your help in getting me up and running.

I'm Lovin it, Lovin It , Lovin It !!!


PS: As you know my big wish is for an RSS feed of whats playing in my zones - that would be sooooo sweet
Nic, I just posted 0.08 that has a cheesy RSS view if you set your reader to go to http://HOST:8001/status.xml

Thats the only change from 0.07 to 0.08.

I don't really know much about RSS or what you wanted, but it uses the same template engine that the html uses, so it should be easy to add more "stuff".

[font=Arial][size=2]I tried to set this up on XP. [/size][/font]
[size=2]Installed PERL - no probs. [/size]

[font=Arial][size=2]All went as per instructions up to 6.6.[/size][/font]

[font=Arial][size=2]typed "perl sonos.pl" and nothing happens at all nor can my browser locate 8001. [/size][/font]

[font=Arial][size=2]What should occur at this point ? [/size][/font]
[size=2]Perl is running fine. HTML Template stage went fine. [/size]

[font=Arial][size=2]Suggestions ? [/size][/font]

I should also admit that I know nothing at all about PERL programming. I know my way around a PC and network , can handle command level and basic scripts etc.. but I aint a programmer no more .. been years since I did that and things have changed since then. I cant keep up 🙂 Hats off to you all.

I've tried .03 and .08 No joy. Should they be in a particular location ?

Apologies Quofiend can't help you. I have it running fine on my WinXP platform.

I guess you are getting page not found when you go to localhost:8001 ?? If using IE probably worth emptying your cache and checking you have reload page on every visit - I noticed some caching which made things kind of weird.

Andy, Many thanks for the XML feed. I know have this nicely tied in with my Home Automation. Wife has a nice page she can visit on her iPAQ to see whats playing in each zone. She would be able to view on the Controller but I never let go of that !!!

What should happen when you type "Perl sonos.pl"

Should I see some messages ?
Should the cursor just line feed and sit there ? (which is what I get)
Should it start a process ?

Knowing this would be useful.
I get lots and lots of stuff after I type perl sonos.pl

Including loading music DB, finding the sonos players, etc.

Is Desktop Controller also installed on that machine ?? And can it see your SONOS players ???

Sorry can't be of more help.
Did my question about control with PocketPC ever get answered? I used to use a program called NetRemote on an iPaq with WiFi to control the JRiver player on my music PC.

It would be great, not to mention cost effective if I could use the iPaq to control the Sonos system either directly or via a PC.
fm, you can use your ipaq if it has a web browser by using this software. Just run the web contoller on your pc, and point your ipaq to your pc.

I pointed the iPaq at the PC and nothing happened.

Sorry to litter, but I get answers like that from users all the time and I couldn't restrain myself. 😃
Userlevel 2
While certainly not the prettiest interface ever created, its definitely functional, and that's the most important. Thanks Andy!

I've noticed this thread has been dead for about 6 weeks, so I was wondering if there are any additional enhancements planned.

Also, I wanted to know if anyone has tried accessing the web page with an iPronto. I'm looking to replace my Pronto Pro in my family room, and if I can control my Sonos with a new iPronto, I would be very, very happy.


Userlevel 2
I have had various issues:

I added 2 playlists to get rid of this message:
Not an ARRAY reference at sonos.pl line 489.

I also had to run the script 3 times before it took and didnt run into:

Can't call method "getService" on an undefined value at sonos.pl line 578.
Sorry for not posting for a while. Had our second child, and all hobbies were out the window for a while. :-)

Anyway, new version is now posted that fixes the one playlist bug, and now have 2 new interfaces. A user contributed one called "nonos" and a AJAX one called "simplejs" that I've been playing with to increase my javascript skills.

I have several folks that promise me some nice buttons to fix up the simple UI, hopefully will get to that some day. :)

Posted a new version 0.10 that fixes some of the problems folks emailed me about with the new AJAX interface. Also added search as you type which is pretty cool! (Next I need to highlight like Firefox does! :-)