Results 1 to 6 of 6
Discuss Wireless Sonos uPnP Control Point at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; I have a few sonos units in my house and I want to control them ...
  1. #1
    Rookie Array

    Join Date
    Mar 2007
    Posts
    17
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Lightbulb Wireless Sonos uPnP Control Point

    I have a few sonos units in my house and I want to control them from the itouch. I think the itouch will make a much better controller than the sonos wireless controllers. There are several open source projects using PERL, JAVA, and a COM object that communicate with sonos zoneplayers (see sonos digital expert forums for more info).

    The sonos uses UPNP. As far as I can tell it's UPNP for the discovery and event objects, and then it uses SOAP over HTTP POST to send commands like play, stop, next track, and for pulling the list of shared music from the sonos.

    I found COCOA SOAP libraries and have started tinkering with them in XCODE to see if I can get some basic communication working with the sonos.

    Currently, I have this working 2 different ways:

    1. as a native app I wrote in cocoa
    2. as an AJAX web application

    Both methods were done by using Sonosweb (http://purple.org/sonos/).
    Sonosweb is a perl app that I have running on my linux server. A nativeapp on the iphone connects to the perl server and sends and receives JSON requests to control the sonos. The ajax version is a template I created for sonsoweb that is formatted for the iphone.
    Both methods work pretty good, but it requires you to have a sonos, and a linux server and an itouch. I want to eliminate the need for the linux server. I attempted to run the perl script on the itouch itself, but there are a few modules such as XML Expat that I was unable to compile for arm-darwin.

    The new plan is to start from scratch and put together a simple app that lets you browse the shared content tree and select songs for playback with some basic transport controls all using SOAP and UPNP (no sonosweb required). This will be a native app written in cocoa that is able to discover all zoneplayers, and tap into their content directory and control api.

    Sonos now supports several music subscription services such as Sirius, Napster, Rhapsody, Audible, Yahoo, and others, and in my opinion is the ultimate music server for both local content and subscription content. Their latest firmware update also adds search making it possible to type in any song and search al of the local music and online subscription services for the tracks. This is not an ad for sonos, but I am a big fan of their product and would like to see more ways of controlling it and integrating it with other home automation devices and consumer electronics.

    Please post in this thread if:
    -you have a sonos and an itouch and want to see this happen
    -you know how to communicate with upnp and soap devices in Cocoa.
    -you have figured out a way to cross compile all of the modules needed to make perl run sonosweb on the itouch (XML Expat, etc).

    I am just starting to learn cocoa, so I don't know if I will be able to make this work myself... If there are any developers that are interested in taking on this project for real, but don't have the hardware... get in contact with me and I might be able to get some sonos hardware in your hands to begin developing.

    --
    Additional Reading:

    These are two open source upnp clients written in C:
    http://sourceforge.net/projects/clinkc
    http://pupnp.sourceforge.net/
    Can these be compiled for iphone and used in a gui app?


    -LiquidIce
    Last edited by LiquidIce; 10-25-2007 at 06:50 AM.



  2. #2
    Newbie Array

    Join Date
    Oct 2007
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I have SONOS and love it; and have been thinking how could I control it from my my iphone ... like the apps they have for MAC and PC ... having said that, I am not a programmer, so I'm not sure how to go about it.


    ron

  3. #3
    Rookie Array

    Join Date
    Mar 2007
    Posts
    17
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    So I downloaded the open source portable upnp sdk from sourceforge ( http://sourceforge.net/projects/pupnp/ ) and went to work trying to compile it for the iphone

    Basically, I just ran configure with:
    Code:
    ./configure --host=arm-apple-darwin
    The resulting makefile did not have the correct paths to GCC, so I changed a few paths in the file to point to heavenly, the correct location for the arm-apple-darwin gcc and updated the LDFLAGS and CFLAGS

    It makes it pretty far into the build then dies. It seems like i'm getting stuck at the same part that I got stuck with in perl, the EXPAT library.

    Here is some of the error message:
    Code:
    /usr/local/bin/arm-apple-darwin-nm -p  src/ssdp/.libs/libupnp_la-ssdp_device.o src/ssdp/.libs/libupnp_la-ssdp_ctrlpt.o src/ssdp/.libs/libupnp_la-ssdp_server.o src/soap/.libs/libupnp_la-soap_device.o src/soap/.libs/libupnp_la-soap_ctrlpt.o src/soap/.libs/libupnp_la-soap_common.o src/genlib/miniserver/.libs/libupnp_la-miniserver.o src/genlib/service_table/.libs/libupnp_la-service_table.o src/genlib/util/.libs/libupnp_la-membuffer.o src/genlib/util/.libs/libupnp_la-strintmap.o src/genlib/util/.libs/libupnp_la-upnp_timeout.o src/genlib/util/.libs/libupnp_la-util.o src/genlib/client_table/.libs/libupnp_la-client_table.o src/genlib/net/.libs/libupnp_la-sock.o src/genlib/net/http/.libs/libupnp_la-httpparser.o src/genlib/net/http/.libs/libupnp_la-httpreadwrite.o src/genlib/net/http/.libs/libupnp_la-statcodes.o src/genlib/net/http/.libs/libupnp_la-webserver.o src/genlib/net/http/.libs/libupnp_la-parsetools.o src/genlib/net/uri/.libs/libupnp_la-uri.o src/gena/.libs/libupnp_la-gena_device.o src/gena/.libs/libupnp_la-gena_ctrlpt.o src/gena/.libs/libupnp_la-gena_callback2.o src/api/.libs/libupnp_la-upnpapi.o src/api/.libs/libupnp_la-upnptools.o src/uuid/.libs/libupnp_la-md5.o src/uuid/.libs/libupnp_la-sysdep.o src/uuid/.libs/libupnp_la-uuid.o src/urlconfig/.libs/libupnp_la-urlconfig.o  | sed -n -e 's/^.*[       ]\([BCDEGRST][BCDEGRST]*\)[     ][     ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libupnp.exp
    /usr/local/bin/arm-apple-darwin-nm: no name list
    /usr/bin/grep -E -e "^Upnp.*" ".libs/libupnp.exp" > ".libs/libupnp.expT"
    mv -f ".libs/libupnp.expT" ".libs/libupnp.exp"
    sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < .libs/libupnp.exp > .libs/libupnp-symbols.expsym
    make[3]: *** [libupnp.la] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    Anyone have some tips on getting the upnp samples compiled for the iphone, or for that matter compiling any sourcecode that was written for a POSTIX OS? Maybe the toolchain is still too new to deal with things like autoconfigure ? Even if this did work, it's in C and a command line program. I still have no idea how I can get the data from there into a Cocoa application to display a UI to the screen. Can Cocoa code call C functions? I guess I still have a lot to learn...

    I think in the meantime I will try to get it to compile for OSX and see if I can write some code to make it subscribe to the Sonos and send basic transport commands.

  4. #4
    Rookie Array

    Join Date
    Mar 2007
    Posts
    17
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    core is the man! He's got upnp libraries running on the iphone. Sonosweb also runs the webserver, but needs some additional modules to process the XML returned from the sonos.

    Read more at core's wepage:
    http://wickedpsyched.net/iphone/upnp/

    Making good progress, stay tuned!

  5. #5
    Newbie Array

    Join Date
    Oct 2007
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Great news; looks like some significant progress is being made; though I have to admit, I can't follow all of the info at wickedpsyched.com on the Sonos app. I don't quite need an apptapp version, I am comfortable following a guide and running commands, but am not a programmer
    Last edited by rkisling; 10-29-2007 at 08:40 PM.


  6. #6
    Rookie Array

    Join Date
    Mar 2007
    Posts
    17
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    OK, I've got it working, and packaged into an installer file. If anyone around has a sonos and wants to give it a try, let me know.

    The installer installs sonosweb, the perl binaries and modules needed, then it places a shortcut on the main menu to open safari to the iphone skin.

    I still need to tweak the skin and work the kinks out of the config files and handling reconnects. Other than that it's working good, now all you need is a zoneplayer and an itouch to control music on a sonos system.

    Huge thanks to core for helping with the perl modules!

    -LiquidIce

 

 

Similar Threads

  1. MacNN: Sonos may dip into wireless home theater
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 11-30-2010, 07:40 PM
  2. MacNN: Review: Sonos Wireless Dock for iPhone and iPod
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 11-07-2010, 03:30 AM
  3. MacNN: Reviews: Sonos Wireless Dock
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 11-07-2010, 03:30 AM
  4. Replies: 0
    Last Post: 09-16-2010, 03:00 PM
  5. MacNN: Sonos ships ZonePlayer S5 wireless music system
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 11-04-2009, 01:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 09:12 AM.
twitter, follow us!